Dali 3D User Interface Engine
List of all members | Public Member Functions | Protected Attributes
Dali::Internal::SceneGraph::TextureCacheDispatcher Class Referenceabstract

#include <texture-cache-dispatcher.h>

Inheritance diagram for Dali::Internal::SceneGraph::TextureCacheDispatcher:
Inheritance graph
[legend]
Collaboration diagram for Dali::Internal::SceneGraph::TextureCacheDispatcher:
Collaboration graph
[legend]

Public Member Functions

 TextureCacheDispatcher (RenderQueue &renderQueue)
 Constructor. More...
 
virtual ~TextureCacheDispatcher ()
 Virtual destructor; TextureCacheDispatcher is a base class. More...
 
void SetBufferIndices (const SceneGraphBuffers *bufferIndices)
 mRenderQueue needs the update buffer index when any of the dispatch methods are called. More...
 
virtual void DispatchCreateTexture (ResourceId id, unsigned int width, unsigned int height, Pixel::Format pixelFormat, bool clearPixels)=0
 Dispatch a message to create an empty texture and add it to the texture cache. More...
 
virtual void DispatchCreateTextureForBitmap (ResourceId id, Integration::Bitmap *bitmap)=0
 Dispatch a message to add a texture for bitmap. More...
 
virtual void DispatchCreateTextureForNativeImage (ResourceId id, NativeImageInterfacePtr nativeImage)=0
 Dispatch a message to add a native image to the texture cache May be called from Update thread. More...
 
virtual void DispatchCreateTextureForFrameBuffer (ResourceId id, unsigned int width, unsigned int height, Pixel::Format pixelFormat, RenderBuffer::Format bufferFormat)=0
 Dispatch a message to create a framebuffer texture and add it to the texture cache May be called from Update thread. More...
 
virtual void DispatchCreateTextureForFrameBuffer (ResourceId id, NativeImageInterfacePtr nativeImage)=0
 Dispatch a message to create a framebuffer texture and add it to the texture cache May be called from Update thread. More...
 
virtual void DispatchCreateGlTexture (ResourceId id)=0
 Create GL texture for native image resource. More...
 
virtual void DispatchUpdateTexture (ResourceId id, Integration::Bitmap *bitmap)=0
 Dispatch a message to update the texture. More...
 
virtual void DispatchUpdateTexture (ResourceId id, Integration::BitmapPtr bitmap, std::size_t xOffset, std::size_t yOffset)=0
 Dispatch a message to update the part of a texture with the bitmap data. More...
 
virtual void DispatchUpdateTexture (ResourceId destId, ResourceId srcId, std::size_t xOffset, std::size_t yOffset)=0
 Dispatch a message to update the part of a texture with a newly loaded bitmap May be called from Update thread. More...
 
virtual void DispatchUpdateTexture (ResourceId id, PixelDataPtr pixelData, std::size_t xOffset, std::size_t yOffset)=0
 Dispatch a message to update the part of a texture with the pixel data. More...
 
virtual void DispatchUpdateTextureArea (ResourceId id, const RectArea &area)=0
 Dispatch a message to update the texture area May be called from the Update thread. More...
 
virtual void DispatchDiscardTexture (ResourceId id)=0
 Dispatch a message to discard a texture May be called from Update thread. More...
 

Protected Attributes

RenderQueuemRenderQueue
 
const SceneGraphBuffersmSceneGraphBuffers
 

Detailed Description

Definition at line 47 of file texture-cache-dispatcher.h.

Constructor & Destructor Documentation

Dali::Internal::SceneGraph::TextureCacheDispatcher::TextureCacheDispatcher ( RenderQueue renderQueue)

Constructor.

Parameters
[in]renderQueueThe queue to which to send messages

Definition at line 33 of file texture-cache-dispatcher.cpp.

Dali::Internal::SceneGraph::TextureCacheDispatcher::~TextureCacheDispatcher ( )
virtual

Virtual destructor; TextureCacheDispatcher is a base class.

Definition at line 39 of file texture-cache-dispatcher.cpp.

Member Function Documentation

virtual void Dali::Internal::SceneGraph::TextureCacheDispatcher::DispatchCreateGlTexture ( ResourceId  id)
pure virtual

Create GL texture for native image resource.

Parameters
[in]idThe resource id.

Implemented in Dali::Internal::SceneGraph::TextureCache.

virtual void Dali::Internal::SceneGraph::TextureCacheDispatcher::DispatchCreateTexture ( ResourceId  id,
unsigned int  width,
unsigned int  height,
Pixel::Format  pixelFormat,
bool  clearPixels 
)
pure virtual

Dispatch a message to create an empty texture and add it to the texture cache.

May be called from Update thread

Parameters
[in]idResource Id of the texture
[in]widthWidth of the texture
[in]heightHeight of the texture
[in]pixelFormatPixel format of the texture
[in]clearPixelsTrue if the data should be cleared to 0 on creation

Implemented in Dali::Internal::SceneGraph::TextureCache.

virtual void Dali::Internal::SceneGraph::TextureCacheDispatcher::DispatchCreateTextureForBitmap ( ResourceId  id,
Integration::Bitmap bitmap 
)
pure virtual

Dispatch a message to add a texture for bitmap.

May be called from Update thread

Parameters
[in]idResource Id of the bitmap
[in]bitmapThe bitmap

Implemented in Dali::Internal::SceneGraph::TextureCache.

virtual void Dali::Internal::SceneGraph::TextureCacheDispatcher::DispatchCreateTextureForFrameBuffer ( ResourceId  id,
unsigned int  width,
unsigned int  height,
Pixel::Format  pixelFormat,
RenderBuffer::Format  bufferFormat 
)
pure virtual

Dispatch a message to create a framebuffer texture and add it to the texture cache May be called from Update thread.

Parameters
[in]idResource Id of the framebuffer
[in]widthWidth of the framebuffer
[in]heightHeight of the framebuffer
[in]pixelFormatPixel format of the framebuffer

Implemented in Dali::Internal::SceneGraph::TextureCache.

virtual void Dali::Internal::SceneGraph::TextureCacheDispatcher::DispatchCreateTextureForFrameBuffer ( ResourceId  id,
NativeImageInterfacePtr  nativeImage 
)
pure virtual

Dispatch a message to create a framebuffer texture and add it to the texture cache May be called from Update thread.

Parameters
[in]idResource Id of the framebuffer
[in]nativeImageThe NativeImage

Implemented in Dali::Internal::SceneGraph::TextureCache.

virtual void Dali::Internal::SceneGraph::TextureCacheDispatcher::DispatchCreateTextureForNativeImage ( ResourceId  id,
NativeImageInterfacePtr  nativeImage 
)
pure virtual

Dispatch a message to add a native image to the texture cache May be called from Update thread.

Parameters
[in]idResource Id of the native image
[in]nativeImageThe native image

Implemented in Dali::Internal::SceneGraph::TextureCache.

virtual void Dali::Internal::SceneGraph::TextureCacheDispatcher::DispatchDiscardTexture ( ResourceId  id)
pure virtual

Dispatch a message to discard a texture May be called from Update thread.

Parameters
[in]idResource Id of the texture

Implemented in Dali::Internal::SceneGraph::TextureCache.

virtual void Dali::Internal::SceneGraph::TextureCacheDispatcher::DispatchUpdateTexture ( ResourceId  id,
Integration::Bitmap bitmap 
)
pure virtual

Dispatch a message to update the texture.

May be called from Update thread

Parameters
[in]idResource Id of the texture
[in]bitmapThe updated bitmap

Implemented in Dali::Internal::SceneGraph::TextureCache.

virtual void Dali::Internal::SceneGraph::TextureCacheDispatcher::DispatchUpdateTexture ( ResourceId  id,
Integration::BitmapPtr  bitmap,
std::size_t  xOffset,
std::size_t  yOffset 
)
pure virtual

Dispatch a message to update the part of a texture with the bitmap data.

May be called from Update thread

Parameters
[in]destIdThe ID of the texture to update
[in]bitmapThe pointer pointing to the source bitmap data.
[in]xOffsetSpecifies an offset in the x direction within the texture
[in]yOffsetSpecifies an offset in the y direction within the texture

Implemented in Dali::Internal::SceneGraph::TextureCache.

virtual void Dali::Internal::SceneGraph::TextureCacheDispatcher::DispatchUpdateTexture ( ResourceId  destId,
ResourceId  srcId,
std::size_t  xOffset,
std::size_t  yOffset 
)
pure virtual

Dispatch a message to update the part of a texture with a newly loaded bitmap May be called from Update thread.

Parameters
[in]destIdThe ID of the texture to update
[in]srcIdThe resource ID of the source bitmap
[in]xOffsetSpecifies an offset in the x direction within the texture
[in]yOffsetSpecifies an offset in the y direction within the texture

Implemented in Dali::Internal::SceneGraph::TextureCache.

virtual void Dali::Internal::SceneGraph::TextureCacheDispatcher::DispatchUpdateTexture ( ResourceId  id,
PixelDataPtr  pixelData,
std::size_t  xOffset,
std::size_t  yOffset 
)
pure virtual

Dispatch a message to update the part of a texture with the pixel data.

May be called from Update thread

Parameters
[in]destIdThe ID of the texture to update
[in]pixelDataThe pointer pointing to the pixel data to upload.
[in]xOffsetSpecifies an offset in the x direction within the texture
[in]yOffsetSpecifies an offset in the y direction within the texture

Implemented in Dali::Internal::SceneGraph::TextureCache.

virtual void Dali::Internal::SceneGraph::TextureCacheDispatcher::DispatchUpdateTextureArea ( ResourceId  id,
const RectArea area 
)
pure virtual

Dispatch a message to update the texture area May be called from the Update thread.

Parameters
[in]idResource Id of the texture
[in]areaThe area of the bitmap that has changed

Implemented in Dali::Internal::SceneGraph::TextureCache.

void Dali::Internal::SceneGraph::TextureCacheDispatcher::SetBufferIndices ( const SceneGraphBuffers bufferIndices)

mRenderQueue needs the update buffer index when any of the dispatch methods are called.

Should really store a functor to get this index, but existing functors use references. Could heap allocate the functor, but that seems overly wasteful. Instead, store a pointer to the SceneGraphBuffers object, and call the relevant function when required. (increases coupling, requires object lifetime management :/ )

Parameters
[in]bufferIndicesPointer to SceneGraphBuffers object that can query the current RenderQueue buffer index.

Definition at line 43 of file texture-cache-dispatcher.cpp.

References mSceneGraphBuffers.

Referenced by Dali::Internal::SceneGraph::UpdateManager::UpdateManager().

Here is the caller graph for this function:

Member Data Documentation

RenderQueue& Dali::Internal::SceneGraph::TextureCacheDispatcher::mRenderQueue
protected
const SceneGraphBuffers* Dali::Internal::SceneGraph::TextureCacheDispatcher::mSceneGraphBuffers
protected

The documentation for this class was generated from the following files:
Dali Docs Home
Read more about Dali