Commit Graph

10 Commits (96845081c03ed0bfd7effa86273ddb2ce74ece5b)

Author SHA1 Message Date
jvoisin 3cbf1dc042 First pass with include-what-you-use 2 years ago
clang-format-bot ddb0522bbf
Apply clang-format to code base 2 years ago
elsid 0614b82452
Restore UnrefQueue to destruct animation asynchronously 2 years ago
Bo Svensson a854a6e04a
removes UnrefQueue (#3181)
Currently, we use an `UnrefQueue` which supposedly aims to transfer destruction costs to another thread. The implications of this unusual pattern can not be well understood because some allocators might free resources more efficiently if they are freed by the same thread that allocated them. In addition, `UnrefQueue` complicates the validation of thread safety in our engine. Lastly, our current usage of `UnrefQueue` triggers `ref()`, `unref()` atomic operations as objects are passed into the queue. These operations could be more expensive than the actual destruction.

With this PR we thus remove `UnrefQueue`. We can expect these changes to have a minor impact at most because we free most resources elsewhere in `ResourceSystem::updateCache`.
3 years ago
Andrei Kortunov 8ca3c3b123 Mark overrided methods by override keyword 4 years ago
Sophie Kirschner 4dd9386c4f Fix error: member access into incomplete type 'SceneUtil::UnrefWorkItem'
Fixes compile error encountered on OSX 10.9 with g++

sophie:build pineapple$ g++ --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin13.4.0
Thread model: posix

The compilation error:

[ 24%] Building CXX object apps/openmw/CMakeFiles/openmw.dir/mwrender/renderingmanager.cpp.o
In file included from /Users/pineapple/git/openmw/apps/openmw/mwrender/renderingmanager.cpp:1:
In file included from /Users/pineapple/git/openmw/apps/openmw/mwrender/renderingmanager.hpp:4:
/Users/pineapple/git/openmw/openmw-deps/include/osg/ref_ptr:35:36: error: member access into incomplete type 'SceneUtil::UnrefWorkItem'
        ~ref_ptr() { if (_ptr) _ptr->unref();  _ptr = 0; }
                                   ^
/Users/pineapple/git/openmw/./components/sceneutil/unrefqueue.hpp:14:11: note: in instantiation of member function
      'osg::ref_ptr<SceneUtil::UnrefWorkItem>::~ref_ptr' requested here
    class UnrefQueue : public osg::Referenced
          ^
/Users/pineapple/git/openmw/./components/sceneutil/unrefqueue.hpp:10:11: note: forward declaration of 'SceneUtil::UnrefWorkItem'
    class UnrefWorkItem;
6 years ago
scrawl 8f79fa3d72 Add resource statistics panel opened with F4 8 years ago
scrawl a1069dce3c Change UnrefQueue to accept osg::Referenced instead of osg::Object 8 years ago
scrawl afe533e670 Accept a const Object in UnrefQueue 9 years ago
scrawl d11c2864df Introduce UnrefQueue to handle the deleting of no longer needed objects in the background thread 9 years ago