*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include <dali/integration-api/thread-synchronization-interface.h>
#include <dali/internal/system/common/trigger-event.h>
#include <dali/internal/window-system/common/display-connection.h>
#include <dali/integration-api/thread-synchronization-interface.h>
#include <dali/internal/system/common/trigger-event.h>
#include <dali/internal/window-system/common/display-connection.h>
}
PixmapRenderSurfaceEcoreX::PixmapRenderSurfaceEcoreX( Dali::PositionSize positionSize, Any surface, bool isTransparent )
}
PixmapRenderSurfaceEcoreX::PixmapRenderSurfaceEcoreX( Dali::PositionSize positionSize, Any surface, bool isTransparent )
mRenderNotification( NULL ),
mColorDepth( isTransparent ? COLOR_DEPTH_32 : COLOR_DEPTH_24 ),
mOwnSurface( false ),
mProduceBufferIndex( INITIAL_PRODUCE_BUFFER_INDEX ),
mConsumeBufferIndex( INITIAL_CONSUME_BUFFER_INDEX ),
mRenderNotification( NULL ),
mColorDepth( isTransparent ? COLOR_DEPTH_32 : COLOR_DEPTH_24 ),
mOwnSurface( false ),
mProduceBufferIndex( INITIAL_PRODUCE_BUFFER_INDEX ),
mConsumeBufferIndex( INITIAL_CONSUME_BUFFER_INDEX ),
- DALI_LOG_TRACE_METHOD( gPixmapRenderSurfaceLogFilter );
+ return 0;
+}
+
+void PixmapRenderSurfaceEcoreX::InitializeGraphics()
+{
+ mGraphics = &mAdaptor->GetGraphicsInterface();
+ mDisplayConnection = &mAdaptor->GetDisplayConnectionInterface();
for (int i = 0; i < BUFFER_COUNT; ++i)
{
// 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<XPixmap>( mX11Pixmaps[i] );
eglImpl.MakeCurrent( EGLNativePixmapType( pixmap ), mEglSurfaces[i] );
for (int i = 0; i < BUFFER_COUNT; ++i)
{
// 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<XPixmap>( mX11Pixmaps[i] );
eglImpl.MakeCurrent( EGLNativePixmapType( pixmap ), mEglSurfaces[i] );
-void PixmapRenderSurfaceEcoreX::PostRender( EglInterface& egl, Integration::GlAbstraction& glAbstraction, Dali::DisplayConnection* displayConnection, bool replacingSurface, bool resizingSurface )
+void PixmapRenderSurfaceEcoreX::PostRender( bool renderToFbo, bool replacingSurface, bool resizingSurface )
ConditionalWait::ScopedLock lock( mPixmapCondition );
mConsumeBufferIndex = __sync_fetch_and_xor( &mProduceBufferIndex, 1 ); // Swap buffer indexes.
ConditionalWait::ScopedLock lock( mPixmapCondition );
mConsumeBufferIndex = __sync_fetch_and_xor( &mProduceBufferIndex, 1 ); // Swap buffer indexes.
// 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<XPixmap>( mX11Pixmaps[mProduceBufferIndex] );
// 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<XPixmap>( mX11Pixmaps[mProduceBufferIndex] );
// make a fixes region as updated area
region = XFixesCreateRegion( display, &rect, 1 );
// make a fixes region as updated area
region = XFixesCreateRegion( display, &rect, 1 );
-RenderSurface::Type PixmapRenderSurfaceEcoreX::GetSurfaceType()
+Integration::RenderSurface::Type PixmapRenderSurfaceEcoreX::GetSurfaceType()
+{
+ return Integration::RenderSurface::PIXMAP_RENDER_SURFACE;
+}
+
+void PixmapRenderSurfaceEcoreX::MakeContextCurrent()