[Tizen] Support to get raw pixel informations of framebuffer for old driver device
[platform/core/uifw/dali-adaptor.git] / dali / internal / graphics / gles-impl / egl-graphics-controller.cpp
index 8717f7f..1f8979f 100644 (file)
@@ -302,6 +302,21 @@ Graphics::UniquePtr<SyncObject> EglGraphicsController::CreateSyncObject(const Sy
   }
 }
 
+TextureProperties EglGraphicsController::GetTextureProperties(const Texture& texture)
+{
+  const GLES::Texture* glesTexture = static_cast<const GLES::Texture*>(&texture);
+  auto                 createInfo  = glesTexture->GetCreateInfo();
+
+  TextureProperties properties{};
+  properties.format       = createInfo.format;
+  properties.compressed   = glesTexture->IsCompressed();
+  properties.extent2D     = createInfo.size;
+  properties.nativeHandle = glesTexture->GetGLTexture();
+  //TODO: Skip format1, emulated, packed, directWriteAccessEnabled of TextureProperties for now
+
+  return properties;
+}
+
 const Graphics::Reflection& EglGraphicsController::GetProgramReflection(const Graphics::Program& program)
 {
   return static_cast<const Graphics::GLES::Program*>(&program)->GetReflection();
@@ -870,4 +885,9 @@ GLES::PipelineCache& EglGraphicsController::GetPipelineCache() const
   return *mPipelineCache;
 }
 
+void EglGraphicsController::CaptureRenderingResult(Graphics::Framebuffer& framebuffer, CallbackBase* capturedCallback, uint8_t* capturedBuffer)
+{
+  static_cast<GLES::Framebuffer*>(&framebuffer)->CaptureRenderingResult(capturedCallback, capturedBuffer);
+}
+
 } // namespace Dali::Graphics