[Tizen] Revert "Support multiple window rendering"
authorSeoyeon Kim <seoyeon2.kim@samsung.com>
Tue, 12 Mar 2019 05:24:35 +0000 (14:24 +0900)
committerSeoyeon Kim <seoyeon2.kim@samsung.com>
Tue, 12 Mar 2019 05:24:48 +0000 (14:24 +0900)
This reverts commit e8e185f7d90010214890c2cb78bdd52c732f63ba.

Change-Id: Ib1bc05679246aaa0deaa3cd571d95ab232548a74

50 files changed:
automated-tests/src/dali-adaptor-internal/CMakeLists.txt
automated-tests/src/dali-adaptor/CMakeLists.txt
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-application.cpp
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-application.h
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-render-surface.cpp [deleted file]
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-render-surface.h [deleted file]
automated-tests/src/dali-platform-abstraction/CMakeLists.txt
dali/devel-api/adaptor-framework/window-devel.cpp
dali/devel-api/adaptor-framework/window-devel.h
dali/integration-api/adaptor.h
dali/integration-api/egl-interface.h
dali/integration-api/file.list
dali/integration-api/native-render-surface.h
dali/integration-api/render-surface.h [moved from dali/integration-api/render-surface-interface.h with 59% similarity]
dali/internal/adaptor/common/adaptor-impl.cpp
dali/internal/adaptor/common/adaptor-impl.h
dali/internal/adaptor/common/adaptor-internal-services.h
dali/internal/adaptor/common/adaptor.cpp
dali/internal/adaptor/common/application-impl.cpp
dali/internal/adaptor/common/combined-update-render-controller.cpp
dali/internal/adaptor/common/combined-update-render-controller.h
dali/internal/adaptor/common/thread-controller-interface.h
dali/internal/adaptor/tizen-wayland/framework-tizen.cpp
dali/internal/graphics/gles/egl-graphics.cpp
dali/internal/graphics/gles/egl-implementation.cpp
dali/internal/graphics/gles/egl-implementation.h
dali/internal/input/tizen-wayland/input-method-context-impl-ecore-wl.cpp
dali/internal/system/common/thread-controller.cpp
dali/internal/system/common/thread-controller.h
dali/internal/window-system/common/display-connection-impl.h
dali/internal/window-system/common/display-connection.cpp
dali/internal/window-system/common/display-connection.h
dali/internal/window-system/common/event-handler.cpp
dali/internal/window-system/common/event-handler.h
dali/internal/window-system/common/native-render-surface-factory.cpp
dali/internal/window-system/common/pixmap-render-surface.h
dali/internal/window-system/common/window-impl.cpp
dali/internal/window-system/common/window-impl.h
dali/internal/window-system/common/window-render-surface.cpp
dali/internal/window-system/common/window-render-surface.h
dali/internal/window-system/tizen-wayland/display-connection-impl-ecore-wl.cpp
dali/internal/window-system/tizen-wayland/display-connection-impl-ecore-wl.h
dali/internal/window-system/tizen-wayland/native-render-surface-ecore-wl.cpp
dali/internal/window-system/tizen-wayland/native-render-surface-ecore-wl.h
dali/internal/window-system/ubuntu-x11/display-connection-impl-x.cpp
dali/internal/window-system/ubuntu-x11/display-connection-impl-x.h
dali/internal/window-system/ubuntu-x11/pixmap-render-surface-ecore-x.cpp
dali/internal/window-system/ubuntu-x11/pixmap-render-surface-ecore-x.h
dali/public-api/adaptor-framework/window.cpp
dali/public-api/adaptor-framework/window.h

index ea46563..f60e70d 100644 (file)
@@ -31,7 +31,6 @@ LIST(APPEND TC_SOURCES
     ../dali-adaptor/dali-test-suite-utils/test-native-image.cpp
     ../dali-adaptor/dali-test-suite-utils/test-platform-abstraction.cpp
     ../dali-adaptor/dali-test-suite-utils/test-render-controller.cpp
-    ../dali-adaptor/dali-test-suite-utils/test-render-surface.cpp
     ../dali-adaptor/dali-test-suite-utils/test-trace-call-stack.cpp
     ../dali-adaptor/dali-test-suite-utils/adaptor-test-adaptor-impl.cpp
 )
index f2b10e6..41cc886 100644 (file)
@@ -33,7 +33,6 @@ LIST(APPEND TC_SOURCES
     dali-test-suite-utils/test-native-image.cpp
     dali-test-suite-utils/test-platform-abstraction.cpp
     dali-test-suite-utils/test-render-controller.cpp
-    dali-test-suite-utils/test-render-surface.cpp
     dali-test-suite-utils/test-trace-call-stack.cpp
     dali-test-suite-utils/adaptor-test-adaptor-impl.cpp
 )
index 1562d27..c953f50 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019 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.
@@ -54,6 +54,8 @@ void TestApplication::Initialize()
                                         Integration::StencilBufferAvailable::TRUE );
 
   mCore->ContextCreated();
+  mCore->SurfaceResized( mSurfaceWidth, mSurfaceHeight );
+  mCore->SetDpi( mDpi.x, mDpi.y );
 
   Dali::Integration::Log::LogFunction logFunction(&TestApplication::LogMessage);
   Dali::Integration::Log::InstallLogFunction(logFunction);
@@ -63,22 +65,12 @@ void TestApplication::Initialize()
 
   Dali::Integration::Trace::LogContext( true, "Test" );
 
-  mRenderSurface = new TestRenderSurface( Dali::PositionSize( 0, 0, mSurfaceWidth, mSurfaceHeight ) );
-  mScene = Dali::Integration::Scene::New( Vector2( static_cast<float>( mSurfaceWidth ), static_cast<float>( mSurfaceHeight ) ) );
-  mScene.SetSurface( *mRenderSurface );
-
-  mScene.SetDpi( Vector2( static_cast<float>( mDpi.x ), static_cast<float>( mDpi.y ) ) );
-
-  mCore->SurfaceResized( mRenderSurface );
-
   mCore->SceneCreated();
-  mCore->Initialize();
 }
 
 TestApplication::~TestApplication()
 {
   Dali::Integration::Log::UninstallLogFunction();
-  delete mRenderSurface;
   delete mCore;
 }
 
@@ -157,6 +149,19 @@ void TestApplication::SendNotification()
   mCore->ProcessEvents();
 }
 
+void TestApplication::SetSurfaceWidth( uint32_t width, uint32_t height )
+{
+  mSurfaceWidth = width;
+  mSurfaceHeight = height;
+
+  mCore->SurfaceResized( mSurfaceWidth, mSurfaceHeight );
+}
+
+void TestApplication::SetTopMargin( uint32_t margin )
+{
+  mCore->SetTopMargin( margin );
+}
+
 void TestApplication::DoUpdate( uint32_t intervalMilliseconds, const char* location )
 {
   if( GetUpdateStatus() == 0 &&
index fc2929c..d1e042d 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_TEST_APPLICATION_H__
 
 /*
- * Copyright (c) 2019 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.
 #include "test-gl-sync-abstraction.h"
 #include "test-gl-abstraction.h"
 #include "test-render-controller.h"
-#include "test-render-surface.h"
 #include <dali/public-api/common/dali-common.h>
 #include <dali/integration-api/resource-policies.h>
 #include <dali/integration-api/trace.h>
-#include <dali/integration-api/scene.h>
 
 namespace Dali
 {
@@ -71,6 +69,8 @@ public:
   TestGestureManager& GetGestureManager();
   void ProcessEvent(const Integration::Event& event);
   void SendNotification();
+  void SetSurfaceWidth( uint32_t width, unsigned height );
+  void SetTopMargin( uint32_t margin );
   bool Render( uint32_t intervalMilliseconds = DEFAULT_RENDER_INTERVAL, const char* location=NULL );
   uint32_t GetUpdateStatus();
   bool UpdateOnly( uint32_t intervalMilliseconds = DEFAULT_RENDER_INTERVAL );
@@ -83,11 +83,6 @@ public:
     mLoggingEnabled = enabled;
   }
 
-  Integration::Scene GetScene() const
-  {
-    return mScene;
-  }
-
 private:
   void DoUpdate( uint32_t intervalMilliseconds, const char* location=NULL );
 
@@ -97,13 +92,11 @@ protected:
   TestGlAbstraction         mGlAbstraction;
   TestGlSyncAbstraction     mGlSyncAbstraction;
   TestGestureManager        mGestureManager;
-  TestRenderSurface*        mRenderSurface;
 
   Integration::UpdateStatus mStatus;
   Integration::RenderStatus mRenderStatus;
 
   Integration::Core* mCore;
-  Dali::Integration::Scene mScene;
 
   uint32_t mSurfaceWidth;
   uint32_t mSurfaceHeight;
diff --git a/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-render-surface.cpp b/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-render-surface.cpp
deleted file mode 100644 (file)
index 332d77e..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include "test-render-surface.h"
-
-namespace Dali
-{
-
-TestRenderSurface::TestRenderSurface( Dali::PositionSize positionSize )
-: mPositionSize( positionSize ),
-  mBackgroundColor()
-{
-}
-
-TestRenderSurface::~TestRenderSurface()
-{
-}
-
-Dali::PositionSize TestRenderSurface::GetPositionSize() const
-{
-  return mPositionSize;
-};
-
-void TestRenderSurface::GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical )
-{
-  dpiHorizontal = dpiVertical = 96;
-};
-
-void TestRenderSurface::InitializeGraphics()
-{
-}
-
-void TestRenderSurface::CreateSurface()
-{
-}
-
-void TestRenderSurface::DestroySurface()
-{
-}
-
-bool TestRenderSurface::ReplaceGraphicsSurface()
-{
-  return false;
-}
-
-void TestRenderSurface::MoveResize( Dali::PositionSize positionSize )
-{
-  mPositionSize = positionSize;
-}
-
-void TestRenderSurface::StartRender()
-{
-}
-
-bool TestRenderSurface::PreRender( bool resizingSurface )
-{
-  return true;
-}
-
-void TestRenderSurface::PostRender( bool renderToFbo, bool replacingSurface, bool resizingSurface )
-{
-}
-
-void TestRenderSurface::StopRender()
-{
-}
-
-void TestRenderSurface::ReleaseLock()
-{
-}
-
-Dali::Integration::RenderSurface::Type TestRenderSurface::GetSurfaceType()
-{
-  return WINDOW_RENDER_SURFACE;
-}
-
-void TestRenderSurface::MakeContextCurrent()
-{
-}
-
-Integration::DepthBufferAvailable TestRenderSurface::GetDepthBufferRequired()
-{
-  return Integration::DepthBufferAvailable::TRUE;
-}
-
-Integration::StencilBufferAvailable TestRenderSurface::GetStencilBufferRequired()
-{
-  return Integration::StencilBufferAvailable::TRUE;
-}
-
-void TestRenderSurface::SetBackgroundColor( Vector4 color )
-{
-  mBackgroundColor = color;
-}
-
-Vector4 TestRenderSurface::GetBackgroundColor()
-{
-  return mBackgroundColor;
-}
-
-} // Namespace dali
diff --git a/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-render-surface.h b/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-render-surface.h
deleted file mode 100644 (file)
index fba89c2..0000000
+++ /dev/null
@@ -1,155 +0,0 @@
-#ifndef TEST_REENDER_SURFACE_H
-#define TEST_REENDER_SURFACE_H
-
-/*
- * 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// INTERNAL INCLUDES
-#include <dali/public-api/common/dali-common.h>
-#include <dali/integration-api/render-surface.h>
-
-namespace Dali
-{
-
-/**
- * Concrete implementation of the RenderSurface class.
- */
-class DALI_CORE_API TestRenderSurface : public Dali::Integration::RenderSurface
-{
-public:
-
-  /**
-   * @copydoc Dali::Integration::RenderSurface::RenderSurface
-   */
-  TestRenderSurface( Dali::PositionSize positionSize );
-
-  /**
-   * @copydoc Dali::Integration::RenderSurface::~RenderSurface
-   */
-  virtual ~TestRenderSurface();
-
-  /**
-   * @copydoc Dali::Integration::RenderSurface::GetPositionSize
-   */
-  virtual Dali::PositionSize GetPositionSize() const;
-
-  /**
-   * @copydoc Dali::Integration::RenderSurface::GetDpi
-   */
-  virtual void GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical );
-
-  /**
-   * @copydoc Dali::Integration::RenderSurface::InitializeGraphics
-   */
-  virtual void InitializeGraphics();
-
-  /**
-   * @copydoc Dali::Integration::RenderSurface::CreateSurface
-   */
-  virtual void CreateSurface();
-
-  /**
-   * @copydoc Dali::Integration::RenderSurface::DestroySurface
-   */
-  virtual void DestroySurface();
-
-  /**
-   * @copydoc Dali::Integration::RenderSurface::ReplaceGraphicsSurface
-   */
-  virtual bool ReplaceGraphicsSurface();
-
-  /**
-   * @copydoc Dali::Integration::RenderSurface::MoveResize
-   */
-  virtual void MoveResize( Dali::PositionSize positionSize );
-
-  /**
-   * @copydoc Dali::Integration::RenderSurface::StartRender
-   */
-  virtual void StartRender();
-
-  /**
-   * @copydoc Dali::Integration::RenderSurface::PreRender
-   */
-  virtual bool PreRender( bool resizingSurface );
-
-  /**
-   * @copydoc Dali::Integration::RenderSurface::PostRender
-   */
-  virtual void PostRender( bool renderToFbo, bool replacingSurface, bool resizingSurface );
-
-  /**
-   * @copydoc Dali::Integration::RenderSurface::StopRender
-   */
-  virtual void StopRender();
-
-  /**
-   * @copydoc Dali::Integration::RenderSurface::ReleaseLock
-   */
-  virtual void ReleaseLock();
-
-  /**
-   * @copydoc Dali::Integration::RenderSurface::GetSurfaceType
-   */
-  virtual Dali::Integration::RenderSurface::Type GetSurfaceType();
-
-  /**
-   * @copydoc Dali::Integration::RenderSurface::MakeContextCurrent
-   */
-  virtual void MakeContextCurrent();
-
-  /**
-   * @copydoc Dali::Integration::RenderSurface::GetDepthBufferRequired
-   */
-  virtual Integration::DepthBufferAvailable GetDepthBufferRequired();
-
-  /**
-   * @copydoc Dali::Integration::RenderSurface::GetStencilBufferRequired
-   */
-  virtual Integration::StencilBufferAvailable GetStencilBufferRequired();
-
-  /**
-   * @copydoc Dali::Integration::RenderSurface::SetBackgroundColor
-   */
-  virtual void SetBackgroundColor( Vector4 color );
-
-  /**
-   * @copydoc Dali::Integration::RenderSurface::GetBackgroundColor
-   */
-  virtual Vector4 GetBackgroundColor();
-
-private:
-
-  /**
-   * @brief Undefined copy constructor. RenderSurface cannot be copied
-   */
-  TestRenderSurface( const TestRenderSurface& rhs );
-
-  /**
-   * @brief Undefined assignment operator. RenderSurface cannot be copied
-   */
-  TestRenderSurface& operator=( const TestRenderSurface& rhs );
-
-private:
-
-  Dali::PositionSize mPositionSize;
-  Vector4 mBackgroundColor;                                     ///< The background color of the surface
-};
-
-} // Dali
-
-#endif
index be00390..6ad89b6 100644 (file)
@@ -21,7 +21,6 @@ LIST(APPEND TC_SOURCES
     ../dali-adaptor/dali-test-suite-utils/test-native-image.cpp
     ../dali-adaptor/dali-test-suite-utils/test-platform-abstraction.cpp
     ../dali-adaptor/dali-test-suite-utils/test-render-controller.cpp
-    ../dali-adaptor/dali-test-suite-utils/test-render-surface.cpp
     ../dali-adaptor/dali-test-suite-utils/test-trace-call-stack.cpp
     ../dali-adaptor/dali-test-suite-utils/adaptor-test-adaptor-impl.cpp
     tct-dali-platform-abstraction-core.cpp
index a2a1246..f14bc8d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019 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.
@@ -30,41 +30,6 @@ void SetPositionSize( Window window, PositionSize positionSize )
   GetImplementation( window ).SetPositionSize( positionSize );
 }
 
-void Add( Window window, Dali::Actor actor )
-{
-  GetImplementation( window ).Add( actor );
-}
-
-void Remove( Window window, Dali::Actor actor )
-{
-  GetImplementation( window ).Remove( actor );
-}
-
-void SetBackgroundColor( Window window, Vector4 color )
-{
-  GetImplementation( window ).SetBackgroundColor( color );
-}
-
-Vector4 GetBackgroundColor( Window window )
-{
-  return GetImplementation( window ).GetBackgroundColor();
-}
-
-Dali::Layer GetRootLayer( Window window )
-{
-  return GetImplementation( window ).GetRootLayer();
-}
-
-uint32_t GetLayerCount( Window window )
-{
-  return GetImplementation( window ).GetLayerCount();
-}
-
-Dali::Layer GetLayer( Window window, uint32_t depth )
-{
-  return GetImplementation( window ).GetLayer( depth );
-}
-
 } // namespace DevelWindow
 
 } // namespace Dali
index eec41b7..9ed8a18 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_WINDOW_DEVEL_H
 
 /*
- * Copyright (c) 2019 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.
@@ -35,71 +35,6 @@ namespace DevelWindow
  */
 DALI_ADAPTOR_API void SetPositionSize( Window window, PositionSize positionSize );
 
-/**
- * @brief Adds a child Actor to the Window.
- *
- * The child will be referenced.
- * @param[in] window The window instance
- * @param[in] actor The child
- * @pre The actor has been initialized.
- * @pre The actor does not have a parent.
- */
-DALI_ADAPTOR_API void Add( Window window, Dali::Actor actor );
-
-/**
- * @brief Removes a child Actor from the Window.
- *
- * The child will be unreferenced.
- * @param[in] window The window instance
- * @param[in] actor The child
- * @pre The actor has been added to the stage.
- */
-DALI_ADAPTOR_API void Remove( Window window, Dali::Actor actor );
-
-/**
- * @brief Sets the background color of the window.
- *
- * @param[in] window The window instance
- * @param[in] color The new background color
- */
-DALI_ADAPTOR_API void SetBackgroundColor( Window window, Vector4 color );
-
-/**
- * @brief Gets the background color of the surface.
- *
- * @param[in] window The window instance
- * @return The background color
- */
-DALI_ADAPTOR_API Vector4 GetBackgroundColor( Window window );
-
-/**
- * @brief Returns the Scene's Root Layer.
- *
- * @param[in] window The window instance
- * @return The root layer
- */
-DALI_ADAPTOR_API Dali::Layer GetRootLayer( Window window );
-
-/**
- * @brief Queries the number of on-stage layers.
- *
- * Note that a default layer is always provided (count >= 1).
- * @param[in] window The window instance
- * @return The number of layers
- */
-DALI_ADAPTOR_API uint32_t GetLayerCount( Window window );
-
-/**
- * @brief Retrieves the layer at a specified depth.
- *
- * @param[in] window The window instance
- * @param[in] depth The depth
- * @return The layer found at the given depth
- * @pre Depth is less than layer count; see GetLayerCount().
- */
-DALI_ADAPTOR_API Dali::Layer GetLayer( Window window, uint32_t depth );
-
-
 } // namespace DevelWindow
 
 } // namespace Dali
index 04f9429..14ff203 100755 (executable)
@@ -41,7 +41,7 @@
 namespace Dali
 {
 
-class RenderSurfaceInterface;
+class RenderSurface;
 
 namespace Internal
 {
@@ -141,7 +141,7 @@ public:
    * @param[in] surface The surface to draw onto
    * @return a reference to the adaptor handle
    */
-  static Adaptor& New( Any nativeWindow, const Dali::RenderSurfaceInterface& surface );
+  static Adaptor& New( Any nativeWindow, const Dali::RenderSurface& surface );
 
   /**
    * @brief Create a new adaptor using render surface.
@@ -151,7 +151,7 @@ public:
    * @param[in] configuration The context loss configuration.
    * @return a reference to the adaptor handle
    */
-  static Adaptor& New( Any nativeWindow, const Dali::RenderSurfaceInterface& surface, Configuration::ContextLoss configuration = Configuration::APPLICATION_DOES_NOT_HANDLE_CONTEXT_LOSS);
+  static Adaptor& New( Any nativeWindow, const Dali::RenderSurface& surface, Configuration::ContextLoss configuration = Configuration::APPLICATION_DOES_NOT_HANDLE_CONTEXT_LOSS);
 
   /**
    * @brief Virtual Destructor.
@@ -221,14 +221,14 @@ public:
    * @param[in] nativeWindow native window handle
    * @param[in] surface to use
    */
-  void ReplaceSurface( Any nativeWindow, Dali::RenderSurfaceInterface& surface );
+  void ReplaceSurface( Any nativeWindow, Dali::RenderSurface& surface );
 
   /**
    * @brief Get the render surface the adaptor is using to render to.
    *
    * @return reference to current render surface
    */
-  Dali::RenderSurfaceInterface& GetSurface();
+  RenderSurface& GetSurface();
 
   /**
    * @brief Gets native window handle
index 823cfa6..5208501 100644 (file)
@@ -18,9 +18,6 @@
  *
  */
 
-// EXTERNAL INCLUDES
-#include <EGL/egl.h>
-
 namespace Dali
 {
 
@@ -45,7 +42,7 @@ public:
   /**
    * Make the OpenGL context current
    */
-  virtual void MakeContextCurrent( EGLSurface eglSurface, EGLContext eglContext ) = 0;
+  virtual void MakeContextCurrent() = 0;
 
   /**
    * Terminate GL
@@ -55,12 +52,12 @@ public:
   /**
    * Performs an OpenGL swap buffers command
    */
-  virtual void SwapBuffers( EGLSurface& eglSurface ) = 0;
+  virtual void SwapBuffers() = 0;
 
   /**
    * Performs an OpenGL copy buffers command
    */
-  virtual void CopyBuffers( EGLSurface& eglSurface ) = 0;
+  virtual void CopyBuffers() = 0;
 
   /**
    * Performs an EGL wait GL command
index 40f91cf..d091cf0 100755 (executable)
@@ -4,7 +4,7 @@ adaptor_integration_api_header_files = \
   $(adaptor_integration_api_dir)/log-factory-interface.h \
   $(adaptor_integration_api_dir)/native-render-surface.h \
   $(adaptor_integration_api_dir)/native-render-surface-factory.h \
-  $(adaptor_integration_api_dir)/render-surface-interface.h \
+  $(adaptor_integration_api_dir)/render-surface.h \
   $(adaptor_integration_api_dir)/thread-synchronization-interface.h \
   $(adaptor_integration_api_dir)/trigger-event-interface.h \
   $(adaptor_integration_api_dir)/trigger-event-factory-interface.h \
index 530468d..bbd5e9b 100644 (file)
 
 // INTERNAL INCLUDES
 #include <dali/public-api/dali-adaptor-common.h>
-
 #ifdef DALI_ADAPTOR_COMPILATION
 #include <dali/integration-api/egl-interface.h>
-#include <dali/integration-api/render-surface-interface.h>
+#include <dali/integration-api/render-surface.h>
 #else
 #include <dali/integration-api/adaptors/egl-interface.h>
-#include <dali/integration-api/adaptors/render-surface-interface.h>
+#include <dali/integration-api/adaptors/render-surface.h>
 #endif
 
 namespace Dali
@@ -37,7 +36,7 @@ class TriggerEventInterface;
 /**
  * Native interface of render surface.
  */
-class DALI_ADAPTOR_API NativeRenderSurface : public Dali::RenderSurfaceInterface
+class DALI_ADAPTOR_API NativeRenderSurface : public Dali::RenderSurface
 {
 public:
 
similarity index 59%
rename from dali/integration-api/render-surface-interface.h
rename to dali/integration-api/render-surface.h
index ad672ca..edb9022 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef DALI_RENDER_SURFACE_INTERFACE_H
-#define DALI_RENDER_SURFACE_INTERFACE_H
+#ifndef DALI_RENDER_SURFACE_H
+#define DALI_RENDER_SURFACE_H
 
 /*
  * Copyright (c) 2018 Samsung Electronics Co., Ltd.
  */
 
 // EXTERNAL INCLUDES
-#include <dali/integration-api/render-surface.h>
-#include <dali/integration-api/core-enumerations.h>
-#include <dali/public-api/math/vector4.h>
+#include <dali/public-api/math/rect.h>
+#include <dali/public-api/object/any.h>
+#include <dali/public-api/common/view-mode.h>
 
 // INTERNAL INCLUDES
+#include <dali/public-api/dali-adaptor-common.h>
+
 
 namespace Dali
 {
@@ -33,12 +35,27 @@ class ThreadSynchronizationInterface;
 
 namespace Internal
 {
+
 namespace Adaptor
 {
-class AdaptorInternalServices;
+
 class GraphicsInterface;
-}
-}
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+namespace Integration
+{
+
+class GlAbstraction;
+
+} // namespace Integration
+
+/**
+ * @brief The position and size of the render surface.
+ */
+typedef Dali::Rect<int> PositionSize;
 
 /**
  * @brief Interface for a render surface onto which Dali draws.
@@ -53,34 +70,34 @@ class GraphicsInterface;
  * implementation of RenderSurface for the given platform
  */
 
-class RenderSurfaceInterface : public Dali::Integration::RenderSurface
+class RenderSurface
 {
 public:
 
+  enum Type
+  {
+    WINDOW_RENDER_SURFACE,
+    PIXMAP_RENDER_SURFACE,
+    NATIVE_RENDER_SURFACE
+  };
+
   /**
    * @brief Constructor
    * Inlined as this is a pure abstract interface
    */
-  RenderSurfaceInterface()
-  : mAdaptor( nullptr ),
-    mGraphics( nullptr ),
-    mDisplayConnection( nullptr ),
-    mDepthBufferRequired( Integration::DepthBufferAvailable::FALSE ),
-    mStencilBufferRequired( Integration::StencilBufferAvailable::FALSE ),
-    mBackgroundColor()
-  {}
+  RenderSurface() {}
 
   /**
    * @brief Virtual Destructor.
    * Inlined as this is a pure abstract interface
    */
-  virtual ~RenderSurfaceInterface() {}
+  virtual ~RenderSurface() {}
 
   /**
    * @brief Return the size and position of the surface.
    * @return The position and size
    */
-  virtual Dali::PositionSize GetPositionSize() const = 0;
+  virtual PositionSize GetPositionSize() const = 0;
 
   /**
    * @brief Get DPI
@@ -91,8 +108,10 @@ public:
 
   /**
    * @brief InitializeGraphics the platform specific graphics surface interfaces
+   * @param[in] graphics The abstracted graphics interface
+   * @param[in] displayConnection The display connection interface
    */
-  virtual void InitializeGraphics() = 0;
+  virtual void InitializeGraphics( Dali::Internal::Adaptor::GraphicsInterface& graphics, Dali::DisplayConnection& displayConnection ) = 0;
 
   /**
    * @brief Creates the Surface
@@ -157,86 +176,21 @@ public:
   /**
    * @brief Gets the surface type
    */
-  virtual Dali::Integration::RenderSurface::Type GetSurfaceType() = 0;
-
-  /**
-   * @brief Makes the graphics context current
-   */
-  virtual void MakeContextCurrent() = 0;
-
-  /**
-   * @brief Get whether the depth buffer is required
-   * @return TRUE if the depth buffer is required
-   */
-  virtual Integration::DepthBufferAvailable GetDepthBufferRequired() = 0;
-
-  /**
-   * @brief Get whether the stencil buffer is required
-   * @return TRUE if the stencil buffer is required
-   */
-  virtual Integration::StencilBufferAvailable GetStencilBufferRequired() = 0;
-
-  /**
-   * @brief Sets the background color of the surface.
-   * @param[in] color The new background color
-   */
-  virtual void SetBackgroundColor( Vector4 color ) override
-  {
-    mBackgroundColor = color;
-  }
-
-  /**
-   * @brief Gets the background color of the surface.
-   * @return The background color
-   */
-  virtual Vector4 GetBackgroundColor() override
-  {
-    return mBackgroundColor;
-  }
-
-public:
-
-  void SetAdaptor( Dali::Internal::Adaptor::AdaptorInternalServices& adaptor )
-  {
-    mAdaptor = &adaptor;
-  }
-
-  void SetGraphicsInterface( Dali::Internal::Adaptor::GraphicsInterface& graphics )
-  {
-    mGraphics = &graphics;
-  }
-
-  void SetDisplayConnection( Dali::DisplayConnection& displayConnection )
-  {
-    mDisplayConnection = &displayConnection;
-  }
+  virtual RenderSurface::Type GetSurfaceType() = 0;
 
 private:
 
   /**
    * @brief Undefined copy constructor. RenderSurface cannot be copied
    */
-  RenderSurfaceInterface( const RenderSurfaceInterface& rhs );
+  RenderSurface( const RenderSurface& rhs );
 
   /**
    * @brief Undefined assignment operator. RenderSurface cannot be copied
    */
-  RenderSurfaceInterface& operator=( const RenderSurfaceInterface& rhs );
-
-protected:
-
-  Dali::Internal::Adaptor::AdaptorInternalServices* mAdaptor;
-  Dali::Internal::Adaptor::GraphicsInterface* mGraphics;
-  Dali::DisplayConnection* mDisplayConnection;
-
-private:
-
-  Integration::DepthBufferAvailable mDepthBufferRequired;       ///< Whether the depth buffer is required
-  Integration::StencilBufferAvailable mStencilBufferRequired;   ///< Whether the stencil buffer is required
-
-  Vector4 mBackgroundColor;                                     ///< The background color of the surface
+  RenderSurface& operator=( const RenderSurface& rhs );
 };
 
 } // namespace Dali
 
-#endif // DALI_RENDER_SURFACE_INTERFACE_H
+#endif // DALI_RENDER_SURFACE_H
index e8683a5..6378911 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019 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.
@@ -83,7 +83,7 @@ thread_local Adaptor* gThreadLocalAdaptor = NULL; // raw thread specific pointer
 } // unnamed namespace
 
 
-Dali::Adaptor* Adaptor::New( Any nativeWindow, Dali::RenderSurfaceInterface *surface, Dali::Configuration::ContextLoss configuration, EnvironmentOptions* environmentOptions )
+Dali::Adaptor* Adaptor::New( Any nativeWindow, RenderSurface *surface, Dali::Configuration::ContextLoss configuration, EnvironmentOptions* environmentOptions )
 {
   Dali::Adaptor* adaptor = new Dali::Adaptor;
   Adaptor* impl = new Adaptor( nativeWindow, *adaptor, surface, environmentOptions );
@@ -108,7 +108,7 @@ Dali::Adaptor* Adaptor::New( Dali::Window window, Dali::Configuration::ContextLo
   return adaptor;
 }
 
-Dali::Adaptor* Adaptor::New( GraphicsFactory& graphicsFactory, Any nativeWindow, Dali::RenderSurfaceInterface *surface, Dali::Configuration::ContextLoss configuration, EnvironmentOptions* environmentOptions )
+Dali::Adaptor* Adaptor::New( GraphicsFactory& graphicsFactory, Any nativeWindow, RenderSurface *surface, Dali::Configuration::ContextLoss configuration, EnvironmentOptions* environmentOptions )
 {
   Dali::Adaptor* adaptor = new Dali::Adaptor; // Public adaptor
   Adaptor* impl = new Adaptor( nativeWindow, *adaptor, surface, environmentOptions ); // Impl adaptor
@@ -166,8 +166,6 @@ void Adaptor::Initialize( GraphicsFactory& graphicsFactory, Dali::Configuration:
 
   PositionSize size = defaultWindow.surface->GetPositionSize();
 
-  defaultWindow.surface->SetAdaptor(*this);
-
   mGestureManager = new GestureManager(*this, Vector2(size.width, size.height), mCallbackManager, *mEnvironmentOptions);
 
   mGraphics = &( graphicsFactory.Create() );
@@ -175,9 +173,6 @@ void Adaptor::Initialize( GraphicsFactory& graphicsFactory, Dali::Configuration:
 
   auto eglGraphics = static_cast<EglGraphics *>( mGraphics ); // This interface is temporary until Core has been updated to match
 
-  // This will only be created once
-  eglGraphics->Create();
-
   GlImplementation& mGLES = eglGraphics->GetGlesInterface();
   EglSyncImplementation& eglSyncImpl = eglGraphics->GetSyncImplementation();
 
@@ -276,6 +271,8 @@ void Adaptor::Initialize( GraphicsFactory& graphicsFactory, Dali::Configuration:
   {
     Dali::TizenPlatform::ImageLoader::SetMaxTextureSize( mEnvironmentOptions->GetMaxTextureSize() );
   }
+
+  SetupSystemInformation();
 }
 
 Adaptor::~Adaptor()
@@ -324,10 +321,6 @@ void Adaptor::Start()
     return;
   }
 
-  mCore->Initialize();
-
-  SetupSystemInformation();
-
   // Start the callback manager
   mCallbackManager->Start();
 
@@ -347,12 +340,17 @@ void Adaptor::Start()
 
   defaultWindow.surface->GetDpi( dpiHor, dpiVer );
 
+  // tell core about the DPI value
+  mCore->SetDpi(dpiHor, dpiVer);
+
   // set the DPI value for font rendering
   FontClient fontClient = FontClient::Get();
   fontClient.SetDpi( dpiHor, dpiVer );
 
   // Tell the core the size of the surface just before we start the render-thread
-  mCore->SurfaceResized( defaultWindow.surface );
+  PositionSize size = defaultWindow.surface->GetPositionSize();
+
+  mCore->SurfaceResized( size.width, size.height );
 
   // Initialize the thread controller
   mThreadController->Initialize();
@@ -504,17 +502,18 @@ void Adaptor::FeedKeyEvent( KeyEvent& keyEvent )
   mEventHandler->FeedKeyEvent( keyEvent );
 }
 
-void Adaptor::ReplaceSurface( Any nativeWindow, Dali::RenderSurfaceInterface& newSurface )
+void Adaptor::ReplaceSurface( Any nativeWindow, RenderSurface& newSurface )
 {
+  PositionSize positionSize = newSurface.GetPositionSize();
+
   // Let the core know the surface size has changed
-  mCore->SurfaceResized( &newSurface );
+  mCore->SurfaceResized( positionSize.width, positionSize.height );
 
   mResizedSignal.Emit( mAdaptor );
 
   WindowPane newDefaultWindow;
   newDefaultWindow.nativeWindow = nativeWindow;
   newDefaultWindow.surface = &newSurface;
-  newDefaultWindow.surface->SetAdaptor(*this);
 
   WindowPane oldDefaultWindow = mWindowFrame.front();
 
@@ -534,7 +533,7 @@ void Adaptor::ReplaceSurface( Any nativeWindow, Dali::RenderSurfaceInterface& ne
   oldDefaultWindow.surface = nullptr;
 }
 
-Dali::RenderSurfaceInterface& Adaptor::GetSurface() const
+RenderSurface& Adaptor::GetSurface() const
 {
   WindowPane defaultWindow = mWindowFrame.front();
   return *(defaultWindow.surface);
@@ -582,21 +581,19 @@ void Adaptor::SetPreRenderCallback( CallbackBase* callback )
 
 bool Adaptor::AddWindow( Dali::Window* childWindow, const std::string& childWindowName, const std::string& childWindowClassName, const bool& childWindowMode )
 {
-  Window& windowImpl = Dali::GetImplementation( *childWindow );
-  windowImpl.SetAdaptor( Get() );
-
   // This is any Window that is not the main (default) one
   WindowPane additionalWindow;
   additionalWindow.instance = childWindow;
   additionalWindow.window_name = childWindowName;
   additionalWindow.class_name = childWindowClassName;
   additionalWindow.window_mode = childWindowMode;
-  additionalWindow.surface = windowImpl.GetSurface();
-  additionalWindow.id = windowImpl.GetId();
 
   // Add the new Window to the Frame - the order is not important
   mWindowFrame.push_back( additionalWindow );
 
+  Window& windowImpl = Dali::GetImplementation( *childWindow );
+  windowImpl.SetAdaptor( Get() );
+
   return true;
 }
 
@@ -628,20 +625,6 @@ bool Adaptor::RemoveWindow( std::string childWindowName )
   return false;
 }
 
-bool Adaptor::RemoveWindow( Window* childWindow )
-{
-  for ( WindowFrames::iterator iter = mWindowFrame.begin(); iter != mWindowFrame.end(); ++iter )
-  {
-    if( iter->id == childWindow->GetId() )
-    {
-      mWindowFrame.erase( iter );
-      return true;
-    }
-  }
-
-  return false;
-}
-
 Dali::Adaptor& Adaptor::Get()
 {
   DALI_ASSERT_ALWAYS( IsAvailable() && "Adaptor not instantiated" );
@@ -705,7 +688,7 @@ SocketFactoryInterface& Adaptor::GetSocketFactoryInterface()
   return mSocketFactory;
 }
 
-Dali::RenderSurfaceInterface* Adaptor::GetRenderSurfaceInterface()
+RenderSurface* Adaptor::GetRenderSurfaceInterface()
 {
   if( !mWindowFrame.empty())
   {
@@ -933,15 +916,15 @@ void Adaptor::OnDamaged( const DamageArea& area )
   RequestUpdate( false );
 }
 
-void Adaptor::SurfaceResizePrepare( Dali::RenderSurfaceInterface* surface, SurfaceSize surfaceSize )
+void Adaptor::SurfaceResizePrepare( SurfaceSize surfaceSize )
 {
   // Let the core know the surface size has changed
-  mCore->SurfaceResized( surface );
+  mCore->SurfaceResized( surfaceSize.GetWidth(), surfaceSize.GetHeight() );
 
   mResizedSignal.Emit( mAdaptor );
 }
 
-void Adaptor::SurfaceResizeComplete( Dali::RenderSurfaceInterface* surface, SurfaceSize surfaceSize )
+void Adaptor::SurfaceResizeComplete( SurfaceSize surfaceSize )
 {
   // Flush the event queue to give the update-render thread chance
   // to start processing messages for new camera setup etc as soon as possible
@@ -1002,6 +985,12 @@ void Adaptor::RequestUpdateOnce()
   }
 }
 
+void Adaptor::IndicatorSizeChanged(int height)
+{
+  // Let the core know the indicator height is changed
+  mCore->SetTopMargin(height);
+}
+
 bool Adaptor::ProcessCoreEventsFromIdle()
 {
   ProcessCoreEvents();
@@ -1012,7 +1001,7 @@ bool Adaptor::ProcessCoreEventsFromIdle()
   return false;
 }
 
-Adaptor::Adaptor(Any nativeWindow, Dali::Adaptor& adaptor, Dali::RenderSurfaceInterface* surface, EnvironmentOptions* environmentOptions)
+Adaptor::Adaptor(Any nativeWindow, Dali::Adaptor& adaptor, RenderSurface* surface, EnvironmentOptions* environmentOptions)
 : mResizedSignal(),
   mLanguageChangedSignal(),
   mAdaptor( adaptor ),
@@ -1050,7 +1039,6 @@ Adaptor::Adaptor(Any nativeWindow, Dali::Adaptor& adaptor, Dali::RenderSurfaceIn
   WindowPane defaultWindow;
   defaultWindow.nativeWindow = nativeWindow;
   defaultWindow.surface = surface;
-  defaultWindow.id = 0;
 
   std::vector<WindowPane>::iterator iter = mWindowFrame.begin();
   iter = mWindowFrame.insert( iter, defaultWindow );
index 428680c..af7eb87 100755 (executable)
@@ -49,7 +49,7 @@
 namespace Dali
 {
 
-class RenderSurfaceInterface;
+class RenderSurface;
 class Window;
 
 namespace Integration
@@ -106,7 +106,7 @@ public:
    * @param[in]  environmentOptions  A pointer to the environment options. If NULL then one is created.
    */
   static Dali::Adaptor* New( Any nativeWindow,
-                             Dali::RenderSurfaceInterface* surface,
+                             RenderSurface* surface,
                              Dali::Configuration::ContextLoss configuration,
                              EnvironmentOptions* environmentOptions );
 
@@ -132,7 +132,7 @@ public:
    */
   static Dali::Adaptor* New( GraphicsFactory& graphicsFactory,
                              Any nativeWindow,
-                             Dali::RenderSurfaceInterface* surface,
+                             RenderSurface* surface,
                              Dali::Configuration::ContextLoss configuration,
                              EnvironmentOptions* environmentOptions );
 
@@ -224,12 +224,12 @@ public: // AdaptorInternalServices implementation
   /**
    * @copydoc AdaptorInterface::ReplaceSurface()
    */
-  virtual void ReplaceSurface( Any nativeWindow, Dali::RenderSurfaceInterface& surface );
+  virtual void ReplaceSurface( Any nativeWindow, RenderSurface& surface );
 
   /**
    * @copydoc Dali::Adaptor::GetSurface()
    */
-  virtual Dali::RenderSurfaceInterface& GetSurface() const;
+  virtual RenderSurface& GetSurface() const;
 
   /**
    * @copydoc Dali::Adaptor::ReleaseSurfaceLock()
@@ -283,12 +283,6 @@ public: // AdaptorInternalServices implementation
    */
   void SetPreRenderCallback( CallbackBase* callback );
 
-  /**
-   * Removes an existing Window instance from the Adaptor
-   * @param[in]  childWindow The Window instance
-   */
-  bool RemoveWindow( Dali::Internal::Adaptor::Window* childWindow );
-
 public:
 
   /**
@@ -386,6 +380,11 @@ public:
   void RequestUpdateOnce();
 
   /**
+   * Request adaptor to update indicator's height
+   */
+  void IndicatorSizeChanged(int height);
+
+  /**
    * @copydoc Dali::Adaptor::NotifySceneCreated()
    */
   void NotifySceneCreated();
@@ -403,12 +402,12 @@ public:
   /**
    * Informs core the surface size has changed
    */
-  void SurfaceResizePrepare( Dali::RenderSurfaceInterface* surface, SurfaceSize surfaceSize );
+  void SurfaceResizePrepare( SurfaceSize surfaceSize );
 
   /**
    * Informs ThreadController the surface size has changed
    */
-  void SurfaceResizeComplete( Dali::RenderSurfaceInterface* surface, SurfaceSize surfaceSize );
+  void SurfaceResizeComplete( SurfaceSize surfaceSize );
 
   /**
    * Sets layout direction of root by system language
@@ -471,7 +470,7 @@ public:  //AdaptorInternalServices
   /**
    * @copydoc Dali::Internal::Adaptor::AdaptorInternalServices::GetRenderSurfaceInterface()
    */
-  virtual Dali::RenderSurfaceInterface* GetRenderSurfaceInterface();
+  virtual RenderSurface* GetRenderSurfaceInterface();
 
   /**
    * @copydoc Dali::Internal::Adaptor::AdaptorInternalServices::GetVSyncMonitorInterface()
@@ -566,7 +565,7 @@ private:
    * Assigns the render surface to the adaptor
    *
    */
-  void SetSurface(Dali::RenderSurfaceInterface *surface);
+  void SetSurface(RenderSurface *surface);
 
   /**
    * called after surface is created
@@ -616,7 +615,7 @@ private:
    *                          - Window, adaptor will use existing Window to draw on to
    * @param[in]  environmentOptions  A pointer to the environment options. If NULL then one is created.
    */
-  Adaptor( Any nativeWindow, Dali::Adaptor& adaptor, Dali::RenderSurfaceInterface* surface, EnvironmentOptions* environmentOptions );
+  Adaptor( Any nativeWindow, Dali::Adaptor& adaptor, RenderSurface* surface, EnvironmentOptions* environmentOptions );
 
 private: // Types
 
@@ -637,8 +636,7 @@ private: // Types
     std::string    class_name;   ///< Class name that the window belongs to
     bool           window_mode;  ///< Display mode of the window
     Any            nativeWindow; ///< window identifier
-    uint32_t       id;           ///< unique Window ID
-    Dali::RenderSurfaceInterface* surface;      ///< The surface the Window is bound to
+    RenderSurface* surface;      ///< The surface the Window is bound to
   } WindowPane;
 
   typedef std::vector<WindowPane> WindowFrames;
index db4a360..4823a6b 100644 (file)
@@ -25,7 +25,6 @@
 // INTERNAL INCLUDES
 #include <dali/integration-api/trigger-event-interface.h>
 #include <dali/integration-api/trigger-event-factory-interface.h>
-#include <dali/integration-api/render-surface-interface.h>
 #include <dali/internal/window-system/common/display-connection.h>
 #include <dali/internal/graphics/common/graphics-interface.h>
 #include <dali/internal/graphics/gles/egl-factory-interface.h>
@@ -35,6 +34,7 @@
 #include <dali/internal/network/common/trace-interface.h>
 #include <dali/integration-api/render-surface.h>
 
+
 namespace Dali
 {
 
@@ -97,7 +97,7 @@ public:
   /**
    * @return render surface
    */
-  virtual Dali::RenderSurfaceInterface* GetRenderSurfaceInterface() = 0;
+  virtual RenderSurface* GetRenderSurfaceInterface() = 0;
 
   /**
    * @return vsync monitor interface
index 66b28ee..377a031 100755 (executable)
@@ -41,14 +41,14 @@ Adaptor& Adaptor::New( Window window, Configuration::ContextLoss configuration )
   return *adaptor;
 }
 
-Adaptor& Adaptor::New( Any nativeWindow, const Dali::RenderSurfaceInterface& surface )
+Adaptor& Adaptor::New( Any nativeWindow, const Dali::RenderSurface& surface )
 {
   return New( nativeWindow, surface, Configuration::APPLICATION_DOES_NOT_HANDLE_CONTEXT_LOSS );
 }
 
-Adaptor& Adaptor::New( Any nativeWindow, const Dali::RenderSurfaceInterface& surface, Configuration::ContextLoss configuration )
+Adaptor& Adaptor::New( Any nativeWindow, const Dali::RenderSurface& surface, Configuration::ContextLoss configuration )
 {
-  Dali::RenderSurfaceInterface* pSurface = const_cast<Dali::RenderSurfaceInterface *>(&surface);
+  Dali::RenderSurface* pSurface = const_cast<Dali::RenderSurface *>(&surface);
   Adaptor* adaptor = Internal::Adaptor::Adaptor::New( nativeWindow, pSurface, configuration, NULL );
   return *adaptor;
 }
@@ -88,7 +88,7 @@ void Adaptor::RemoveIdle( CallbackBase* callback )
   mImpl->RemoveIdle( callback );
 }
 
-void Adaptor::ReplaceSurface( Any nativeWindow, Dali::RenderSurfaceInterface& surface )
+void Adaptor::ReplaceSurface( Any nativeWindow, Dali::RenderSurface& surface )
 {
   mImpl->ReplaceSurface(nativeWindow, surface);
 }
@@ -103,7 +103,7 @@ Adaptor::AdaptorSignalType& Adaptor::LanguageChangedSignal()
   return mImpl->LanguageChangedSignal();
 }
 
-Dali::RenderSurfaceInterface& Adaptor::GetSurface()
+RenderSurface& Adaptor::GetSurface()
 {
   return mImpl->GetSurface();
 }
index f728657..17025f3 100755 (executable)
 #include <dali/internal/adaptor/common/framework.h>
 #include <dali/internal/system/common/singleton-service-impl.h>
 #include <dali/internal/adaptor/common/lifecycle-controller-impl.h>
-#include <dali/internal/window-system/common/window-impl.h>
 #include <dali/internal/window-system/common/window-render-surface.h>
 
-#undef Status
-
 namespace Dali
 {
 
index ace0a18..8e124a8 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019 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.
@@ -29,9 +29,6 @@
 #include <dali/internal/system/common/time-service.h>
 #include <dali/internal/adaptor/common/adaptor-internal-services.h>
 #include <dali/devel-api/adaptor-framework/thread-settings.h>
-#include <dali/internal/graphics/gles/egl-graphics.h>
-#include <dali/internal/graphics/gles/egl-implementation.h>
-#include <dali/internal/graphics/common/graphics-interface.h>
 
 namespace Dali
 {
@@ -122,7 +119,7 @@ CombinedUpdateRenderController::CombinedUpdateRenderController( AdaptorInternalS
   SetRenderRefreshRate( environmentOptions.GetRenderRefreshRate() );
 
   // Set the thread-synchronization interface on the render-surface
-  Dali::RenderSurfaceInterface* currentSurface = mAdaptorInterfaces.GetRenderSurfaceInterface();
+  RenderSurface* currentSurface = mAdaptorInterfaces.GetRenderSurfaceInterface();
   if( currentSurface )
   {
     currentSurface->SetThreadSynchronization( *this );
@@ -172,7 +169,7 @@ void CombinedUpdateRenderController::Start()
     sem_wait( &mEventThreadSemaphore );
   }
 
-  Integration::RenderSurface* currentSurface = mAdaptorInterfaces.GetRenderSurfaceInterface();
+  RenderSurface* currentSurface = mAdaptorInterfaces.GetRenderSurfaceInterface();
   if( currentSurface )
   {
     currentSurface->StartRender();
@@ -224,7 +221,7 @@ void CombinedUpdateRenderController::Stop()
   LOG_EVENT_TRACE;
 
   // Stop Rendering and the Update/Render Thread
-  Integration::RenderSurface* currentSurface = mAdaptorInterfaces.GetRenderSurfaceInterface();
+  RenderSurface* currentSurface = mAdaptorInterfaces.GetRenderSurfaceInterface();
   if( currentSurface )
   {
     currentSurface->StopRender();
@@ -286,7 +283,7 @@ void CombinedUpdateRenderController::RequestUpdateOnce()
   }
 }
 
-void CombinedUpdateRenderController::ReplaceSurface( Dali::RenderSurfaceInterface* newSurface )
+void CombinedUpdateRenderController::ReplaceSurface( RenderSurface* newSurface )
 {
   LOG_EVENT_TRACE;
 
@@ -418,38 +415,12 @@ void CombinedUpdateRenderController::UpdateRenderThread()
 
   LOG_UPDATE_RENDER( "THREAD CREATED" );
 
-  // Initialize EGL & OpenGL
-  Dali::DisplayConnection& displayConnection = mAdaptorInterfaces.GetDisplayConnectionInterface();
-  displayConnection.Initialize();
-
-  RenderSurfaceInterface* currentSurface = nullptr;
-
-#if DALI_GLES_VERSION >= 30
-
-  GraphicsInterface& graphics = mAdaptorInterfaces.GetGraphicsInterface();
-  EglGraphics* eglGraphics = static_cast<EglGraphics *>(&graphics);
-
-  // This will only be created once
-  EglInterface* eglInterface = &eglGraphics->GetEglInterface();
-
-  Internal::Adaptor::EglImplementation& eglImpl = static_cast<Internal::Adaptor::EglImplementation&>( *eglInterface );
-  eglImpl.ChooseConfig( true, COLOR_DEPTH_32 ); // Always use this for shared context???
-
-  // Create a surfaceless OpenGL context for shared resources
-  eglImpl.CreateContext();
-  eglImpl.MakeContextCurrent( EGL_NO_SURFACE, eglImpl.GetContext() );
-
-#else // DALI_GLES_VERSION >= 30
-
-  currentSurface = mAdaptorInterfaces.GetRenderSurfaceInterface();
+  RenderSurface* currentSurface = mAdaptorInterfaces.GetRenderSurfaceInterface();
   if( currentSurface )
   {
-    currentSurface->InitializeGraphics();
-    currentSurface->MakeContextCurrent();
+    currentSurface->InitializeGraphics( mAdaptorInterfaces.GetGraphicsInterface(), mAdaptorInterfaces.GetDisplayConnectionInterface() );
   }
 
-#endif
-
   // Tell core it has a context
   mCore.ContextCreated();
 
@@ -495,7 +466,7 @@ void CombinedUpdateRenderController::UpdateRenderThread()
     // REPLACE SURFACE
     //////////////////////////////
 
-    Integration::RenderSurface* newSurface = ShouldSurfaceBeReplaced();
+    RenderSurface* newSurface = ShouldSurfaceBeReplaced();
     if( DALI_UNLIKELY( newSurface ) )
     {
       LOG_UPDATE_RENDER_TRACE_FMT( "Replacing Surface" );
@@ -506,7 +477,7 @@ void CombinedUpdateRenderController::UpdateRenderThread()
       // If the new surface has a different display connection, then the context will be lost
 
       mAdaptorInterfaces.GetDisplayConnectionInterface().Initialize();
-      newSurface->InitializeGraphics();
+      newSurface->InitializeGraphics( mAdaptorInterfaces.GetGraphicsInterface(), mAdaptorInterfaces.GetDisplayConnectionInterface() );
       newSurface->ReplaceGraphicsSurface();
       SurfaceReplaced();
     }
@@ -553,6 +524,7 @@ void CombinedUpdateRenderController::UpdateRenderThread()
     }
 
     // Check resize
+    bool surfaceResized = false;
     bool shouldSurfaceBeResized = ShouldSurfaceBeResized();
     if( DALI_UNLIKELY( shouldSurfaceBeResized ) )
     {
@@ -560,6 +532,7 @@ void CombinedUpdateRenderController::UpdateRenderThread()
       {
         LOG_UPDATE_RENDER_TRACE_FMT( "Resizing Surface" );
         SurfaceResized();
+        surfaceResized = true;
       }
     }
 
@@ -582,10 +555,11 @@ void CombinedUpdateRenderController::UpdateRenderThread()
       }
     }
 
-#if DALI_GLES_VERSION >= 30
-    // Make the shared surfaceless context as current before rendering
-    eglImpl.MakeContextCurrent( EGL_NO_SURFACE, eglImpl.GetContext() );
-#endif
+    currentSurface = mAdaptorInterfaces.GetRenderSurfaceInterface();
+    if( currentSurface )
+    {
+      currentSurface->PreRender( surfaceResized );
+    }
 
     Integration::RenderStatus renderStatus;
 
@@ -595,6 +569,14 @@ void CombinedUpdateRenderController::UpdateRenderThread()
 
     mForceClear = false;
 
+    if( renderStatus.NeedsPostRender() )
+    {
+      if( currentSurface )
+      {
+        currentSurface->PostRender( isRenderingToFbo, ( mNewSurface != NULL ), surfaceResized );
+      }
+    }
+
     // Trigger event thread to request Update/Render thread to sleep if update not required
     if( ( Integration::KeepUpdating::NOT_REQUESTED == keepUpdatingStatus ) && !renderStatus.NeedsUpdate() )
     {
@@ -717,11 +699,11 @@ bool CombinedUpdateRenderController::UpdateRenderReady( bool& useElapsedTime, bo
   return ! mDestroyUpdateRenderThread;
 }
 
-Integration::RenderSurface* CombinedUpdateRenderController::ShouldSurfaceBeReplaced()
+RenderSurface* CombinedUpdateRenderController::ShouldSurfaceBeReplaced()
 {
   ConditionalWait::ScopedLock lock( mUpdateRenderThreadWaitCondition );
 
-  Integration::RenderSurface* newSurface = mNewSurface;
+  RenderSurface* newSurface = mNewSurface;
   mNewSurface = NULL;
 
   return newSurface;
index bdb51b0..6eafcf1 100644 (file)
@@ -36,7 +36,7 @@
 namespace Dali
 {
 
-class RenderSurfaceInterface;
+class RenderSurface;
 class TriggerEventInterface;
 
 namespace Internal
@@ -124,7 +124,7 @@ public:
   /**
    * @copydoc ThreadControllerInterface::ReplaceSurface()
    */
-  virtual void ReplaceSurface( Dali::RenderSurfaceInterface* surface );
+  virtual void ReplaceSurface( RenderSurface* surface );
 
   /**
    * @copydoc ThreadControllerInterface::ResizeSurface()
@@ -217,7 +217,7 @@ private:
    *
    * @return Pointer to the new surface, NULL otherwise
    */
-  Integration::RenderSurface* ShouldSurfaceBeReplaced();
+  RenderSurface* ShouldSurfaceBeReplaced();
 
   /**
    * Called by the Update/Render thread after a surface has been replaced.
@@ -334,7 +334,7 @@ private:
 
   volatile unsigned int             mUseElapsedTimeAfterWait;          ///< Whether we should use the elapsed time after waiting (set by the event-thread, read by the update-render-thread).
 
-  Integration::RenderSurface* volatile mNewSurface;                    ///< Will be set to the new-surface if requested (set by the event-thread, read & cleared by the update-render thread).
+  RenderSurface* volatile           mNewSurface;                       ///< Will be set to the new-surface if requested (set by the event-thread, read & cleared by the update-render thread).
 
   volatile unsigned int             mPostRendering;                    ///< Whether post-rendering is taking place (set by the event & render threads, read by the render-thread).
   volatile unsigned int             mSurfaceResized;                   ///< Will be set to resize the surface (set by the event-thread, read & cleared by the update-render thread).
index 6885819..8f4aabc 100644 (file)
@@ -23,7 +23,7 @@
 namespace Dali
 {
 
-class RenderSurfaceInterface;
+class RenderSurface;
 
 namespace Internal
 {
@@ -83,7 +83,7 @@ public:
    * Replaces the surface.
    * @param surface new surface
    */
-  virtual void ReplaceSurface( Dali::RenderSurfaceInterface* surface ) = 0;
+  virtual void ReplaceSurface( RenderSurface* surface ) = 0;
 
   /**
    * Resize the surface.
index 8e6d5be..f944bd7 100644 (file)
@@ -193,20 +193,12 @@ struct Framework::Impl
     mApplicationType = type;
     mCallbackManager = CallbackManager::New();
 
-    char* region = nullptr;
-    char* language = nullptr;
+    char* region;
+    char* language;
     system_settings_get_value_string( SYSTEM_SETTINGS_KEY_LOCALE_COUNTRY, &region );
     system_settings_get_value_string( SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, &language );
-
-    if (region != nullptr)
-    {
-      mRegion = std::string( region );
-    }
-
-    if ( language != nullptr)
-    {
-      mLanguage = std::string( language );
-    }
+    mRegion = std::string( region );
+    mLanguage = std::string( language );
   }
 
   ~Impl()
index ebaaa5a..de42dea 100644 (file)
@@ -72,6 +72,7 @@ void EglGraphics::Destroy()
 {
 }
 
+//Dali::Integration::GlAbstraction& EglGraphics::GetGlesInterface()
 GlImplementation& EglGraphics::GetGlesInterface()
 {
   return *mGLES;
index dca3bd0..9557582 100755 (executable)
@@ -68,6 +68,7 @@ EglImplementation::EglImplementation( int multiSamplingLevel,
   mColorDepth( COLOR_DEPTH_24 ),
   mGlesInitialized( false ),
   mIsOwnSurface( true ),
+  mContextCurrent( false ),
   mIsWindow( true ),
   mDepthBufferRequired( depthBufferRequired == Integration::DepthBufferAvailable::TRUE ),
   mStencilBufferRequired( stencilBufferRequired == Integration::StencilBufferAvailable::TRUE )
@@ -159,53 +160,32 @@ bool EglImplementation::CreateContext()
   return true;
 }
 
-bool EglImplementation::CreateWindowContext( EGLContext& eglContext )
-{
-  // make sure a context isn't created twice
-  DALI_ASSERT_ALWAYS( (eglContext == 0) && "EGL context recreated" );
-
-  eglContext = eglCreateContext(mEglDisplay, mEglConfig, mEglContext, &(mContextAttribs[0]));
-  TEST_EGL_ERROR("eglCreateContext render thread");
-
-  DALI_ASSERT_ALWAYS( EGL_NO_CONTEXT != eglContext && "EGL context not created" );
-
-  DALI_LOG_INFO(Debug::Filter::gShader, Debug::General, "*** GL_VENDOR : %s ***\n", glGetString(GL_VENDOR));
-  DALI_LOG_INFO(Debug::Filter::gShader, Debug::General, "*** GL_RENDERER : %s ***\n", glGetString(GL_RENDERER));
-  DALI_LOG_INFO(Debug::Filter::gShader, Debug::General, "*** GL_VERSION : %s ***\n", glGetString(GL_VERSION));
-  DALI_LOG_INFO(Debug::Filter::gShader, Debug::General, "*** GL_SHADING_LANGUAGE_VERSION : %s***\n", glGetString(GL_SHADING_LANGUAGE_VERSION));
-  DALI_LOG_INFO(Debug::Filter::gShader, Debug::General, "*** Supported Extensions ***\n%s\n\n", glGetString(GL_EXTENSIONS));
-
-  mEglWindowContexts.push_back( eglContext );
-
-  return true;
-}
-
-void EglImplementation::DestroyContext( EGLContext& eglContext )
+void EglImplementation::DestroyContext()
 {
   DALI_ASSERT_ALWAYS( mEglContext && "no EGL context" );
 
-  eglDestroyContext( mEglDisplay, eglContext );
-  eglContext = 0;
+  eglDestroyContext( mEglDisplay, mEglContext );
+  mEglContext = 0;
 }
 
-void EglImplementation::DestroySurface( EGLSurface& eglSurface )
+void EglImplementation::DestroySurface()
 {
-  if(mIsOwnSurface && eglSurface)
+  if(mIsOwnSurface && mCurrentEglSurface)
   {
     // Make context null to prevent crash in driver side
     MakeContextNull();
-    eglDestroySurface( mEglDisplay, eglSurface );
-    eglSurface = 0;
+    eglDestroySurface( mEglDisplay, mCurrentEglSurface );
+    mCurrentEglSurface = 0;
   }
 }
 
-void EglImplementation::MakeContextCurrent( EGLSurface eglSurface, EGLContext eglContext )
+void EglImplementation::MakeContextCurrent()
 {
-  mCurrentEglSurface = eglSurface;
+  mContextCurrent = true;
 
   if(mIsOwnSurface)
   {
-    eglMakeCurrent( mEglDisplay, eglSurface, eglSurface, eglContext );
+    eglMakeCurrent( mEglDisplay, mCurrentEglSurface, mCurrentEglSurface, mEglContext );
   }
 
   EGLint error = eglGetError();
@@ -225,7 +205,7 @@ void EglImplementation::MakeCurrent( EGLNativePixmapType pixmap, EGLSurface eglS
 
   if(mIsOwnSurface)
   {
-    eglMakeCurrent( mEglDisplay, eglSurface, eglSurface, mEglContext );
+    eglMakeCurrent( mEglDisplay, mCurrentEglSurface, mCurrentEglSurface, mEglContext );
   }
 
   EGLint error = eglGetError();
@@ -240,6 +220,7 @@ void EglImplementation::MakeCurrent( EGLNativePixmapType pixmap, EGLSurface eglS
 
 void EglImplementation::MakeContextNull()
 {
+  mContextCurrent = false;
   // clear the current context
   eglMakeCurrent( mEglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT );
 }
@@ -251,18 +232,11 @@ void EglImplementation::TerminateGles()
     // Make context null to prevent crash in driver side
     MakeContextNull();
 
-    for ( auto eglSurface : mEglWindowSurfaces )
+    if(mIsOwnSurface && mCurrentEglSurface)
     {
-      if(mIsOwnSurface && eglSurface)
-      {
-        eglDestroySurface(mEglDisplay, eglSurface);
-      }
+      eglDestroySurface(mEglDisplay, mCurrentEglSurface);
     }
     eglDestroyContext(mEglDisplay, mEglContext);
-    for ( auto eglContext : mEglWindowContexts )
-    {
-      eglDestroyContext(mEglDisplay, eglContext);
-    }
 
     eglTerminate(mEglDisplay);
 
@@ -280,17 +254,14 @@ bool EglImplementation::IsGlesInitialized() const
   return mGlesInitialized;
 }
 
-void EglImplementation::SwapBuffers( EGLSurface& eglSurface )
+void EglImplementation::SwapBuffers()
 {
-  if ( eglSurface != EGL_NO_SURFACE ) // skip if using surfaceless context
-  {
-    eglSwapBuffers( mEglDisplay, eglSurface );
-  }
+  eglSwapBuffers( mEglDisplay, mCurrentEglSurface );
 }
 
-void EglImplementation::CopyBuffers( EGLSurface& eglSurface )
+void EglImplementation::CopyBuffers()
 {
-  eglCopyBuffers( mEglDisplay, eglSurface, mCurrentEglNativePixmap );
+  eglCopyBuffers( mEglDisplay, mCurrentEglSurface, mCurrentEglNativePixmap );
 }
 
 void EglImplementation::WaitGL()
@@ -305,8 +276,6 @@ void EglImplementation::ChooseConfig( bool isWindowType, ColorDepth depth )
     return;
   }
 
-  bool isTransparent = ( depth == COLOR_DEPTH_32 );
-
   mIsWindow = isWindowType;
 
   EGLint numConfigs;
@@ -357,18 +326,15 @@ void EglImplementation::ChooseConfig( bool isWindowType, ColorDepth depth )
   configAttribs.PushBack( EGL_BLUE_SIZE );
   configAttribs.PushBack( 8 );
 
-  if ( isTransparent )
-  {
-    configAttribs.PushBack( EGL_ALPHA_SIZE );
+  configAttribs.PushBack( EGL_ALPHA_SIZE );
 #ifdef _ARCH_ARM_
-    // For underlay video playback, we also need to set the alpha value of the 24/32bit window.
-    configAttribs.PushBack( 8 );
+  // For underlay video playback, we also need to set the alpha value of the 24/32bit window.
+  configAttribs.PushBack( 8 );
 #else
-    // There is a bug in the desktop emulator
-    // setting EGL_ALPHA_SIZE to 8 results in eglChooseConfig failing
-    configAttribs.PushBack( 8 );
+  // There is a bug in the desktop emulator
+  // setting EGL_ALPHA_SIZE to 8 results in eglChooseConfig failing
+  configAttribs.PushBack( 0 );
 #endif // _ARCH_ARM_
-  }
 
   configAttribs.PushBack( EGL_DEPTH_SIZE );
   configAttribs.PushBack( mDepthBufferRequired ? 24 : 0 );
@@ -427,8 +393,10 @@ void EglImplementation::ChooseConfig( bool isWindowType, ColorDepth depth )
   }
 }
 
-EGLSurface EglImplementation::CreateSurfaceWindow( EGLNativeWindowType window, ColorDepth depth )
+void EglImplementation::CreateSurfaceWindow( EGLNativeWindowType window, ColorDepth depth )
 {
+  DALI_ASSERT_ALWAYS( ( mCurrentEglSurface == 0 ) && "EGL surface already exists" );
+
   mEglNativeWindow = window;
   mColorDepth = depth;
   mIsWindow = true;
@@ -440,8 +408,6 @@ EGLSurface EglImplementation::CreateSurfaceWindow( EGLNativeWindowType window, C
   TEST_EGL_ERROR("eglCreateWindowSurface");
 
   DALI_ASSERT_ALWAYS( mCurrentEglSurface && "Create window surface failed" );
-
-  return mCurrentEglSurface;
 }
 
 EGLSurface EglImplementation::CreateSurfacePixmap( EGLNativePixmapType pixmap, ColorDepth depth )
@@ -461,7 +427,7 @@ EGLSurface EglImplementation::CreateSurfacePixmap( EGLNativePixmapType pixmap, C
   return mCurrentEglSurface;
 }
 
-bool EglImplementation::ReplaceSurfaceWindow( EGLNativeWindowType window, EGLSurface& eglSurface, EGLContext& eglContext )
+bool EglImplementation::ReplaceSurfaceWindow( EGLNativeWindowType window )
 {
   bool contextLost = false;
 
@@ -470,13 +436,13 @@ bool EglImplementation::ReplaceSurfaceWindow( EGLNativeWindowType window, EGLSur
   MakeContextNull();
 
   // destroy the surface
-  DestroySurface( eglSurface );
+  DestroySurface();
 
   // create the EGL surface
   CreateSurfaceWindow( window, mColorDepth );
 
   // set the context to be current with the new surface
-  MakeContextCurrent( eglSurface, eglContext );
+  MakeContextCurrent();
 
   return contextLost;
 }
@@ -500,7 +466,7 @@ EGLDisplay EglImplementation::GetDisplay() const
   return mEglDisplay;
 }
 
-EGLContext EglImplementation::GetContext() const
+EGLDisplay EglImplementation::GetContext() const
 {
   return mEglContext;
 }
index e299da7..eeb33e3 100644 (file)
@@ -22,7 +22,6 @@
 #include <EGL/egl.h>
 #include <EGL/eglext.h>
 #include <dali/public-api/common/dali-vector.h>
-#include <dali/public-api/common/vector-wrapper.h>
 #include <dali/integration-api/core-enumerations.h>
 
 // INTERNAL INCLUDES
@@ -70,31 +69,25 @@ public:
   bool InitializeGles( EGLNativeDisplayType display, bool isOwnSurface = true );
 
   /**
-    * Create the OpenGL context for the shared resource.
+    * Create the OpenGL context.
     * @return true if successful
     */
   virtual bool CreateContext();
 
   /**
-    * Create the OpenGL context for the window.
-    * @return true if successful
-    */
-  bool CreateWindowContext( EGLContext& mEglContext );
-
-  /**
     * Destroy the OpenGL context.
     */
-  void DestroyContext( EGLContext& eglContext );
+  void DestroyContext();
 
   /**
     * Destroy the OpenGL surface.
     */
-  void DestroySurface( EGLSurface& eglSurface );
+  void DestroySurface();
 
   /**
    * Make the OpenGL context current
    */
-  virtual void MakeContextCurrent( EGLSurface eglSurface, EGLContext eglContext );
+  virtual void MakeContextCurrent();
 
   /**
    * clear the OpenGL context
@@ -123,12 +116,12 @@ public:
   /**
    * Performs an OpenGL swap buffers command
    */
-  virtual void SwapBuffers( EGLSurface& eglSurface );
+  virtual void SwapBuffers();
 
   /**
    * Performs an OpenGL copy buffers command
    */
-  virtual void CopyBuffers( EGLSurface& eglSurface );
+  virtual void CopyBuffers();
 
   /**
    * Performs an EGL wait GL command
@@ -146,9 +139,9 @@ public:
     * Create an OpenGL surface using a window
     * @param window The window to create the surface on
     * @param colorDepth Bit per pixel value (ex. 32 or 24)
-    * @return Handle to an on-screen EGL window surface (the requester has an ownership of this egl surface)
+    * @return true on success, false on failure
     */
-  EGLSurface CreateSurfaceWindow( EGLNativeWindowType window, ColorDepth depth );
+  void CreateSurfaceWindow( EGLNativeWindowType window, ColorDepth depth );
 
   /**
    * Create the OpenGL surface using a pixmap
@@ -164,7 +157,7 @@ public:
    * @return true if the context was lost due to a change in display
    *         between old surface and new surface
    */
-  bool ReplaceSurfaceWindow( EGLNativeWindowType window, EGLSurface& eglSurface, EGLContext& eglContext );
+  bool ReplaceSurfaceWindow( EGLNativeWindowType window );
 
   /**
    * Replaces the render surface
@@ -199,22 +192,16 @@ private:
 
   EGLDisplay           mEglDisplay;
   EGLConfig            mEglConfig;
-  EGLContext           mEglContext;                            ///< The resource context holding assets such as textures to be shared
-
-  typedef std::vector<EGLContext> EglWindowContextContainer;
-  EglWindowContextContainer mEglWindowContexts;                ///< The EGL context for the window
-
+  EGLContext           mEglContext;
   EGLSurface           mCurrentEglSurface;
 
-  typedef std::vector<EGLSurface> EglWindowSurfaceContainer;
-  EglWindowSurfaceContainer mEglWindowSurfaces;                ///< The EGL surface for the window
-
   int                  mMultiSamplingLevel;
 
   ColorDepth           mColorDepth;
 
   bool                 mGlesInitialized;
   bool                 mIsOwnSurface;
+  bool                 mContextCurrent;
   bool                 mIsWindow;
   bool                 mDepthBufferRequired;
   bool                 mStencilBufferRequired;
index 34255a5..0a50e91 100755 (executable)
@@ -329,7 +329,7 @@ void InputMethodContextEcoreWl::CreateContext()
       // If we fail to get window id, we can't use the InputMethodContext correctly.
       // Thus you have to call "ecore_imf_context_client_window_set" somewhere.
       // In EvasPlugIn, this function is called in EvasPlugin::ConnectEcoreEvent().
-      Dali::RenderSurfaceInterface& renderSurface = Dali::Adaptor::Get().GetSurface();
+      RenderSurface& renderSurface = Dali::Adaptor::Get().GetSurface();
       WindowRenderSurface& windowRenderSurface = static_cast< WindowRenderSurface& >( renderSurface );
 
       int windowId = windowRenderSurface.GetNativeWindowId();
index 3d70efe..3cffd54 100644 (file)
@@ -85,7 +85,7 @@ void ThreadController::RequestUpdateOnce()
   mThreadControllerInterface->RequestUpdateOnce();
 }
 
-void ThreadController::ReplaceSurface( Dali::RenderSurfaceInterface* newSurface )
+void ThreadController::ReplaceSurface( RenderSurface* newSurface )
 {
   mThreadControllerInterface->ReplaceSurface( newSurface );
 }
index 85d94fa..e4c3541 100644 (file)
@@ -25,7 +25,7 @@
 namespace Dali
 {
 
-class RenderSurfaceInterface;
+class RenderSurface;
 
 namespace Internal
 {
@@ -105,7 +105,7 @@ public:
    *
    * @param surface new surface
    */
-  void ReplaceSurface( Dali::RenderSurfaceInterface* surface );
+  void ReplaceSurface( RenderSurface* surface );
 
   /**
    * Resize the surface.
index 4c21cb6..b5fe5b3 100644 (file)
@@ -74,7 +74,7 @@ public:
    * Sets the render surface type
    * @param[in] type The render surface type
    */
-  virtual void SetSurfaceType( Integration::RenderSurface::Type type ) = 0;
+  virtual void SetSurfaceType( RenderSurface::Type type ) = 0;
 
   /**
    * Sets the graphics interface
index 8d3a080..1535056 100644 (file)
@@ -38,7 +38,7 @@ DisplayConnection* DisplayConnection::New( Dali::Internal::Adaptor::GraphicsInte
   return new DisplayConnection(internal);
 }
 
-DisplayConnection* DisplayConnection::New( Dali::Internal::Adaptor::GraphicsInterface& graphics, Integration::RenderSurface::Type type )
+DisplayConnection* DisplayConnection::New( Dali::Internal::Adaptor::GraphicsInterface& graphics, RenderSurface::Type type )
 {
   auto factory = Dali::Internal::Adaptor::GetDisplayConnectionFactory();
   auto displayConnection = factory->CreateDisplayConnection();
index 00c67c8..1fc12ca 100644 (file)
@@ -56,7 +56,7 @@ public:
    * @param[in] type Render surface type
    * @return A handle to a newly allocated DisplayConnection resource.
    */
-  static DisplayConnection* New( Dali::Internal::Adaptor::GraphicsInterface& graphics, Integration::RenderSurface::Type type );
+  static DisplayConnection* New( Dali::Internal::Adaptor::GraphicsInterface& graphics, RenderSurface::Type type );
 
   /**
    * @brief Create a DisplayConnection handle; this can be initialised with DisplayConnection::New().
index 7cc82b6..e017a6d 100755 (executable)
@@ -97,7 +97,7 @@ static unsigned int GetCurrentMilliSeconds(void)
 
 } // unnamed namespace
 
-EventHandler::EventHandler( Integration::RenderSurface* surface, CoreEventInterface& coreEventInterface, GestureManager& gestureManager, DamageObserver& damageObserver, DragAndDropDetectorPtr dndDetector )
+EventHandler::EventHandler( RenderSurface* surface, CoreEventInterface& coreEventInterface, GestureManager& gestureManager, DamageObserver& damageObserver, DragAndDropDetectorPtr dndDetector )
 : mCoreEventInterface( coreEventInterface ),
   mGestureManager( gestureManager ),
   mStyleMonitor( StyleMonitor::Get() ),
index be46842..18125f8 100755 (executable)
 namespace Dali
 {
 
-namespace Integration
-{
-
 class RenderSurface;
 
-}
-
 namespace Internal
 {
 
@@ -70,7 +65,7 @@ public:
    * @param[in]  damageObserver           The damage observer (to pass damage events to).
    * @param[in]  dndDetector              The Drag & Drop listener (to pass DnD events to).
    */
-  EventHandler( Integration::RenderSurface* surface, CoreEventInterface& coreEventInterface, GestureManager& gestureManager, DamageObserver& damageObserver, DragAndDropDetectorPtr dndDetector );
+  EventHandler( RenderSurface* surface, CoreEventInterface& coreEventInterface, GestureManager& gestureManager, DamageObserver& damageObserver, DragAndDropDetectorPtr dndDetector );
 
   /**
    * Destructor.
index f1eb81c..ded1216 100644 (file)
@@ -18,7 +18,6 @@
 // INTERNAL INCLUDES
 #include <dali/integration-api/native-render-surface.h>
 #include <dali/internal/window-system/common/render-surface-factory.h>
-#include <dali/internal/adaptor/common/adaptor-impl.h>
 
 namespace Dali
 {
index 6d139d6..4b5512f 100644 (file)
  */
 
 // INTERNAL INCLUDES
-
-#ifdef DALI_ADAPTOR_COMPILATION
-#include <dali/integration-api/render-surface-interface.h>
-#include <dali/internal/graphics/common/graphics-interface.h>
-#else
-#include <dali/integration-api/adaptors/render-surface-interface.h>
-#endif
-
+#include <dali/integration-api/render-surface.h>
 
 namespace Dali
 {
@@ -41,7 +34,7 @@ namespace Adaptor
 /**
  * Pixmap interface of render surface.
  */
-class PixmapRenderSurface : public Dali::RenderSurfaceInterface
+class PixmapRenderSurface : public Dali::RenderSurface
 {
 public:
 
@@ -69,22 +62,6 @@ public: // API
    */
   virtual void SetRenderNotification( TriggerEventInterface* renderNotification ) = 0;
 
-  /**
-   * @copydoc Dali::Integration::RenderSurface::GetDepthBufferRequired()
-   */
-  Integration::DepthBufferAvailable GetDepthBufferRequired() override
-  {
-    return mGraphics ? mGraphics->GetDepthBufferRequired() : Integration::DepthBufferAvailable::FALSE;
-  }
-
-  /**
-   * @copydoc Dali::Integration::RenderSurface::GetStencilBufferRequired()
-   */
-  Integration::StencilBufferAvailable GetStencilBufferRequired() override
-  {
-    return mGraphics ? mGraphics->GetStencilBufferRequired() : Integration::StencilBufferAvailable::FALSE;
-  }
-
 private:
 
   /**
index c57b275..5355f16 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019 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.
 // EXTERNAL HEADERS
 #include <dali/integration-api/core.h>
 #include <dali/integration-api/render-task-list-integ.h>
-#include <dali/public-api/actors/actor.h>
-#include <dali/public-api/actors/layer.h>
 #include <dali/public-api/actors/camera-actor.h>
 #include <dali/public-api/render-tasks/render-task.h>
 #include <dali/public-api/render-tasks/render-task-list.h>
-#include <dali/public-api/rendering/frame-buffer.h>
 #include <dali/devel-api/adaptor-framework/orientation.h>
 
 // INTERNAL HEADERS
@@ -45,8 +42,6 @@ namespace Internal
 namespace Adaptor
 {
 
-uint32_t Window::mWindowCounter = 0;
-
 namespace
 {
 
@@ -65,10 +60,10 @@ Window* Window::New( const PositionSize& positionSize, const std::string& name,
 }
 
 Window::Window()
-: mId( mWindowCounter++ ),
-  mSurface( nullptr ),
+: mSurface( NULL ),
   mWindowBase(),
   mStarted( false ),
+  mIsTransparent( false ),
   mIsFocusAcceptable( true ),
   mVisible( true ),
   mIconified( false ),
@@ -89,11 +84,10 @@ Window::~Window()
   {
     mAdaptor->RemoveObserver( *this );
     mAdaptor->SetDragAndDropDetector( NULL );
-    mAdaptor->RemoveWindow( this );
     mAdaptor = NULL;
   }
 
-  mSurface.reset( nullptr );
+  delete mSurface;
 }
 
 void Window::Initialize(const PositionSize& positionSize, const std::string& name, const std::string& className)
@@ -101,7 +95,8 @@ void Window::Initialize(const PositionSize& positionSize, const std::string& nam
   // Create a window render surface
   Any surface;
   auto renderSurfaceFactory = Dali::Internal::Adaptor::GetRenderSurfaceFactory();
-  mSurface = renderSurfaceFactory->CreateWindowRenderSurface( positionSize, surface, mIsTransparent );
+  auto windowRenderSurface = renderSurfaceFactory->CreateWindowRenderSurface( positionSize, surface, mIsTransparent );
+  mSurface = windowRenderSurface.release();
 
   // Get a window base
   mWindowBase = mSurface->GetWindowBase();
@@ -131,16 +126,6 @@ void Window::SetAdaptor(Dali::Adaptor& adaptor)
   DALI_ASSERT_ALWAYS( !mStarted && "Adaptor already started" );
   mStarted = true;
 
-  PositionSize positionSize = mSurface->GetPositionSize();
-  mScene = Dali::Integration::Scene::New( Vector2(positionSize.width, positionSize.height) );
-  mScene.SetSurface( *mSurface.get() );
-
-  unsigned int dpiHorizontal, dpiVertical;
-  dpiHorizontal = dpiVertical = 0;
-
-  mSurface->GetDpi( dpiHorizontal, dpiVertical );
-  mScene.SetDpi( Vector2( static_cast<float>( dpiHorizontal ), static_cast<float>( dpiVertical ) ) );
-
   // Create one overlay for the main window only
   Internal::Adaptor::Adaptor& adaptorImpl = Internal::Adaptor::Adaptor::GetImplementation(adaptor);
   mAdaptor = &adaptorImpl;
@@ -160,7 +145,7 @@ void Window::SetAdaptor(Dali::Adaptor& adaptor)
 
 WindowRenderSurface* Window::GetSurface()
 {
-  return mSurface.get();
+  return mSurface;
 }
 
 void Window::ShowIndicator( Dali::Window::IndicatorVisibleMode visibleMode )
@@ -195,44 +180,6 @@ void Window::Activate()
   mWindowBase->Activate();
 }
 
-void Window::Add( Dali::Actor actor )
-{
-  mScene.Add( actor );
-}
-
-void Window::Remove( Dali::Actor actor )
-{
-  mScene.Remove( actor );
-}
-
-Dali::Layer Window::GetRootLayer() const
-{
-  return mScene.GetRootLayer();
-}
-
-uint32_t Window::GetLayerCount() const
-{
-  return mScene.GetLayerCount();
-}
-
-Dali::Layer Window::GetLayer( uint32_t depth ) const
-{
-  return mScene.GetLayer( depth );
-}
-
-void Window::SetBackgroundColor( Vector4 color )
-{
-  if ( mSurface )
-  {
-    mSurface->SetBackgroundColor( color );
-  }
-}
-
-Vector4 Window::GetBackgroundColor() const
-{
-  return mSurface ? mSurface->GetBackgroundColor() : Vector4();
-}
-
 void Window::AddAvailableOrientation( Dali::Window::WindowOrientation orientation )
 {
   bool found = false;
@@ -495,11 +442,11 @@ void Window::SetSize( Dali::Window::WindowSize size )
   {
     Uint16Pair newSize( newRect.width, newRect.height );
 
-    mAdaptor->SurfaceResizePrepare( mSurface.get(), newSize );
+    mAdaptor->SurfaceResizePrepare( newSize );
 
     mResizedSignal.Emit( newSize );
 
-    mAdaptor->SurfaceResizeComplete( mSurface.get(), newSize );
+    mAdaptor->SurfaceResizeComplete( newSize );
   }
 }
 
@@ -549,11 +496,11 @@ void Window::SetPositionSize( PositionSize positionSize )
   {
     Uint16Pair newSize( newRect.width, newRect.height );
 
-    mAdaptor->SurfaceResizePrepare( mSurface.get(), newSize );
+    mAdaptor->SurfaceResizePrepare( newSize );
 
     mResizedSignal.Emit( newSize );
 
-    mAdaptor->SurfaceResizeComplete( mSurface.get(), newSize );
+    mAdaptor->SurfaceResizeComplete( newSize );
   }
 }
 
@@ -586,12 +533,12 @@ void Window::RotationDone( int orientation, int width, int height )
 {
   mSurface->RequestRotation( orientation, width, height );
 
-  mAdaptor->SurfaceResizePrepare( mSurface.get(), Adaptor::SurfaceSize( width, height ) );
+  mAdaptor->SurfaceResizePrepare( Adaptor::SurfaceSize( width, height ) );
 
   // Emit signal
   mResizedSignal.Emit( Dali::Window::WindowSize( width, height ) );
 
-  mAdaptor->SurfaceResizeComplete( mSurface.get(), Adaptor::SurfaceSize( width, height ) );
+  mAdaptor->SurfaceResizeComplete( Adaptor::SurfaceSize( width, height ) );
 }
 
 void Window::OnIconifyChanged( bool iconified )
@@ -630,8 +577,8 @@ void Window::OnFocusChanged( bool focusIn )
 void Window::OnOutputTransformed()
 {
   PositionSize positionSize = mSurface->GetPositionSize();
-  mAdaptor->SurfaceResizePrepare( mSurface.get(), Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
-  mAdaptor->SurfaceResizeComplete( mSurface.get(), Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
+  mAdaptor->SurfaceResizePrepare( Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
+  mAdaptor->SurfaceResizeComplete( Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
 }
 
 void Window::OnDeleteRequest()
@@ -660,11 +607,6 @@ void Window::OnDestroy()
   mAdaptor = NULL;
 }
 
-uint32_t Window::GetId() const
-{
-  return mId;
-}
-
 } // Adaptor
 
 } // Internal
index eb7d873..76fb76f 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_WINDOWSYSTEM_COMMON_WINDOW_IMPL_H
 
 /*
- * Copyright (c) 2019 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.
@@ -21,9 +21,6 @@
 // EXTERNAL INCLUDES
 #include <dali/public-api/object/ref-object.h>
 #include <dali/public-api/object/base-object.h>
-#include <dali/public-api/actors/layer.h>
-#include <dali/public-api/render-tasks/render-task-list.h>
-#include <dali/integration-api/scene.h>
 
 // INTERNAL INCLUDES
 #include <dali/internal/adaptor/common/lifecycle-observer.h>
@@ -35,7 +32,6 @@
 namespace Dali
 {
 class Adaptor;
-class Actor;
 
 namespace Internal
 {
@@ -118,41 +114,6 @@ public:
   void Activate();
 
   /**
-   * @copydoc Dali::Window::Add()
-   */
-  void Add( Dali::Actor actor );
-
-  /**
-   * @copydoc Dali::Window::Remove()
-   */
-  void Remove( Dali::Actor remove );
-
-  /**
-   * @copydoc Dali::Window::SetBackgroundColor()
-   */
-  void SetBackgroundColor(Vector4 color);
-
-  /**
-   * @copydoc Dali::Window::GetBackgroundColor()
-   */
-  Vector4 GetBackgroundColor() const;
-
-  /**
-   * @copydoc Dali::Window::GetRootLayer()
-   */
-  Dali::Layer GetRootLayer() const;
-
-  /**
-   * @copydoc Dali::Window::GetLayerCount()
-   */
-  uint32_t GetLayerCount() const;
-
-  /**
-   * @copydoc Dali::Window::GetLayer()
-   */
-  Dali::Layer GetLayer( uint32_t depth ) const;
-
-  /**
    * @copydoc Dali::Window::AddAvailableOrientation()
    */
   void AddAvailableOrientation(Dali::Window::WindowOrientation orientation);
@@ -362,12 +323,6 @@ public:
    */
   void RotationDone( int orientation, int width, int height );
 
-  /**
-   * @brief Retrieves the unique ID of the window.
-   * @return The ID
-   */
-  uint32_t GetId() const;
-
 private:
 
   /**
@@ -457,10 +412,7 @@ public: // Signals
 
 private:
 
-  static uint32_t                       mWindowCounter;    ///< A counter to track the window creation
-  uint32_t                              mId;               ///< A unique ID to identify the window starting from 0
-  std::unique_ptr< WindowRenderSurface > mSurface;
-  Dali::Integration::Scene              mScene;
+  WindowRenderSurface*                  mSurface;
   WindowBase*                           mWindowBase;
   bool                                  mStarted:1;
   bool                                  mIsTransparent:1;
@@ -477,8 +429,6 @@ private:
   std::vector<Dali::Window::WindowOrientation> mAvailableOrientations;
   Dali::Window::WindowOrientation              mPreferredOrientation;
 
-  Vector4                               mBackgroundColor;
-
   // Signals
   IndicatorSignalType mIndicatorVisibilityChangedSignal;
   FocusSignalType     mFocusChangedSignal;
index 2ff7944..cac09c5 100644 (file)
@@ -27,7 +27,6 @@
 #include <dali/integration-api/thread-synchronization-interface.h>
 #include <dali/internal/graphics/gles/egl-implementation.h>
 #include <dali/internal/adaptor/common/adaptor-impl.h>
-#include <dali/internal/adaptor/common/adaptor-internal-services.h>
 #include <dali/internal/window-system/common/window-base.h>
 #include <dali/internal/window-system/common/window-factory.h>
 #include <dali/internal/window-system/common/window-system.h>
@@ -59,8 +58,6 @@ WindowRenderSurface::WindowRenderSurface( Dali::PositionSize positionSize, Any s
   mRenderNotification( NULL ),
   mRotationTrigger( NULL ),
   mGraphics( nullptr ),
-  mEGLSurface( nullptr ),
-  mEGLContext( nullptr ),
   mColorDepth( isTransparent ? COLOR_DEPTH_32 : COLOR_DEPTH_24 ),
   mOutputTransformedSignal(),
   mRotationAngle( 0 ),
@@ -180,24 +177,28 @@ void WindowRenderSurface::GetDpi( unsigned int& dpiHorizontal, unsigned int& dpi
   mWindowBase->GetDpi( dpiHorizontal, dpiVertical );
 }
 
-void WindowRenderSurface::InitializeGraphics()
+void WindowRenderSurface::InitializeGraphics( GraphicsInterface& graphics, Dali::DisplayConnection& displayConnection )
 {
-
-  mGraphics = &mAdaptor->GetGraphicsInterface();
+  mGraphics = &graphics;
 
   auto eglGraphics = static_cast<EglGraphics *>(mGraphics);
-  mEGL = &eglGraphics->GetEglInterface();
 
-  if ( mEGLContext == NULL )
-  {
-    // Create the OpenGL context for this window
-    Internal::Adaptor::EglImplementation& eglImpl = static_cast<Internal::Adaptor::EglImplementation&>(*mEGL);
-    eglImpl.ChooseConfig(true, mColorDepth);
-    eglImpl.CreateWindowContext( mEGLContext );
+  EglInterface* mEGL = eglGraphics->Create();
 
-    // Create the OpenGL surface
-    CreateSurface();
-  }
+  // Initialize EGL & OpenGL
+  displayConnection.Initialize();
+
+  Internal::Adaptor::EglImplementation& eglImpl = static_cast<Internal::Adaptor::EglImplementation&>(*mEGL);
+  eglImpl.ChooseConfig(true, mColorDepth);
+
+  // Create the OpenGL context
+  mEGL->CreateContext();
+
+  // Create the OpenGL surface
+  CreateSurface();
+
+  // Make it current
+  mEGL->MakeContextCurrent();
 }
 
 void WindowRenderSurface::CreateSurface()
@@ -222,7 +223,7 @@ void WindowRenderSurface::CreateSurface()
   auto eglGraphics = static_cast<EglGraphics *>(mGraphics);
 
   Internal::Adaptor::EglImplementation& eglImpl = eglGraphics->GetEglImplementation();
-  mEGLSurface = eglImpl.CreateSurfaceWindow( window, mColorDepth );
+  eglImpl.CreateSurfaceWindow( window, mColorDepth );
 
   // Check rotation capability
   mRotationSupported = mWindowBase->IsEglWindowRotationSupported();
@@ -237,7 +238,7 @@ void WindowRenderSurface::DestroySurface()
   auto eglGraphics = static_cast<EglGraphics *>(mGraphics);
 
   Internal::Adaptor::EglImplementation& eglImpl = eglGraphics->GetEglImplementation();
-  eglImpl.DestroySurface( mEGLSurface );
+  eglImpl.DestroySurface();
 
   mWindowBase->DestroyEglWindow();
 }
@@ -270,7 +271,7 @@ bool WindowRenderSurface::ReplaceGraphicsSurface()
   auto eglGraphics = static_cast<EglGraphics *>(mGraphics);
 
   Internal::Adaptor::EglImplementation& eglImpl = eglGraphics->GetEglImplementation();
-  return eglImpl.ReplaceSurfaceWindow( window, mEGLSurface, mEGLContext );
+  return eglImpl.ReplaceSurfaceWindow( window );
 }
 
 void WindowRenderSurface::MoveResize( Dali::PositionSize positionSize )
@@ -325,8 +326,6 @@ void WindowRenderSurface::StartRender()
 
 bool WindowRenderSurface::PreRender( bool resizingSurface )
 {
-  MakeContextCurrent();
-
   if( resizingSurface )
   {
 #ifdef OVER_TIZEN_VERSION_4
@@ -405,7 +404,7 @@ void WindowRenderSurface::PostRender( bool renderToFbo, bool replacingSurface, b
     }
 
     Internal::Adaptor::EglImplementation& eglImpl = eglGraphics->GetEglImplementation();
-    eglImpl.SwapBuffers( mEGLSurface );
+    eglImpl.SwapBuffers();
 
     if( mRenderNotification )
     {
@@ -430,29 +429,11 @@ void WindowRenderSurface::ReleaseLock()
   // Nothing to do.
 }
 
-Integration::RenderSurface::Type WindowRenderSurface::GetSurfaceType()
+RenderSurface::Type WindowRenderSurface::GetSurfaceType()
 {
   return RenderSurface::WINDOW_RENDER_SURFACE;
 }
 
-void WindowRenderSurface::MakeContextCurrent()
-{
-  if ( mEGL != nullptr )
-  {
-    mEGL->MakeContextCurrent( mEGLSurface, mEGLContext );
-  }
-}
-
-Integration::DepthBufferAvailable WindowRenderSurface::GetDepthBufferRequired()
-{
-  return mGraphics ? mGraphics->GetDepthBufferRequired() : Integration::DepthBufferAvailable::FALSE;
-}
-
-Integration::StencilBufferAvailable WindowRenderSurface::GetStencilBufferRequired()
-{
-  return mGraphics ? mGraphics->GetStencilBufferRequired() : Integration::StencilBufferAvailable::FALSE;
-}
-
 void WindowRenderSurface::OutputTransformed()
 {
   int screenRotationAngle = mWindowBase->GetScreenRotationAngle();
index 55bc955..a1ba715 100644 (file)
  */
 
 // INTERNAL INCLUDES
-#include <dali/internal/graphics/common/graphics-interface.h>
-
-#ifdef DALI_ADAPTOR_COMPILATION
+#include <dali/integration-api/render-surface.h>
 #include <dali/integration-api/egl-interface.h>
-#include <dali/integration-api/render-surface-interface.h>
-#else
-#include <dali/integration-api/adaptors/egl-interface.h>
-#include <dali/integration-api/adaptors/render-surface-interface.h>
-#endif
+#include <dali/internal/graphics/common/graphics-interface.h>
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/signals/connection-tracker.h>
 #include <dali/public-api/signals/dali-signal.h>
 
+
 namespace Dali
 {
 
@@ -44,12 +39,11 @@ namespace Adaptor
 {
 
 class WindowBase;
-class AdaptorInternalServices;
 
 /**
  * Window interface of render surface.
  */
-class WindowRenderSurface : public Dali::RenderSurfaceInterface, public ConnectionTracker
+class WindowRenderSurface : public Dali::RenderSurface, public ConnectionTracker
 {
 public:
 
@@ -118,10 +112,10 @@ public: // API
    */
   OutputSignalType& OutputTransformedSignal();
 
-public: // from Dali::Integration::RenderSurface
+public: // from Dali::RenderSurface
 
   /**
-   * @copydoc Dali::Integration::RenderSurface::GetPositionSize()
+   * @copydoc Dali::RenderSurface::GetPositionSize()
    */
   virtual PositionSize GetPositionSize() const override;
 
@@ -130,79 +124,64 @@ public: // from Dali::Integration::RenderSurface
   virtual void GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical ) override;
 
   /**
-   * @copydoc Dali::Integration::RenderSurface::InitializeGraphics()
+   * @copydoc Dali::RenderSurface::InitializeGraphics()
    */
-  virtual void InitializeGraphics() override;
+  virtual void InitializeGraphics( GraphicsInterface& graphics, Dali::DisplayConnection& displayConnection ) override;
 
   /**
-   * @copydoc Dali::Integration::RenderSurface::CreateSurface()
+   * @copydoc Dali::RenderSurface::CreateSurface()
    */
   virtual void CreateSurface() override;
 
   /**
-   * @copydoc Dali::Integration::RenderSurface::DestroySurface()
+   * @copydoc Dali::RenderSurface::DestroySurface()
    */
   virtual void DestroySurface() override;
 
   /**
-   * @copydoc Dali::Integration::RenderSurface::ReplaceGraphicsSurface()
+   * @copydoc Dali::RenderSurface::ReplaceGraphicsSurface()
    */
   virtual bool ReplaceGraphicsSurface() override;
 
   /**
-   * @copydoc Dali::Integration::RenderSurface::MoveResize()
+   * @copydoc Dali::RenderSurface::MoveResize()
    */
   virtual void MoveResize( Dali::PositionSize positionSize) override;
 
   /**
-   * @copydoc Dali::Integration::RenderSurface::StartRender()
+   * @copydoc Dali::RenderSurface::StartRender()
    */
   virtual void StartRender() override;
 
   /**
-   * @copydoc Dali::Integration::RenderSurface::PreRender()
+   * @copydoc Dali::RenderSurface::PreRender()
    */
   virtual bool PreRender( bool resizingSurface ) override;
 
   /**
-   * @copydoc Dali::Integration::RenderSurface::PostRender()
+   * @copydoc Dali::RenderSurface::PostRender()
    */
   virtual void PostRender( bool renderToFbo, bool replacingSurface, bool resizingSurface );
 
   /**
-   * @copydoc Dali::Integration::RenderSurface::StopRender()
+   * @copydoc Dali::RenderSurface::StopRender()
    */
   virtual void StopRender() override;
 
   /**
-   * @copydoc Dali::Integration::RenderSurface::SetThreadSynchronization
+   * @copydoc Dali::RenderSurface::SetThreadSynchronization
    */
   virtual void SetThreadSynchronization( ThreadSynchronizationInterface& threadSynchronization ) override;
 
   /**
-   * @copydoc Dali::Integration::RenderSurface::ReleaseLock()
+   * @copydoc Dali::RenderSurface::ReleaseLock()
    */
   virtual void ReleaseLock() override;
 
   /**
-   * @copydoc Dali::Integration::RenderSurface::GetSurfaceType()
-   */
-  virtual Integration::RenderSurface::Type GetSurfaceType() override;
-
-  /**
-   * @copydoc Dali::Integration::RenderSurface::MakeContextCurrent()
-   */
-  virtual void MakeContextCurrent() override;
-
-  /**
-   * @copydoc Dali::Integration::RenderSurface::GetDepthBufferRequired()
-   */
-  virtual Integration::DepthBufferAvailable GetDepthBufferRequired() override;
-
-  /**
-   * @copydoc Dali::Integration::RenderSurface::GetStencilBufferRequired()
+   * @copydoc Dali::RenderSurface::GetSurfaceType()
    */
-  virtual Integration::StencilBufferAvailable GetStencilBufferRequired() override;
+  virtual RenderSurface::Type GetSurfaceType() override;
 
 private:
 
@@ -231,16 +210,12 @@ protected:
 
 private: // Data
 
-  EglInterface*                   mEGL;
-  Dali::DisplayConnection*        mDisplayConnection;
   PositionSize                    mPositionSize;       ///< Position
   std::unique_ptr< WindowBase >   mWindowBase;
   ThreadSynchronizationInterface* mThreadSynchronization;
   TriggerEventInterface*          mRenderNotification; ///< Render notification trigger
   TriggerEventInterface*          mRotationTrigger;
   GraphicsInterface*              mGraphics;           ///< Graphics interface
-  EGLSurface                      mEGLSurface;
-  EGLContext                      mEGLContext;
   ColorDepth                      mColorDepth;         ///< Color depth of surface (32 bit or 24 bit)
   OutputSignalType                mOutputTransformedSignal;
   int                             mRotationAngle;
index f639ed5..195eda2 100755 (executable)
@@ -46,14 +46,14 @@ DisplayConnection* DisplayConnectionEcoreWl::New()
 
 DisplayConnectionEcoreWl::DisplayConnectionEcoreWl()
 : mDisplay( NULL ),
-  mSurfaceType( Integration::RenderSurface::WINDOW_RENDER_SURFACE ),
+  mSurfaceType( RenderSurface::WINDOW_RENDER_SURFACE ),
   mGraphics( nullptr )
 {
 }
 
 DisplayConnectionEcoreWl::~DisplayConnectionEcoreWl()
 {
-  if( mSurfaceType == Integration::RenderSurface::NATIVE_RENDER_SURFACE )
+  if( mSurfaceType == RenderSurface::NATIVE_RENDER_SURFACE )
   {
     ReleaseNativeDisplay();
   }
@@ -82,11 +82,11 @@ bool DisplayConnectionEcoreWl::InitializeGraphics()
   return true;
 }
 
-void DisplayConnectionEcoreWl::SetSurfaceType( Integration::RenderSurface::Type type )
+void DisplayConnectionEcoreWl::SetSurfaceType( RenderSurface::Type type )
 {
   mSurfaceType = type;
 
-  if( mSurfaceType == Integration::RenderSurface::NATIVE_RENDER_SURFACE )
+  if( mSurfaceType == RenderSurface::NATIVE_RENDER_SURFACE )
   {
     mDisplay = GetNativeDisplay();
   }
index 6bcf33d..cc31ef0 100644 (file)
@@ -72,7 +72,7 @@ public:
    * @brief Sets the surface type
    * @param[in] type The surface type
    */
-  void SetSurfaceType( Integration::RenderSurface::Type type );
+  void SetSurfaceType( RenderSurface::Type type );
 
   /**
    * @brief Sets the graphics interface
@@ -107,7 +107,7 @@ protected:
 
 private:
   EGLNativeDisplayType mDisplay;        ///< Wayland-display for rendering
-  Integration::RenderSurface::Type mSurfaceType;     ///< The surface type
+  RenderSurface::Type mSurfaceType;     ///< The surface type
   GraphicsInterface* mGraphics;         ///< The graphics interface
 };
 
index 38a44b4..e019b0a 100644 (file)
@@ -38,8 +38,6 @@
 #include <dali/internal/window-system/common/display-connection.h>
 #include <dali/internal/window-system/common/window-system.h>
 #include <dali/integration-api/thread-synchronization-interface.h>
-#include <dali/internal/adaptor/common/adaptor-impl.h>
-#include <dali/internal/adaptor/common/adaptor-internal-services.h>
 
 namespace Dali
 {
@@ -57,9 +55,6 @@ NativeRenderSurfaceEcoreWl::NativeRenderSurfaceEcoreWl( Dali::PositionSize posit
 : mPosition( positionSize ),
   mRenderNotification( NULL ),
   mGraphics( NULL ),
-  mEGL( nullptr ),
-  mEGLSurface( nullptr ),
-  mEGLContext( nullptr ),
   mColorDepth( isTransparent ? COLOR_DEPTH_32 : COLOR_DEPTH_24 ),
   mTbmFormat( isTransparent ? TBM_FORMAT_ARGB8888 : TBM_FORMAT_RGB888 ),
   mOwnSurface( false ),
@@ -137,25 +132,31 @@ void NativeRenderSurfaceEcoreWl::GetDpi( unsigned int& dpiHorizontal, unsigned i
   dpiVertical   = int( yres + 0.5f );
 }
 
-void NativeRenderSurfaceEcoreWl::InitializeGraphics()
+void NativeRenderSurfaceEcoreWl::InitializeGraphics( Internal::Adaptor::GraphicsInterface& graphics, DisplayConnection& displayConnection )
 {
   DALI_LOG_TRACE_METHOD( gNativeSurfaceLogFilter );
   unsetenv( "EGL_PLATFORM" );
 
-  mGraphics = &mAdaptor->GetGraphicsInterface();
+  mGraphics = &graphics;
+
   auto eglGraphics = static_cast<Internal::Adaptor::EglGraphics *>(mGraphics);
 
-  mEGL = &eglGraphics->GetEglInterface();
+  EglInterface* mEGL = eglGraphics->Create();
 
-  if ( mEGLContext == NULL )
-  {
-    // Create the OpenGL context for this window
-    Internal::Adaptor::EglImplementation& eglImpl = static_cast<Internal::Adaptor::EglImplementation&>(*mEGL);
-    eglImpl.CreateWindowContext( mEGLContext );
+  // Initialize EGL & OpenGL
+  displayConnection.Initialize();
 
-    // Create the OpenGL surface
-    CreateSurface();
-  }
+  Internal::Adaptor::EglImplementation& eglImpl = static_cast<Internal::Adaptor::EglImplementation&>(*mEGL);
+  eglImpl.ChooseConfig(true, mColorDepth);
+
+  // Create the OpenGL context
+  mEGL->CreateContext();
+
+  // Create the OpenGL surface
+  CreateSurface();
+
+  // Make it current
+  mEGL->MakeContextCurrent();
 }
 
 void NativeRenderSurfaceEcoreWl::CreateSurface()
@@ -165,7 +166,7 @@ void NativeRenderSurfaceEcoreWl::CreateSurface()
   auto eglGraphics = static_cast<Internal::Adaptor::EglGraphics *>(mGraphics);
   Internal::Adaptor::EglImplementation& eglImpl = eglGraphics->GetEglImplementation();
 
-  mEGLSurface = eglImpl.CreateSurfaceWindow( reinterpret_cast< EGLNativeWindowType >( mTbmQueue ), mColorDepth );
+  eglImpl.CreateSurfaceWindow( reinterpret_cast< EGLNativeWindowType >( mTbmQueue ), mColorDepth );
 }
 
 void NativeRenderSurfaceEcoreWl::DestroySurface()
@@ -175,7 +176,7 @@ void NativeRenderSurfaceEcoreWl::DestroySurface()
   auto eglGraphics = static_cast<Internal::Adaptor::EglGraphics *>(mGraphics);
   Internal::Adaptor::EglImplementation& eglImpl = eglGraphics->GetEglImplementation();
 
-  eglImpl.DestroySurface( mEGLSurface );
+  eglImpl.DestroySurface();
 }
 
 bool NativeRenderSurfaceEcoreWl::ReplaceGraphicsSurface()
@@ -190,7 +191,7 @@ bool NativeRenderSurfaceEcoreWl::ReplaceGraphicsSurface()
   auto eglGraphics = static_cast<Internal::Adaptor::EglGraphics *>(mGraphics);
   Internal::Adaptor::EglImplementation& eglImpl = eglGraphics->GetEglImplementation();
 
-  return eglImpl.ReplaceSurfaceWindow( reinterpret_cast< EGLNativeWindowType >( mTbmQueue ), mEGLSurface, mEGLContext );
+  return eglImpl.ReplaceSurfaceWindow( reinterpret_cast< EGLNativeWindowType >( mTbmQueue ) );
 }
 
 void NativeRenderSurfaceEcoreWl::MoveResize( Dali::PositionSize positionSize )
@@ -214,7 +215,7 @@ void NativeRenderSurfaceEcoreWl::PostRender( bool renderToFbo, bool replacingSur
   {
     Internal::Adaptor::EglImplementation& eglImpl = eglGraphics->GetEglImplementation();
 
-    eglImpl.SwapBuffers( mEGLSurface );
+    eglImpl.SwapBuffers();
   }
 
   if( mThreadSynchronization )
@@ -268,27 +269,9 @@ void NativeRenderSurfaceEcoreWl::SetThreadSynchronization( ThreadSynchronization
   mThreadSynchronization = &threadSynchronization;
 }
 
-Integration::RenderSurface::Type NativeRenderSurfaceEcoreWl::GetSurfaceType()
-{
-  return Integration::RenderSurface::NATIVE_RENDER_SURFACE;
-}
-
-void NativeRenderSurfaceEcoreWl::MakeContextCurrent()
-{
-  if ( mEGL != nullptr )
-  {
-    mEGL->MakeContextCurrent( mEGLSurface, mEGLContext );
-  }
-}
-
-Integration::DepthBufferAvailable NativeRenderSurfaceEcoreWl::GetDepthBufferRequired()
-{
-  return mGraphics ? mGraphics->GetDepthBufferRequired() : Integration::DepthBufferAvailable::FALSE;
-}
-
-Integration::StencilBufferAvailable NativeRenderSurfaceEcoreWl::GetStencilBufferRequired()
+RenderSurface::Type NativeRenderSurfaceEcoreWl::GetSurfaceType()
 {
-  return mGraphics ? mGraphics->GetStencilBufferRequired() : Integration::StencilBufferAvailable::FALSE;
+  return RenderSurface::NATIVE_RENDER_SURFACE;
 }
 
 void NativeRenderSurfaceEcoreWl::ReleaseLock()
index 8cd5a55..1199b3e 100644 (file)
@@ -32,7 +32,6 @@ namespace Dali
 {
 
 class DisplayConnection;
-class EglInterface;
 
 /**
  * Ecore Wayland Native implementation of render surface.
@@ -70,92 +69,77 @@ public: // from WindowRenderSurface
    */
   virtual void WaitUntilSurfaceReplaced() override;
 
-public: // from Dali::Integration::RenderSurface
+public: // from Dali::RenderSurface
 
   /**
-   * @copydoc Dali::Integration::RenderSurface::GetPositionSize()
+   * @copydoc Dali::RenderSurface::GetPositionSize()
    */
   virtual PositionSize GetPositionSize() const override;
 
   /**
-   * @copydoc Dali::Integration::RenderSurface::GetDpi()
+   * @copydoc Dali::RenderSurface::GetDpi()
    */
   virtual void GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical ) override;
 
   /**
-   * @copydoc Dali::Integration::RenderSurface::InitializeGraphics()
+   * @copydoc Dali::RenderSurface::InitializeGraphics()
    */
-  virtual void InitializeGraphics() override;
+  virtual void InitializeGraphics( Internal::Adaptor::GraphicsInterface& graphics, DisplayConnection& displayConnection ) override;
 
   /**
-   * @copydoc Dali::Integration::RenderSurface::CreateSurface()
+   * @copydoc Dali::RenderSurface::CreateSurface()
    */
   virtual void CreateSurface() override;
 
   /**
-   * @copydoc Dali::Integration::RenderSurface::DestroySurface()
+   * @copydoc Dali::RenderSurface::DestroySurface()
    */
   virtual void DestroySurface() override;
 
   /**
-   * @copydoc Dali::Integration::RenderSurface::ReplaceGraphicsSurface()
+   * @copydoc Dali::RenderSurface::ReplaceGraphicsSurface()
    */
   virtual bool ReplaceGraphicsSurface() override;
 
   /**
-   * @copydoc Dali::Integration::RenderSurface::MoveResize()
+   * @copydoc Dali::RenderSurface::MoveResize()
    */
   virtual void MoveResize( Dali::PositionSize positionSize) override;
 
   /**
-   * @copydoc Dali::Integration::RenderSurface::StartRender()
+   * @copydoc Dali::RenderSurface::StartRender()
    */
   virtual void StartRender() override;
 
   /**
-   * @copydoc Dali::Integration::RenderSurface::PreRender()
+   * @copydoc Dali::RenderSurface::PreRender()
    */
   virtual bool PreRender( bool resizingSurface ) override;
 
   /**
-   * @copydoc Dali::Integration::RenderSurface::PostRender()
+   * @copydoc Dali::RenderSurface::PostRender()
    */
   virtual void PostRender( bool renderToFbo, bool replacingSurface, bool resizingSurface );
 
   /**
-   * @copydoc Dali::Integration::RenderSurface::StopRender()
+   * @copydoc Dali::RenderSurface::StopRender()
    */
   virtual void StopRender() override;
 
   /**
-   * @copydoc Dali::Integration::RenderSurface::SetThreadSynchronization
+   * @copydoc Dali::RenderSurface::SetThreadSynchronization
    */
   virtual void SetThreadSynchronization( ThreadSynchronizationInterface& threadSynchronization )override;
 
   /**
-   * @copydoc Dali::Integration::RenderSurface::GetSurfaceType()
+   * @copydoc Dali::RenderSurface::GetSurfaceType()
    */
-  virtual Integration::RenderSurface::Type GetSurfaceType() override;
-
-  /**
-   * @copydoc Dali::Integration::RenderSurface::MakeContextCurrent()
-   */
-  virtual void MakeContextCurrent() override;
-
-  /**
-   * @copydoc Dali::Integration::RenderSurface::GetDepthBufferRequired()
-   */
-  virtual Integration::DepthBufferAvailable GetDepthBufferRequired() override;
-
-  /**
-   * @copydoc Dali::Integration::RenderSurface::GetStencilBufferRequired()
-   */
-  virtual Integration::StencilBufferAvailable GetStencilBufferRequired() override;
+  virtual RenderSurface::Type GetSurfaceType() override;
 
 private:
 
   /**
-   * @copydoc Dali::Integration::RenderSurface::ReleaseLock()
+   * @copydoc Dali::RenderSurface::ReleaseLock()
    */
   virtual void ReleaseLock() override;
 
@@ -174,9 +158,6 @@ private: // Data
   PositionSize                           mPosition;
   TriggerEventInterface*                 mRenderNotification;
   Internal::Adaptor::GraphicsInterface*  mGraphics;                  ///< The graphics interface
-  EglInterface*                          mEGL;
-  EGLSurface                             mEGLSurface;
-  EGLContext                             mEGLContext;
   ColorDepth                             mColorDepth;
   tbm_format                             mTbmFormat;
   bool                                   mOwnSurface;
index ba1af14..e605892 100644 (file)
@@ -97,9 +97,9 @@ bool DisplayConnectionX11::InitializeGraphics()
   return true;
 }
 
-void DisplayConnectionX11::SetSurfaceType( Integration::RenderSurface::Type type )
+void DisplayConnectionX11::SetSurfaceType( RenderSurface::Type type )
 {
-  if( type == Integration::RenderSurface::WINDOW_RENDER_SURFACE )
+  if( type == RenderSurface::WINDOW_RENDER_SURFACE )
   {
     // Because of DDK issue, we need to use separated x display instead of ecore default display
     mDisplay = XOpenDisplay(0);
index 4f6890f..ef2ac82 100644 (file)
@@ -81,7 +81,7 @@ public:
   /**
    * @copydoc Dali::Internal::Adaptor::DisplayConnection::SetSurfaceType
    */
-  void SetSurfaceType( Integration::RenderSurface::Type type );
+  void SetSurfaceType( RenderSurface::Type type );
 
   /**
    * @copydoc Dali::Internal::Adaptor::DisplayConnection::SetGraphicsInterface
index c8e049c..03259eb 100644 (file)
@@ -35,8 +35,6 @@
 #include <dali/internal/system/common/trigger-event.h>
 #include <dali/internal/window-system/common/display-connection.h>
 #include <dali/internal/graphics/gles/egl-graphics.h>
-#include <dali/internal/adaptor/common/adaptor-impl.h>
-#include <dali/internal/adaptor/common/adaptor-internal-services.h>
 
 
 namespace Dali
@@ -148,11 +146,10 @@ void PixmapRenderSurfaceEcoreX::GetDpi( unsigned int& dpiHorizontal, unsigned in
   dpiVertical   = int( yres + 0.5f );
 }
 
-void PixmapRenderSurfaceEcoreX::InitializeGraphics()
+void PixmapRenderSurfaceEcoreX::InitializeGraphics( GraphicsInterface& graphics, Dali::DisplayConnection& displayConnection )
 {
-  mGraphics = &mAdaptor->GetGraphicsInterface();
-  mDisplayConnection = &mAdaptor->GetDisplayConnectionInterface();
-
+  mGraphics = &graphics;
+  mDisplayConnection = &displayConnection;
 
   auto eglGraphics = static_cast<EglGraphics *>(mGraphics);
   Internal::Adaptor::EglImplementation& eglImpl = eglGraphics->GetEglImplementation();
@@ -188,7 +185,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<XPixmap>( mX11Pixmaps[i] );
     eglImpl.MakeCurrent( EGLNativePixmapType( pixmap ), mEglSurfaces[i] );
-    eglImpl.DestroySurface( mEglSurfaces[i] );
+    eglImpl.DestroySurface();
   }
 }
 
@@ -310,13 +307,9 @@ void PixmapRenderSurfaceEcoreX::ReleaseLock()
   }
 }
 
-Integration::RenderSurface::Type PixmapRenderSurfaceEcoreX::GetSurfaceType()
-{
-  return Integration::RenderSurface::PIXMAP_RENDER_SURFACE;
-}
-
-void PixmapRenderSurfaceEcoreX::MakeContextCurrent()
+RenderSurface::Type PixmapRenderSurfaceEcoreX::GetSurfaceType()
 {
+  return RenderSurface::PIXMAP_RENDER_SURFACE;
 }
 
 void PixmapRenderSurfaceEcoreX::CreateRenderable()
index 1f4a305..873e7f4 100644 (file)
@@ -70,82 +70,77 @@ public: // from WindowRenderSurface
    */
   virtual void SetRenderNotification( TriggerEventInterface* renderNotification ) override;
 
-public: // from Dali::Integration::RenderSurface
+public: // from Dali::RenderSurface
 
   /**
-   * @copydoc Dali::Integration::RenderSurface::GetPositionSize()
+   * @copydoc Dali::RenderSurface::GetPositionSize()
    */
   virtual PositionSize GetPositionSize() const override;
 
   /**
-   * @copydoc Dali::Integration::RenderSurface::GetDpi()
+   * @copydoc Dali::RenderSurface::GetDpi()
    */
   virtual void GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical ) override;
 
   /**
-   * @copydoc Dali::Integration::RenderSurface::InitializeGraphics()
+   * @copydoc Dali::RenderSurface::InitializeGraphics()
    */
-  virtual void InitializeGraphics() override;
+  virtual void InitializeGraphics( GraphicsInterface& graphics, Dali::DisplayConnection& displayConnection ) override;
 
   /**
-   * @copydoc Dali::Integration::RenderSurface::CreateSurface()
+   * @copydoc Dali::RenderSurface::CreateSurface()
    */
   virtual void CreateSurface() override;
 
   /**
-   * @copydoc Dali::Integration::RenderSurface::DestroySurface()
+   * @copydoc Dali::RenderSurface::DestroySurface()
    */
   virtual void DestroySurface() override;
 
   /**
-   * @copydoc Dali::Integration::RenderSurface::ReplaceGraphicsSurface()
+   * @copydoc Dali::RenderSurface::ReplaceGraphicsSurface()
    */
   virtual bool ReplaceGraphicsSurface() override;
 
   /**
-   * @copydoc Dali::Integration::RenderSurface::MoveResize()
+   * @copydoc Dali::RenderSurface::MoveResize()
    */
   virtual void MoveResize( Dali::PositionSize positionSize) override {}
 
   /**
-   * @copydoc Dali::Integration::RenderSurface::StartRender()
+   * @copydoc Dali::RenderSurface::StartRender()
    */
   virtual void StartRender() override;
 
   /**
-   * @copydoc Dali::Integration::RenderSurface::PreRender()
+   * @copydoc Dali::RenderSurface::PreRender()
    */
   virtual bool PreRender( bool resizingSurface ) override;
 
   /**
-   * @copydoc Dali::Integration::RenderSurface::PostRender()
+   * @copydoc Dali::RenderSurface::PostRender()
    */
   virtual void PostRender( bool renderToFbo, bool replacingSurface, bool resizingSurface ) override;
 
   /**
-   * @copydoc Dali::Integration::RenderSurface::StopRender()
+   * @copydoc Dali::RenderSurface::StopRender()
    */
   virtual void StopRender() override;
 
   /**
-   * @copydoc Dali::Integration::RenderSurface::SetThreadSynchronization
+   * @copydoc Dali::RenderSurface::SetThreadSynchronization
    */
   virtual void SetThreadSynchronization( ThreadSynchronizationInterface& threadSynchronization ) override;
 
   /**
-   * @copydoc Dali::Integration::RenderSurface::GetSurfaceType()
+   * @copydoc Dali::RenderSurface::GetSurfaceType()
    */
-  virtual Integration::RenderSurface::Type GetSurfaceType() override;
-
-  /**
-   * @copydoc Dali::Integration::RenderSurface::MakeContextCurrent()
-   */
-  virtual void MakeContextCurrent() override;
+  virtual RenderSurface::Type GetSurfaceType() override;
 
 private: // from PixmapRenderSurface
 
   /**
-   * @copydoc Dali::Integration::RenderSurface::ReleaseLock()
+   * @copydoc Dali::RenderSurface::ReleaseLock()
    */
   virtual void ReleaseLock() override;
 
index ea9e4ae..293e47b 100644 (file)
@@ -19,7 +19,6 @@
 #include <dali/public-api/adaptor-framework/window.h>
 
 // INTERNAL INCLUDES
-#include <dali/public-api/actors/actor.h>
 #include <dali/internal/window-system/common/window-impl.h>
 #include <dali/internal/window-system/common/orientation-impl.h>
 
index 404fd3e..5cf7b7a 100755 (executable)
@@ -23,7 +23,6 @@
 #include <dali/public-api/math/rect.h>
 #include <dali/public-api/math/uint-16-pair.h>
 #include <dali/public-api/math/vector2.h>
-#include <dali/public-api/math/vector4.h>
 #include <dali/public-api/object/base-handle.h>
 #include <dali/public-api/object/any.h>
 #include <dali/public-api/signals/dali-signal.h>
@@ -50,8 +49,6 @@ class Window;
 
 class DragAndDropDetector;
 class Orientation;
-class Actor;
-class Layer;
 
 /**
  * @brief The window class is used internally for drawing.