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=c8e049c7132366a30fa5efa9fa7e5d8f2e466a99;hb=e8e185f7d90010214890c2cb78bdd52c732f63ba;hp=910098a842394490e49c88562d143e3656799799;hpb=126df2d0eaeae2c65f2935ec334dfa2414498996;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 910098a..c8e049c 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) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2018 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. @@ -34,7 +34,9 @@ #include #include #include -#include +#include +#include +#include namespace Dali @@ -55,13 +57,18 @@ static const int INITIAL_CONSUME_BUFFER_INDEX = 1; } PixmapRenderSurfaceEcoreX::PixmapRenderSurfaceEcoreX( Dali::PositionSize positionSize, Any surface, bool isTransparent ) -: mPosition( positionSize ), +: mGraphics( nullptr ), + mDisplayConnection( nullptr ), + mPosition( positionSize ), mRenderNotification( NULL ), mColorDepth( isTransparent ? COLOR_DEPTH_32 : COLOR_DEPTH_24 ), mOwnSurface( false ), mProduceBufferIndex( INITIAL_PRODUCE_BUFFER_INDEX ), mConsumeBufferIndex( INITIAL_CONSUME_BUFFER_INDEX ), - mThreadSynchronization(NULL) + mX11Pixmaps(), + mEglSurfaces(), + mThreadSynchronization( nullptr ), + mPixmapCondition() { for( int i = 0; i != BUFFER_COUNT; ++i ) { @@ -141,10 +148,11 @@ void PixmapRenderSurfaceEcoreX::GetDpi( unsigned int& dpiHorizontal, unsigned in dpiVertical = int( yres + 0.5f ); } -void PixmapRenderSurfaceEcoreX::InitializeGraphics( GraphicsInterface& graphics, Dali::DisplayConnection& displayConnection ) +void PixmapRenderSurfaceEcoreX::InitializeGraphics() { - mGraphics = &graphics; - mDisplayConnection = &displayConnection; + mGraphics = &mAdaptor->GetGraphicsInterface(); + mDisplayConnection = &mAdaptor->GetDisplayConnectionInterface(); + auto eglGraphics = static_cast(mGraphics); Internal::Adaptor::EglImplementation& eglImpl = eglGraphics->GetEglImplementation(); @@ -180,7 +188,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] ); } } @@ -302,9 +310,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()