Merge branch 'devel/master' into tizen
[platform/core/uifw/dali-adaptor.git] / dali / internal / imaging / common / native-bitmap-buffer-impl.cpp
index d81bbd8..1741803 100644 (file)
@@ -23,7 +23,8 @@
 #include <dali/integration-api/bitmap.h>
 
 // INTERNAL HEADERS
-#include <dali/internal/graphics/gles20/gl-implementation.h>
+#include <dali/internal/graphics/gles/gl-implementation.h>
+#include <dali/internal/graphics/gles/egl-graphics.h>
 
 namespace Dali
 {
@@ -35,14 +36,18 @@ namespace Adaptor
 {
 
 NativeBitmapBuffer::NativeBitmapBuffer( Adaptor* adaptor, unsigned int width, unsigned int height, Pixel::Format pFormat )
-: mWidth(width),
+: mGlAbstraction( nullptr),
+  mWidth(width),
   mHeight(height),
   mPixelFormat(pFormat),
   mLastReadBuffer(NULL)
 {
   DALI_ASSERT_ALWAYS( adaptor );
   mBuffer = new Integration::LocklessBuffer( width * height * Pixel::GetBytesPerPixel(pFormat) );
-  mGlAbstraction = &(adaptor->GetGlAbstraction());
+
+  GraphicsInterface* graphics = &(adaptor->GetGraphicsInterface());
+  auto eglGraphics = static_cast<EglGraphics *>(graphics);
+  mGlAbstraction = &(eglGraphics->GetGlAbstraction());
 }
 
 NativeBitmapBuffer::~NativeBitmapBuffer()