[Tizen] Make possible to capture on the old driver devices.
[platform/core/uifw/dali-core.git] / dali / internal / update / manager / update-manager.h
index 73e0f38..0417ff3 100644 (file)
@@ -605,6 +605,12 @@ public:
   void AttachDepthStencilTextureToFrameBuffer( Render::FrameBuffer* frameBuffer, Render::Texture* texture, uint32_t mipmapLevel );
 
   /**
+   * Request to capture rendered result
+   * @param[in] frameBuffer The FrameBuffer
+   */
+  void CaptureRenderingResult(Render::FrameBuffer* frameBuffer);
+
+  /**
    * This is called when the surface of the scene has been replaced.
    * @param[in] scene The scene.
    */
@@ -1467,6 +1473,17 @@ inline void AttachDepthStencilTextureToFrameBuffer( UpdateManager& manager, Rend
   new (slot) LocalType( &manager, &UpdateManager::AttachDepthStencilTextureToFrameBuffer, &frameBuffer, texture, mipmapLevel );
 }
 
+inline void CaptureRenderingResult(UpdateManager& manager, Render::FrameBuffer& frameBuffer)
+{
+  using LocalType = MessageValue1<UpdateManager, Render::FrameBuffer*>;
+
+  // Reserve some memory inside the message queue
+  uint32_t* slot = manager.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, &UpdateManager::CaptureRenderingResult, &frameBuffer);
+}
+
 inline void SetDepthIndicesMessage( UpdateManager& manager, OwnerPointer< NodeDepths >& nodeDepths )
 {
   using LocalType = MessageValue1<UpdateManager, OwnerPointer<NodeDepths> >;