X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fwindow-system%2Fubuntu-x11%2Fpixmap-render-surface-ecore-x.cpp;h=f54c3eafe0a356b12a673253303dec863e00f035;hb=0c135e9a6b2daf11a4d9cdcfc94aa53cc7fa8a2a;hp=03259eb7999671c7a91d098e267d58610aebfc50;hpb=1d86c6e649b87e3152ca5049cec6a9c7b96e987a;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/internal/window-system/ubuntu-x11/pixmap-render-surface-ecore-x.cpp b/dali/internal/window-system/ubuntu-x11/pixmap-render-surface-ecore-x.cpp index 03259eb..f54c3ea 100644 --- a/dali/internal/window-system/ubuntu-x11/pixmap-render-surface-ecore-x.cpp +++ b/dali/internal/window-system/ubuntu-x11/pixmap-render-surface-ecore-x.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,20 +22,19 @@ #include #include #include - #include // for damage notify #include // for damage notify - #include #include #include // INTERNAL INCLUDES -#include +#include +#include +#include +#include #include #include -#include - namespace Dali { @@ -79,6 +78,8 @@ PixmapRenderSurfaceEcoreX::PixmapRenderSurfaceEcoreX( Dali::PositionSize positio PixmapRenderSurfaceEcoreX::~PixmapRenderSurfaceEcoreX() { + DestroySurface(); + // release the surface if we own one if( mOwnSurface ) { @@ -146,10 +147,16 @@ void PixmapRenderSurfaceEcoreX::GetDpi( unsigned int& dpiHorizontal, unsigned in dpiVertical = int( yres + 0.5f ); } -void PixmapRenderSurfaceEcoreX::InitializeGraphics( GraphicsInterface& graphics, Dali::DisplayConnection& displayConnection ) +int PixmapRenderSurfaceEcoreX::GetOrientation() const { - mGraphics = &graphics; - mDisplayConnection = &displayConnection; + return 0; +} + +void PixmapRenderSurfaceEcoreX::InitializeGraphics() +{ + mGraphics = &mAdaptor->GetGraphicsInterface(); + mDisplayConnection = &mAdaptor->GetDisplayConnectionInterface(); + auto eglGraphics = static_cast(mGraphics); Internal::Adaptor::EglImplementation& eglImpl = eglGraphics->GetEglImplementation(); @@ -185,7 +192,7 @@ void PixmapRenderSurfaceEcoreX::DestroySurface() // need to cast to X handle as in 64bit system ECore handle is 32 bit whereas EGLnative and XWindow are 64 bit XPixmap pixmap = static_cast( mX11Pixmaps[i] ); eglImpl.MakeCurrent( EGLNativePixmapType( pixmap ), mEglSurfaces[i] ); - eglImpl.DestroySurface(); + eglImpl.DestroySurface( mEglSurfaces[i] ); } } @@ -307,9 +314,13 @@ void PixmapRenderSurfaceEcoreX::ReleaseLock() } } -RenderSurface::Type PixmapRenderSurfaceEcoreX::GetSurfaceType() +Integration::RenderSurface::Type PixmapRenderSurfaceEcoreX::GetSurfaceType() +{ + return Integration::RenderSurface::PIXMAP_RENDER_SURFACE; +} + +void PixmapRenderSurfaceEcoreX::MakeContextCurrent() { - return RenderSurface::PIXMAP_RENDER_SURFACE; } void PixmapRenderSurfaceEcoreX::CreateRenderable()