#include <dali/internal/system/common/performance-interface-factory.h>
#include <dali/internal/adaptor/common/lifecycle-observer.h>
-#include <dali/internal/graphics/gles20/egl-graphics-factory.h>
-#include <dali/internal/graphics/gles20/egl-graphics.h> // Temporary until Core is abstracted
+#include <dali/internal/graphics/gles/egl-graphics-factory.h>
+#include <dali/internal/graphics/gles/egl-graphics.h> // Temporary until Core is abstracted
#include <dali/devel-api/text-abstraction/font-client.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/gles/gl-proxy-implementation.h>
+#include <dali/internal/graphics/gles/gl-implementation.h>
+#include <dali/internal/graphics/gles/egl-sync-implementation.h>
#include <dali/internal/graphics/common/egl-image-extensions.h>
#include <dali/internal/clipboard/common/clipboard-impl.h>
#include <dali/internal/graphics/common/vsync-monitor.h>
mCallbackManager = CallbackManager::New();
WindowPane defaultWindow = mWindowFrame.front();
+
+ DALI_ASSERT_DEBUG( defaultWindow.surface && "Surface not initialized" );
+
PositionSize size = defaultWindow.surface->GetPositionSize();
mGestureManager = new GestureManager(*this, Vector2(size.width, size.height), mCallbackManager, *mEnvironmentOptions);
mVSyncMonitor = new VSyncMonitor;
- if( defaultWindow.surface )
- {
- mDisplayConnection = Dali::DisplayConnection::New( *mGraphics, defaultWindow.surface->GetSurfaceType() );
- }
- else
- {
- mDisplayConnection = Dali::DisplayConnection::New( *mGraphics );
- }
+ mDisplayConnection = Dali::DisplayConnection::New( *mGraphics, defaultWindow.surface->GetSurfaceType() );
mThreadController = new ThreadController( *this, *mEnvironmentOptions );
newDefaultWindow.nativeWindow = nativeWindow;
newDefaultWindow.surface = &newSurface;
- // Must delete the old Window first before replacing it with the new one
WindowPane oldDefaultWindow = mWindowFrame.front();
- oldDefaultWindow.surface->DestroySurface();
// Update WindowFrame
std::vector<WindowPane>::iterator iter = mWindowFrame.begin();
// This method blocks until the render thread has completed the replace.
mThreadController->ReplaceSurface( newDefaultWindow.surface );
+
+ // Must delete the old Window only after the render thread has completed the replace
+ oldDefaultWindow.surface->DestroySurface();
+ oldDefaultWindow.surface = nullptr;
}
RenderSurface& Adaptor::GetSurface() const
mCore( nullptr ),
mThreadController( nullptr ),
mVSyncMonitor( nullptr ),
+ mGraphics( nullptr ),
mDisplayConnection( nullptr ),
+ mWindowFrame(),
mPlatformAbstraction( nullptr ),
mEventHandler( nullptr ),
mCallbackManager( nullptr ),
gThreadLocalAdaptor = this;
}
-// Stereoscopy
-
-void Adaptor::SetViewMode( ViewMode viewMode )
-{
- WindowPane defaultWindow = mWindowFrame.front();
- defaultWindow.surface->SetViewMode( viewMode );
-
- mCore->SetViewMode( viewMode );
-}
-
-ViewMode Adaptor::GetViewMode() const
-{
- return mCore->GetViewMode();
-}
-
-void Adaptor::SetStereoBase( float stereoBase )
-{
- mCore->SetStereoBase( stereoBase );
-}
-
-float Adaptor::GetStereoBase() const
-{
- return mCore->GetStereoBase();
-}
-
void Adaptor::SetRootLayoutDirection( std::string locale )
{
Dali::Stage stage = Dali::Stage::GetCurrent();