#include <dali/devel-api/actors/actor-devel.h>
#include <dali/integration-api/debug.h>
#include <dali/integration-api/core.h>
-#include <dali/integration-api/context-notifier.h>
#include <dali/integration-api/profiling.h>
#include <dali/integration-api/input-options.h>
#include <dali/integration-api/events/touch-event-integ.h>
#include <dali/internal/accessibility/common/accessibility-adaptor-impl.h>
#include <dali/internal/input/common/gesture-manager.h>
#include <dali/internal/window-system/common/event-handler.h>
-#include <dali/internal/graphics/gles20/gl-proxy-implementation.h>
-#include <dali/internal/graphics/gles20/gl-implementation.h>
-#include <dali/internal/graphics/gles20/egl-sync-implementation.h>
#include <dali/internal/graphics/common/egl-image-extensions.h>
#include <dali/internal/graphics/gles20/egl-factory.h>
+#include <dali/internal/graphics/vulkan/x11/vk-surface-xlib2xcb.h>
#include <dali/internal/clipboard/common/clipboard-impl.h>
#include <dali/internal/graphics/common/vsync-monitor.h>
#include <dali/internal/system/common/object-profiler.h>
mGestureManager = new GestureManager(*this, Vector2(size.width, size.height), mCallbackManager, *mEnvironmentOptions);
- if( mEnvironmentOptions->GetGlesCallTime() > 0 )
- {
- mGLES = new GlProxyImplementation( *mEnvironmentOptions );
- }
- else
- {
- mGLES = new GlImplementation();
- }
-
const Integration::DepthBufferAvailable depthBufferAvailable = static_cast< Integration::DepthBufferAvailable >( mEnvironmentOptions->DepthBufferRequired() );
const Integration::StencilBufferAvailable stencilBufferAvailable = static_cast< Integration::StencilBufferAvailable >( mEnvironmentOptions->StencilBufferRequired() );
mEglFactory = new EglFactory( mEnvironmentOptions->GetMultiSamplingLevel(), depthBufferAvailable, stencilBufferAvailable );
- EglSyncImplementation* eglSyncImpl = mEglFactory->GetSyncImplementation();
-
- // todo: add somewhere MakeUnique to make it cleaner
+ // @todo: add somewhere MakeUnique to make it cleaner
mGraphics = std::unique_ptr<Dali::Integration::Graphics::Graphics>(
new Dali::Integration::Graphics::Graphics()
);
- // todo: surface shouldn't really be create here :((((
+ // @todo: surface shouldn't really be create here :((((
auto xlibSurface = std::unique_ptr<Dali::Graphics::Vulkan::VkSurfaceXlib2Xcb>(
new Dali::Graphics::Vulkan::VkSurfaceXlib2Xcb( *mSurface )
);
mGraphics->Create( std::move(xlibSurface) );
- mCore = Integration::Core::New( *this, *mPlatformAbstraction, *mGraphics, *mGLES, *eglSyncImpl, *mGestureManager, dataRetentionPolicy,
+ mCore = Integration::Core::New( *this,
+ *mPlatformAbstraction,
+ *mGraphics,
+ *mGestureManager,
+ dataRetentionPolicy ,
( 0u != mEnvironmentOptions->GetRenderToFboInterval() ) ? Integration::RenderToFrameBuffer::TRUE : Integration::RenderToFrameBuffer::FALSE,
depthBufferAvailable,
stencilBufferAvailable );
delete mCore;
delete mEglFactory;
- delete mGLES;
delete mGestureManager;
delete mPlatformAbstraction;
delete mCallbackManager;
}
}
-void Adaptor::ContextLost()
-{
- mCore->GetContextNotifier()->NotifyContextLost(); // Inform stage
-}
-
-void Adaptor::ContextRegained()
-{
- // Inform core, so that texture resources can be reloaded
- mCore->RecoverFromContextLoss();
-
- mCore->GetContextNotifier()->NotifyContextRegained(); // Inform stage
-}
-
void Adaptor::FeedTouchPoint( TouchPoint& point, int timeStamp )
{
mEventHandler->FeedTouchPoint( point, timeStamp );
return *mEglFactory;
}
-Integration::GlAbstraction& Adaptor::GetGlAbstraction() const
-{
- DALI_ASSERT_DEBUG( mGLES && "GLImplementation not created" );
- return *mGLES;
-}
-
-Dali::Integration::Graphics::Graphics& Adaptor::GetGraphics() const
+Integration::Graphics::Graphics& Adaptor::GetGraphics() const
{
return *mGraphics;
}
return *mPlatformAbstraction;
}
-Dali::Integration::GlAbstraction& Adaptor::GetGlesInterface()
-{
- return *mGLES;
-}
-
TriggerEventInterface& Adaptor::GetProcessCoreEventsTrigger()
{
return *mNotificationTrigger;
mCore( NULL ),
mThreadController( NULL ),
mVSyncMonitor( NULL ),
- mGLES( NULL ),
- mGlSync( NULL ),
mEglFactory( NULL ),
mNativeWindow( nativeWindow ),
mSurface( surface ),