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=5ff47a6f7a839de3aa41ed379de5c4aea0e2a692;hb=refs%2Ftags%2Fsubmit%2Ftizen%2F20191008.070110;hp=03259eb7999671c7a91d098e267d58610aebfc50;hpb=d091f8632e8e6ec8cf03282c6cb12e3fc2e0e698;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 old mode 100644 new mode 100755 index 03259eb..5ff47a6 --- 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. @@ -35,6 +35,8 @@ #include #include #include +#include +#include namespace Dali @@ -79,6 +81,8 @@ PixmapRenderSurfaceEcoreX::PixmapRenderSurfaceEcoreX( Dali::PositionSize positio PixmapRenderSurfaceEcoreX::~PixmapRenderSurfaceEcoreX() { + DestroySurface(); + // release the surface if we own one if( mOwnSurface ) { @@ -146,10 +150,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 +{ + return 0; +} + +void PixmapRenderSurfaceEcoreX::InitializeGraphics() { - mGraphics = &graphics; - mDisplayConnection = &displayConnection; + mGraphics = &mAdaptor->GetGraphicsInterface(); + mDisplayConnection = &mAdaptor->GetDisplayConnectionInterface(); + auto eglGraphics = static_cast(mGraphics); Internal::Adaptor::EglImplementation& eglImpl = eglGraphics->GetEglImplementation(); @@ -185,7 +195,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] ); } } @@ -224,6 +234,15 @@ bool PixmapRenderSurfaceEcoreX::PreRender( bool ) return true; } +void PixmapRenderSurfaceEcoreX::SetDamagedRect( const Dali::DamagedRect& damagedRect, Dali::DamagedRect& mergedRect ) +{ +} + +int32_t PixmapRenderSurfaceEcoreX::GetBufferAge() +{ + return 0; +} + void PixmapRenderSurfaceEcoreX::PostRender( bool renderToFbo, bool replacingSurface, bool resizingSurface ) { auto eglGraphics = static_cast(mGraphics); @@ -307,9 +326,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()