New parameter for FrameBufferImage creation
[platform/core/uifw/dali-core.git] / dali / internal / update / resources / resource-manager.h
index 55dc43a..131c45c 100644 (file)
 
 // INTERNAL INCLUDES
 #include <dali/public-api/images/image.h>
+#include <dali/public-api/images/frame-buffer-image.h>
 #include <dali/public-api/images/native-image-interface.h>
 #include <dali/public-api/images/buffer-image.h>
-#include <dali/public-api/common/ref-counted-dali-vector.h>
+#include <dali/devel-api/common/ref-counted-dali-vector.h>
 
 #include <dali/integration-api/bitmap.h>
 #include <dali/integration-api/platform-abstraction.h>
 #include <dali/integration-api/resource-cache.h>
 #include <dali/integration-api/shader-data.h>
 
-#include <dali/internal/common/event-to-update.h>
 #include <dali/internal/common/message.h>
+#include <dali/internal/event/common/event-thread-services.h>
 #include <dali/internal/event/common/thread-local-storage.h>
-#include <dali/internal/common/bitmap-upload.h>
-#include <dali/internal/event/text/font-impl.h>
-#include <dali/internal/event/modeling/model-data-impl.h>
 #include <dali/internal/event/resources/resource-client-declarations.h>
 #include <dali/internal/event/effects/shader-factory.h>
-#include <dali/internal/update/modeling/internal-mesh-data.h>
-#include <dali/internal/update/modeling/scene-graph-mesh-declarations.h>
 #include <dali/internal/update/resources/resource-manager-declarations.h>
 #include <dali/internal/update/resources/bitmap-metadata.h>
 
@@ -58,11 +54,15 @@ struct ResourceType;
 namespace Internal
 {
 
+class ImageAttributes;
+
 // value types used by messages
 template <> struct ParameterType< Integration::LoadResourcePriority >
 : public BasicType< Integration::LoadResourcePriority > {};
 template <> struct ParameterType< Pixel::Format >
 : public BasicType< Pixel::Format > {};
+template <> struct ParameterType< RenderBuffer::Format >
+: public BasicType< RenderBuffer::Format > {};
 template <> struct ParameterType< Integration::ResourceTypeId >
 : public BasicType< Integration::ResourceTypeId > {};
 
@@ -221,7 +221,7 @@ public: // Used by ResourceClient
    * @param[in] height      height in pixels
    * @param[in] pixelFormat Pixel format
    */
-  void HandleAddFrameBufferImageRequest( ResourceId id, unsigned int width, unsigned int height, Pixel::Format pixelFormat );
+  void HandleAddFrameBufferImageRequest( ResourceId id, unsigned int width, unsigned int height, Pixel::Format pixelFormat, RenderBuffer::Format bufferFormat );
 
   /**
    * Add an existing resource to the resource manager.
@@ -239,24 +239,6 @@ public: // Used by ResourceClient
    */
   void HandleAllocateTextureRequest( ResourceId id, unsigned int width, unsigned int height, Pixel::Format pixelFormat );
 
-  /**
-   * Upload an array of bitmaps to a texture.
-   * @param[in] id The resource id
-   * @param[in] uploadArray  bitmap upload array.
-   */
-  void HandleUpdateTextureRequest( ResourceId id,  const BitmapUploadArray& uploadArray );
-
-  /**
-   * Requests allocation of a mesh resource
-   * @param[in] id The resource id
-   * @param[in] meshData The mesh data
-   */
-  void HandleAllocateMeshRequest (ResourceId id, MeshData* meshData);
-
-  /**
-   * Requests allocation of a font resource
-   */
-  void HandleAllocateFontRequest(ResourceId id, const std::string& familyNameAndStyle);
 
   /**
    * Load a shader program from a file
@@ -275,19 +257,20 @@ public: // Used by ResourceClient
   /**
    * Upload a bitmap to a position within a specified texture
    * @param[in] destId The destination texture ID
-   * @param[in] srcId The resource ID of the bitmap to upload
+   * @param[in] bitmap The pointer pointing to the bitmap data to upload
    * @param [in] xOffset Specifies an offset in the x direction within the texture
    * @param [in] yOffset Specifies an offset in the y direction within the texture
    */
-  void HandleUploadBitmapRequest( ResourceId destId, ResourceId srcId, std::size_t xOffset, std::size_t yOffset );
+  void HandleUploadBitmapRequest( ResourceId destId, Integration::BitmapPtr bitmap, std::size_t xOffset, std::size_t yOffset );
 
   /**
-   * Upload mesh buffer changes.
-   * @param[in] updateBufferIndex The current update buffer index.
-   * @param[in] id The ID of a Mesh resource.
-   * @param[in] meshData Newly allocated mesh data; ownership is taken.
+   * Upload a bitmap to a position within a specified texture
+   * @param[in] destId The destination texture ID
+   * @param[in] srcId The resource ID of the bitmap to upload
+   * @param [in] xOffset Specifies an offset in the x direction within the texture
+   * @param [in] yOffset Specifies an offset in the y direction within the texture
    */
-  void HandleUpdateMeshRequest( BufferIndex updateBufferIndex, ResourceId id, MeshData* meshData );
+  void HandleUploadBitmapRequest( ResourceId destId, ResourceId srcId, std::size_t xOffset, std::size_t yOffset );
 
   /**
    * Request reloading a resource from the native filesystem.
@@ -310,27 +293,11 @@ public: // Used by ResourceClient
    */
   void HandleDiscardResourceRequest( ResourceId id, Integration::ResourceTypeId typeId );
 
-  /**
-   * Update font texture atlas status
-   * @param[in] id         The resource id
-   * @param[in] atlasId    texture ID of the atlas
-   * @param[in] loadStatus The status update.
-   */
-  void HandleAtlasUpdateRequest( ResourceId id, ResourceId atlasId, Integration::LoadStatus loadStatus );
-
-  /********************************************************************************
-   ******************** Event thread object direct interface  *********************
-   ********************************************************************************/
-
-  /**
-   * Called by model implementations which require access to the model
-   * data.
-   * @note Only called from event thread objects - ModelData is not used
-   * by update objects.
-   * @param[in] id - the id of a ModelData resource.
-   * @return the model data or NULL if it has not been loaded.
-   */
-  Internal::ModelDataPtr GetModelData(ResourceId id);
+   /**
+    * @brief Create GL texture for resource.
+    * @param[in] id The resource id.
+    */
+   void HandleCreateGlTextureRequest( ResourceId id );
 
   /********************************************************************************
    ******************** Update thread object direct interface  ********************
@@ -357,35 +324,12 @@ public: // Used by ResourceClient
   BitmapMetadata GetBitmapMetadata(ResourceId id);
 
   /**
-   * Get the mesh data.
-   * @note Used by update thread objects (SceneGraph::Mesh) only
-   * @param[in] id - the id of a MeshData resource.
-   * @return the mesh data or NULL if this resource isn't valid
-   */
-  Internal::SceneGraph::Mesh* GetMesh(ResourceId id);
-
-  /**
    * Returns the shader resource corresponding to the Id
    * @param[in] id - the id of a shader binary resource.
    * @return the shader binary resource data or NULL if it has not been loaded.
    */
   Integration::ShaderDataPtr GetShaderData(ResourceId id);
 
-  /**
-   * Check if current set of glyph requests on given atlas have finished loading
-   * @param[in] id Request Id of the text atlas texture
-   * @return true if the current set of glyph requests have all completed, false
-   * if there are outstanding glyph requests that haven't finished.
-   */
-  bool IsAtlasLoaded(ResourceId id);
-
-  /**
-   * Check the load status of a given atlas.
-   * @param[in] id Request Id of the text atlas texture
-   * @return LoadStatus
-   */
-  Integration::LoadStatus GetAtlasLoadStatus( ResourceId atlasId );
-
   /********************************************************************************
    ************************* ResourceCache Implementation  ************************
    ********************************************************************************/
@@ -414,18 +358,6 @@ public:
   /********************************************************************************
    ********************************* Private Methods  *****************************
    ********************************************************************************/
-private:
-  /**
-   * @param[in] id Resource id to clear
-   * @param[in] typePath Glyphs to be loaded, and cleared beforehand
-   */
-  void ClearRequestedGlyphArea( ResourceId id, const ResourceTypePath& typePath );
-
-  /**
-   * Sends loaded glyphs to texture atlas for uploading
-   * @param[in] glyphSet Loaded glyphs
-   */
-  void UploadGlyphsToTexture( const Integration::GlyphSet& glyphSet );
 
   /**
    * Sends notification messages for load sucess & failure,
@@ -463,7 +395,7 @@ private:
 // picked-up by the update thread in its main loop and executed on that in
 // submission order.
 
-inline void RequestLoadResourceMessage( EventToUpdate& eventToUpdate,
+inline void RequestLoadResourceMessage( EventThreadServices& eventThreadServices,
                                         ResourceManager& manager,
                                         ResourceId id,
                                         const ResourceTypePath& typePath,
@@ -472,13 +404,13 @@ inline void RequestLoadResourceMessage( EventToUpdate& eventToUpdate,
   typedef MessageValue3< ResourceManager, ResourceId, ResourceTypePath, Integration::LoadResourcePriority > LocalType;
 
   // Reserve some memory inside the message queue
-  unsigned int* slot = eventToUpdate.ReserveMessageSlot( sizeof( LocalType ), false );
+  unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ), false );
 
   // Construct message in the message queue memory; note that delete should not be called on the return value
   new (slot) LocalType( &manager, &ResourceManager::HandleLoadResourceRequest, id, typePath, priority );
 }
 
-inline void RequestDecodeResourceMessage( EventToUpdate& eventToUpdate,
+inline void RequestDecodeResourceMessage( EventThreadServices& eventThreadServices,
                                           ResourceManager& manager,
                                           const ResourceId id,
                                           /// We use typePath instead of the raw type for ownership and to enable copying of a concrete type.
@@ -489,13 +421,13 @@ inline void RequestDecodeResourceMessage( EventToUpdate& eventToUpdate,
   typedef MessageValue4< ResourceManager, ResourceId, ResourceTypePath, RequestBufferPtr, Integration::LoadResourcePriority > LocalType;
 
   // Reserve some memory inside the message queue
-  unsigned int* slot = eventToUpdate.ReserveMessageSlot( sizeof( LocalType ), false );
+  unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ), false );
 
   // Construct message in the message queue memory; note that delete should not be called on the return value
   new (slot) LocalType( &manager, &ResourceManager::HandleDecodeResourceRequest, id, typePath, buffer, priority );
 }
 
-inline void RequestAddBitmapImageMessage( EventToUpdate& eventToUpdate,
+inline void RequestAddBitmapImageMessage( EventThreadServices& eventThreadServices,
                                           ResourceManager& manager,
                                           ResourceId id,
                                           Integration::Bitmap* resourceData )
@@ -503,13 +435,13 @@ inline void RequestAddBitmapImageMessage( EventToUpdate& eventToUpdate,
   typedef MessageValue2< ResourceManager, ResourceId, Integration::BitmapPtr > LocalType;
 
   // Reserve some memory inside the message queue
-  unsigned int* slot = eventToUpdate.ReserveMessageSlot( sizeof( LocalType ) );
+  unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
 
   // Construct message in the message queue memory; note that delete should not be called on the return value
   new (slot) LocalType( &manager, &ResourceManager::HandleAddBitmapImageRequest, id, resourceData );
 }
 
-inline void RequestAddNativeImageMessage( EventToUpdate& eventToUpdate,
+inline void RequestAddNativeImageMessage( EventThreadServices& eventThreadServices,
                                           ResourceManager& manager,
                                           ResourceId id,
                                           NativeImageInterfacePtr resourceData )
@@ -517,29 +449,31 @@ inline void RequestAddNativeImageMessage( EventToUpdate& eventToUpdate,
   typedef MessageValue2< ResourceManager, ResourceId, NativeImageInterfacePtr > LocalType;
 
   // Reserve some memory inside the message queue
-  unsigned int* slot = eventToUpdate.ReserveMessageSlot( sizeof( LocalType ) );
+  unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
 
   // Construct message in the message queue memory; note that delete should not be called on the return value
   new (slot) LocalType( &manager, &ResourceManager::HandleAddNativeImageRequest, id, resourceData );
 }
 
-inline void RequestAddFrameBufferImageMessage( EventToUpdate& eventToUpdate,
+inline void RequestAddFrameBufferImageMessage( EventThreadServices& eventThreadServices,
                                                ResourceManager& manager,
                                                ResourceId id,
                                                unsigned int width,
                                                unsigned int height,
-                                               Pixel::Format pixelFormat )
+                                               Pixel::Format pixelFormat,
+                                               RenderBuffer::Format bufferFormat
+                                               )
 {
-  typedef MessageValue4< ResourceManager, ResourceId, unsigned int, unsigned int, Pixel::Format > LocalType;
+  typedef MessageValue5< ResourceManager, ResourceId, unsigned int, unsigned int, Pixel::Format, RenderBuffer::Format > LocalType;
 
   // Reserve some memory inside the message queue
-  unsigned int* slot = eventToUpdate.ReserveMessageSlot( sizeof( LocalType ) );
+  unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
 
   // Construct message in the message queue memory; note that delete should not be called on the return value
-  new (slot) LocalType( &manager, &ResourceManager::HandleAddFrameBufferImageRequest, id, width, height, pixelFormat );
+  new (slot) LocalType( &manager, &ResourceManager::HandleAddFrameBufferImageRequest, id, width, height, pixelFormat, bufferFormat );
 }
 
-inline void RequestAddFrameBufferImageMessage( EventToUpdate& eventToUpdate,
+inline void RequestAddFrameBufferImageMessage( EventThreadServices& eventThreadServices,
                                                ResourceManager& manager,
                                                ResourceId id,
                                                NativeImageInterfacePtr resourceData )
@@ -547,71 +481,30 @@ inline void RequestAddFrameBufferImageMessage( EventToUpdate& eventToUpdate,
   typedef MessageValue2< ResourceManager, ResourceId, NativeImageInterfacePtr > LocalType;
 
   // Reserve some memory inside the message queue
-  unsigned int* slot = eventToUpdate.ReserveMessageSlot( sizeof( LocalType ) );
+  unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
 
   // Construct message in the message queue memory; note that delete should not be called on the return value
   new (slot) LocalType( &manager, &ResourceManager::HandleAddFrameBufferImageRequest, id, resourceData );
 }
 
-inline void RequestAllocateTextureMessage(EventToUpdate& eventToUpdate,
-                                               ResourceManager& manager,
-                                               ResourceId id,
-                                               unsigned int width,
-                                               unsigned int height,
-                                               Pixel::Format pixelFormat)
+inline void RequestAllocateTextureMessage( EventThreadServices& eventThreadServices,
+                                           ResourceManager& manager,
+                                           ResourceId id,
+                                           unsigned int width,
+                                           unsigned int height,
+                                           Pixel::Format pixelFormat)
 {
   typedef MessageValue4< ResourceManager, ResourceId, unsigned int, unsigned int, Pixel::Format > LocalType;
 
   // Reserve some memory inside the message queue
-  unsigned int* slot = eventToUpdate.ReserveMessageSlot( sizeof( LocalType ) );
+  unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
 
   // Construct message in the message queue memory; note that delete should not be called on the return value
   new (slot) LocalType( &manager, &ResourceManager::HandleAllocateTextureRequest, id, width, height, pixelFormat );
 }
 
-inline void RequestUpdateTextureMessage(EventToUpdate& eventToUpdate,
-                                               ResourceManager& manager,
-                                               ResourceId id,
-                                               BitmapUploadArray uploadArray )
-{
-  typedef MessageValue2< ResourceManager, ResourceId, BitmapUploadArray > LocalType;
-
-  // Reserve some memory inside the message queue
-  unsigned int* slot = eventToUpdate.ReserveMessageSlot( sizeof( LocalType ) );
-
-  // Construct message in the message queue memory; note that delete should not be called on the return value
-  new (slot) LocalType( &manager, &ResourceManager::HandleUpdateTextureRequest, id, uploadArray );
-}
 
-inline void RequestAllocateMeshMessage( EventToUpdate& eventToUpdate,
-                                        ResourceManager& manager,
-                                        ResourceId id,
-                                        OwnerPointer<MeshData>& meshData )
-{
-  typedef MessageValue2< ResourceManager, ResourceId, OwnerPointer<MeshData> > LocalType;
-
-  // Reserve some memory inside the message queue
-  unsigned int* slot = eventToUpdate.ReserveMessageSlot( sizeof( LocalType ) );
-
-  // Construct message in the message queue memory; note that delete should not be called on the return value
-  new (slot) LocalType( &manager, &ResourceManager::HandleAllocateMeshRequest, id, meshData.Release() );
-}
-
-inline void RequestAllocateFontMessage( EventToUpdate& eventToUpdate,
-                                        ResourceManager& manager,
-                                        ResourceId id,
-                                        const std::string& familyNameAndStyle)
-{
-  typedef MessageValue2< ResourceManager, ResourceId, std::string > LocalType;
-
-  // Reserve some memory inside the message queue
-  unsigned int* slot = eventToUpdate.ReserveMessageSlot( sizeof( LocalType ) );
-
-  // Construct message in the message queue memory; note that delete should not be called on the return value
-  new (slot) LocalType( &manager, &ResourceManager::HandleAllocateFontRequest, id, familyNameAndStyle );
-}
-
-inline void RequestLoadShaderMessage( EventToUpdate& eventToUpdate,
+inline void RequestLoadShaderMessage( EventThreadServices& eventThreadServices,
                                       ResourceManager& manager,
                                       ResourceId id,
                                       const ResourceTypePath& typePath )
@@ -619,13 +512,13 @@ inline void RequestLoadShaderMessage( EventToUpdate& eventToUpdate,
   typedef MessageValue2< ResourceManager, ResourceId, ResourceTypePath > LocalType;
 
   // Reserve some memory inside the message queue
-  unsigned int* slot = eventToUpdate.ReserveMessageSlot( sizeof( LocalType ) );
+  unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
 
   // Construct message in the message queue memory; note that delete should not be called on the return value
   new (slot) LocalType( &manager, &ResourceManager::HandleLoadShaderRequest, id, typePath );
 }
 
-inline void RequestUpdateBitmapAreaMessage( EventToUpdate& eventToUpdate,
+inline void RequestUpdateBitmapAreaMessage( EventThreadServices& eventThreadServices,
                                             ResourceManager& manager,
                                             ResourceId id,
                                             const Dali::RectArea& area )
@@ -633,45 +526,45 @@ inline void RequestUpdateBitmapAreaMessage( EventToUpdate& eventToUpdate,
   typedef MessageValue2< ResourceManager, ResourceId, Dali::RectArea > LocalType;
 
   // Reserve some memory inside the message queue
-  unsigned int* slot = eventToUpdate.ReserveMessageSlot( sizeof( LocalType ), false );
+  unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ), false );
 
   // Construct message in the message queue memory; note that delete should not be called on the return value
   new (slot) LocalType( &manager, &ResourceManager::HandleUpdateBitmapAreaRequest, id, area );
 }
 
-inline void RequestUploadBitmapMessage( EventToUpdate& eventToUpdate,
+inline void RequestUploadBitmapMessage( EventThreadServices& eventThreadServices,
                                         ResourceManager& manager,
                                         ResourceId destId,
-                                        ResourceId srcId,
+                                        Integration::BitmapPtr bitmap,
                                         std::size_t xOffset,
                                         std::size_t yOffset )
 {
-  typedef MessageValue4< ResourceManager, ResourceId, ResourceId, std::size_t, std::size_t > LocalType;
+  typedef MessageValue4< ResourceManager, ResourceId, Integration::BitmapPtr , std::size_t, std::size_t > LocalType;
 
   // Reserve some memory inside the message queue
-  unsigned int* slot = eventToUpdate.ReserveMessageSlot( sizeof( LocalType ), false );
+  unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ), false );
 
   // Construct message in the message queue memory; note that delete should not be called on the return value
-  new (slot) LocalType( &manager, &ResourceManager::HandleUploadBitmapRequest, destId, srcId, xOffset, yOffset );
+  new (slot) LocalType( &manager, &ResourceManager::HandleUploadBitmapRequest, destId, bitmap, xOffset, yOffset );
 }
 
-inline void RequestUpdateMeshMessage( EventToUpdate& eventToUpdate,
-                                      ResourceManager& manager,
-                                      ResourceId id,
-                                      const Dali::MeshData& meshData,
-                                      ResourcePolicy::Discardable discardable )
+inline void RequestUploadBitmapMessage( EventThreadServices& eventThreadServices,
+                                        ResourceManager& manager,
+                                        ResourceId destId,
+                                        ResourceId srcId,
+                                        std::size_t xOffset,
+                                        std::size_t yOffset )
 {
-  typedef MessageDoubleBuffered2< ResourceManager, ResourceId, OwnerPointer< MeshData > > LocalType;
-  // Reserve some memory inside the message queue
-  unsigned int* slot = eventToUpdate.ReserveMessageSlot( sizeof( LocalType ) );
+  typedef MessageValue4< ResourceManager, ResourceId, ResourceId, std::size_t, std::size_t > LocalType;
 
-  MeshData* internalMeshData = new MeshData( meshData, discardable, false );
+  // Reserve some memory inside the message queue
+  unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ), false );
 
   // Construct message in the message queue memory; note that delete should not be called on the return value
-  new (slot) LocalType( &manager, &ResourceManager::HandleUpdateMeshRequest, id, internalMeshData );
+  new (slot) LocalType( &manager, &ResourceManager::HandleUploadBitmapRequest, destId, srcId, xOffset, yOffset );
 }
 
-inline void RequestReloadResourceMessage( EventToUpdate& eventToUpdate,
+inline void RequestReloadResourceMessage( EventThreadServices& eventThreadServices,
                                           ResourceManager& manager,
                                           ResourceId id,
                                           const ResourceTypePath& typePath,
@@ -681,13 +574,13 @@ inline void RequestReloadResourceMessage( EventToUpdate& eventToUpdate,
   typedef MessageValue4< ResourceManager, ResourceId, ResourceTypePath, Integration::LoadResourcePriority, bool > LocalType;
 
   // Reserve some memory inside the message queue
-  unsigned int* slot = eventToUpdate.ReserveMessageSlot( sizeof( LocalType ), false );
+  unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ), false );
 
   // Construct message in the message queue memory; note that delete should not be called on the return value
   new (slot) LocalType( &manager, &ResourceManager::HandleReloadResourceRequest, id, typePath, priority, resetFinishedStatus );
 }
 
-inline void RequestSaveResourceMessage( EventToUpdate& eventToUpdate,
+inline void RequestSaveResourceMessage( EventThreadServices& eventThreadServices,
                                         ResourceManager& manager,
                                         ResourceId id,
                                         const ResourceTypePath& typePath )
@@ -695,13 +588,13 @@ inline void RequestSaveResourceMessage( EventToUpdate& eventToUpdate,
   typedef MessageValue2< ResourceManager, ResourceId, ResourceTypePath > LocalType;
 
   // Reserve some memory inside the message queue
-  unsigned int* slot = eventToUpdate.ReserveMessageSlot( sizeof( LocalType ) );
+  unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
 
   // Construct message in the message queue memory; note that delete should not be called on the return value
   new (slot) LocalType( &manager, &ResourceManager::HandleSaveResourceRequest, id, typePath );
 }
 
-inline void RequestDiscardResourceMessage( EventToUpdate& eventToUpdate,
+inline void RequestDiscardResourceMessage( EventThreadServices& eventThreadServices,
                                            ResourceManager& manager,
                                            ResourceId id,
                                            Integration::ResourceTypeId typeId )
@@ -709,25 +602,23 @@ inline void RequestDiscardResourceMessage( EventToUpdate& eventToUpdate,
   typedef MessageValue2< ResourceManager, ResourceId, Integration::ResourceTypeId > LocalType;
 
   // Reserve some memory inside the message queue
-  unsigned int* slot = eventToUpdate.ReserveMessageSlot( sizeof( LocalType ) );
+  unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
 
   // Construct message in the message queue memory; note that delete should not be called on the return value
   new (slot) LocalType( &manager, &ResourceManager::HandleDiscardResourceRequest, id, typeId );
 }
 
-inline void RequestAtlasUpdateMessage( EventToUpdate& eventToUpdate,
-                                       ResourceManager& manager,
-                                       ResourceId id,
-                                       ResourceId atlasId,
-                                       Integration::LoadStatus loadStatus )
+inline void RequestCreateGlTextureMessage( EventThreadServices& eventThreadServices,
+                                           ResourceManager& manager,
+                                           ResourceId id )
 {
-  typedef MessageValue3< ResourceManager, ResourceId, ResourceId, Integration::LoadStatus > LocalType;
+  typedef MessageValue1< ResourceManager, ResourceId > LocalType;
 
   // Reserve some memory inside the message queue
-  unsigned int* slot = eventToUpdate.ReserveMessageSlot( sizeof( LocalType ) );
+  unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
 
   // Construct message in the message queue memory; note that delete should not be called on the return value
-  new (slot) LocalType( &manager, &ResourceManager::HandleAtlasUpdateRequest, id, atlasId, loadStatus );
+  new (slot) LocalType( &manager, &ResourceManager::HandleCreateGlTextureRequest, id );
 }
 
 } // namespace Internal