18 #ifndef ION_GFXUTILS_RESOURCECALLBACK_H_
19 #define ION_GFXUTILS_RESOURCECALLBACK_H_
113 #endif // ION_GFXUTILS_RESOURCECALLBACK_H_
bool Post()
Wakes a single thread that is Wait()ing, or the next thread to call Wait().
void Callback(const std::vector< T > &data)
This function is compatible with ResourceManager::InfoCallback, and should be used as the callback pa...
bool Wait()
Blocks the calling thread until another thread calls Post().
Class that allows blocking until a callback is called and automagically destroys itself after both Ca...
base::ReferentPtr< ResourceCallback< T > >::Type RefPtr
~ResourceCallback() override
The constructor is protected because this class is derived from Referent.
A Semaphore enables threads and process synchronization.
ResourceCallback< gfx::ResourceManager::FramebufferInfo > FramebufferCallback
void WaitForCompletion(std::vector< T > *data)
ResourceCallback< gfx::ResourceManager::TextureImageInfo > TextureImageCallback
Thread-safe abstract base class.
ResourceCallback< gfx::ResourceManager::ShaderInfo > ShaderCallback
T * Get() const
Returns a raw pointer to the instance, which may be NULL.
ResourceCallback< gfx::ResourceManager::TextureInfo > TextureCallback
A ReferentPtr is a smart shared pointer to an instance of some class derived from Referent...
ResourceCallback< gfx::ResourceManager::SamplerInfo > SamplerCallback
port::Semaphore semaphore_
ResourceCallback(bool do_wait)
void Reset(T *new_shared)
Changes the pointer to point to the given shared, which may be NULL.
ResourceCallback< gfx::ResourceManager::ProgramInfo > ProgramCallback
ResourceCallback< gfx::ResourceManager::PlatformInfo > PlatformCallback
const std::vector< T > & GetData() const
Returns the data received by Callback().
ResourceCallback< gfx::ResourceManager::ArrayInfo > ArrayCallback
A SharedPtr is a smart shared pointer to an instance of some class that implements reference counting...
ResourceCallback< gfx::ResourceManager::BufferInfo > BufferCallback