Removed Integration::GraphicsInterface
authorDavid Steele <david.steele@samsung.com>
Wed, 23 Jan 2019 16:10:12 +0000 (16:10 +0000)
committerDavid Steele <david.steele@samsung.com>
Thu, 31 Jan 2019 17:04:31 +0000 (17:04 +0000)
Core was only using it to get the Graphics::Controller.
Have modified Core interface to take a ref to the controller instead of the interface,
and am using Controller everywhere instead of Graphics interface.

Tidied up the API slightly.

Change-Id: I6c693811959f8542601708aa0d51a2642031e13a

37 files changed:
automated-tests/src/dali/dali-test-suite-utils/test-application.cpp
automated-tests/src/dali/dali-test-suite-utils/test-application.h
automated-tests/src/dali/dali-test-suite-utils/test-graphics-framebuffer-factory.cpp
automated-tests/src/dali/dali-test-suite-utils/test-graphics-framebuffer-factory.h
automated-tests/src/dali/dali-test-suite-utils/test-graphics-texture-factory.cpp
automated-tests/src/dali/dali-test-suite-utils/test-graphics-texture-factory.h
automated-tests/src/dali/dali-test-suite-utils/test-graphics.cpp [deleted file]
automated-tests/src/dali/dali-test-suite-utils/test-graphics.h [deleted file]
build/tizen/dali-core/Makefile.am
dali/graphics-api/file.list
dali/graphics-api/graphics-api-framebuffer-factory.h
dali/graphics-api/graphics-api-texture-factory.h
dali/graphics-api/graphics-api-types.h
dali/graphics-api/graphics-api-utility.h [deleted file]
dali/integration-api/core.cpp
dali/integration-api/core.h
dali/integration-api/file.list
dali/integration-api/graphics/graphics-interface.h [deleted file]
dali/internal/common/core-impl.cpp
dali/internal/common/core-impl.h
dali/internal/update/graphics/graphics-algorithms.h
dali/internal/update/manager/update-manager.cpp
dali/internal/update/manager/update-manager.h
dali/internal/update/rendering/scene-graph-frame-buffer.cpp
dali/internal/update/rendering/scene-graph-frame-buffer.h
dali/internal/update/rendering/scene-graph-geometry.cpp
dali/internal/update/rendering/scene-graph-geometry.h
dali/internal/update/rendering/scene-graph-property-buffer.cpp
dali/internal/update/rendering/scene-graph-property-buffer.h
dali/internal/update/rendering/scene-graph-renderer.cpp
dali/internal/update/rendering/scene-graph-renderer.h
dali/internal/update/rendering/scene-graph-sampler.h
dali/internal/update/rendering/scene-graph-shader.cpp
dali/internal/update/rendering/scene-graph-shader.h
dali/internal/update/rendering/scene-graph-texture.cpp
dali/internal/update/rendering/scene-graph-texture.h
dali/internal/update/rendering/shader-cache.h

index 97cf4452b514c619abcbb0c893305727cf174067..4368b298ab1598233acf96f11f110bf1b0439309 100644 (file)
@@ -36,13 +36,7 @@ TestApplication::TestApplication( uint32_t surfaceWidth,
   mLastVSyncTime(0u),
   mDataRetentionPolicy( policy )
 {
-  Dali::Integration::Graphics::GraphicsCreateInfo info;
-  info.surfaceWidth = 480;
-  info.surfaceHeight = 800;
-  info.depthStencilMode = Integration::Graphics::DepthStencilMode::NONE;
-  mGraphics = std::unique_ptr<Test::Graphics>( new Test::Graphics( info,
-                                                                   Integration::DepthBufferAvailable::FALSE,
-                                                                   Integration::StencilBufferAvailable::FALSE));
+  mGraphicsController = std::unique_ptr<Test::GraphicsController>( new Test::GraphicsController() );
 
   Initialize();
 }
@@ -54,7 +48,7 @@ void TestApplication::Initialize()
 
   mCore = Dali::Integration::Core::New( mRenderController,
                                         mPlatformAbstraction,
-                                        *mGraphics,
+                                        *mGraphicsController,
                                         mGestureManager,
                                         mDataRetentionPolicy,
                                         Integration::RenderToFrameBuffer::FALSE,
index 8b6ab51afdb82bd669868ec8f1097bffe0c5d92c..8f53ca576bacca616bdbddb982ad0e6824f6cd56 100644 (file)
 #include <test-platform-abstraction.h>
 #include "test-gesture-manager.h"
 #include "test-render-controller.h"
-#include "test-graphics.h"
+#include "test-graphics-controller.h"
 #include <dali/public-api/common/dali-common.h>
 #include <dali/public-api/signals/connection-tracker.h>
 #include <dali/integration-api/core.h>
-#include <dali/integration-api/graphics/graphics-interface.h>
 #include <dali/integration-api/resource-policies.h>
 #include <dali/integration-api/trace.h>
 
@@ -88,7 +87,7 @@ private:
 
 protected:
   TestPlatformAbstraction             mPlatformAbstraction;
-  std::unique_ptr<Test::Graphics>     mGraphics;
+  std::unique_ptr<Test::GraphicsController> mGraphicsController;
   TestRenderController                mRenderController;
   TestGestureManager                  mGestureManager;
 
index b65f4902822995bbd04239db8d187f08ba52515e..6ef74278f8ed164ce59e61d4d82aefe00455f86d 100644 (file)
@@ -21,7 +21,7 @@ namespace Test
 GraphicsFramebufferFactory::GraphicsFramebufferFactory() = default;
 GraphicsFramebufferFactory::~GraphicsFramebufferFactory() = default;
 
-Dali::Graphics::FramebufferFactory& GraphicsFramebufferFactory::SetSize( const Dali::Graphics::RectSize& size )
+Dali::Graphics::FramebufferFactory& GraphicsFramebufferFactory::SetSize( const Dali::Graphics::Extent2D& size )
 {
   return *this;
 }
index cde2dff2de7268294c5434befa2f1ba7e95e3ac1..9cd4c80c8d423a9bd4eadd150e4d3e02cf3c8aba 100644 (file)
@@ -28,7 +28,7 @@ public:
   GraphicsFramebufferFactory();
   virtual ~GraphicsFramebufferFactory();
 
-  Dali::Graphics::FramebufferFactory& SetSize( const Dali::Graphics::RectSize& size ) override;
+  Dali::Graphics::FramebufferFactory& SetSize( const Dali::Graphics::Extent2D& size ) override;
 
   Dali::Graphics::FramebufferFactory& SetColorAttachment( Dali::Graphics::TextureDetails::AttachmentId attachmentIndex,
                                                                const Dali::Graphics::Texture&               texture,
index 067561c21cbf7bd7d071d85fb9a66e35636c0eda..4b0faec436baa04bbcda73384fcb72305042d9d0 100644 (file)
@@ -27,7 +27,7 @@ Dali::Graphics::TextureFactory& GraphicsTextureFactory::SetType(Dali::Graphics::
 {
   return *this;
 }
-Dali::Graphics::TextureFactory& GraphicsTextureFactory::SetSize(const Dali::Graphics::RectSize& size)
+Dali::Graphics::TextureFactory& GraphicsTextureFactory::SetSize(const Dali::Graphics::Extent2D& size)
 {
   return *this;
 }
index 2fded333185f1cf7457a04efb74fbe96622b180a..832f49ca66399eff0c5d35122139bd83a135abd9 100644 (file)
@@ -29,7 +29,7 @@ public:
   virtual ~GraphicsTextureFactory();
 
   Dali::Graphics::TextureFactory& SetType(Dali::Graphics::TextureDetails::Type type) override;
-  Dali::Graphics::TextureFactory& SetSize(const Dali::Graphics::RectSize& size) override;
+  Dali::Graphics::TextureFactory& SetSize(const Dali::Graphics::Extent2D& size) override;
   Dali::Graphics::TextureFactory& SetFormat(Dali::Graphics::TextureDetails::Format format) override;
   Dali::Graphics::TextureFactory& SetMipMapFlag(Dali::Graphics::TextureDetails::MipMapFlag mipMapFlag) override;
   Dali::Graphics::TextureFactory& SetUsage( Dali::Graphics::TextureDetails::Usage usage ) override;
diff --git a/automated-tests/src/dali/dali-test-suite-utils/test-graphics.cpp b/automated-tests/src/dali/dali-test-suite-utils/test-graphics.cpp
deleted file mode 100644 (file)
index ff67d0f..0000000
+++ /dev/null
@@ -1,80 +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-graphics.h"
-#include "test-graphics-controller.h"
-
-namespace Test
-{
-
-struct Graphics::Impl
-{
-public:
-  GraphicsController controller;
-};
-
-
-
-Graphics::Graphics( const Dali::Integration::Graphics::GraphicsCreateInfo& info,
-                    Dali::Integration::DepthBufferAvailable depthBufferAvailable,
-                    Dali::Integration::StencilBufferAvailable stencilBufferRequired )
-: GraphicsInterface( info, depthBufferAvailable, stencilBufferRequired ),
-  mImpl(new Graphics::Impl() )
-{
-}
-
-Graphics::~Graphics() = default;
-
-void Graphics::Initialize()
-{
-}
-
-void Graphics::Create()
-{
-}
-
-void Graphics::Destroy()
-{
-}
-
-void Graphics::Pause()
-{
-}
-
-void Graphics::Resume()
-{
-}
-
-void Graphics::PreRender()
-{
-}
-
-void Graphics::PostRender()
-{
-}
-
-Dali::Graphics::Controller& Graphics::GetController()
-{
-  return mImpl->controller;
-}
-
-void Graphics::SurfaceResized( unsigned int width, unsigned int height )
-{
-}
-
-
-} // Namespace Test
diff --git a/automated-tests/src/dali/dali-test-suite-utils/test-graphics.h b/automated-tests/src/dali/dali-test-suite-utils/test-graphics.h
deleted file mode 100644 (file)
index 038551f..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-#ifndef TEST_GRAPHICS_H
-#define TEST_GRAPHICS_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/integration-api/graphics/graphics-interface.h>
-
-// EXTERNAL INCLUDES
-#include <memory>
-
-#define EXPORT_API __attribute__ ((visibility ("default")))
-
-namespace Test
-{
-class Controller;
-
-/**
- * Graphics implementation class
- */
-class Graphics : public Dali::Integration::Graphics::GraphicsInterface
-{
-public:
-
-  Graphics( const Dali::Integration::Graphics::GraphicsCreateInfo& info,
-            Dali::Integration::DepthBufferAvailable depthBufferAvailable,
-            Dali::Integration::StencilBufferAvailable stencilBufferRequired );
-
-  ~Graphics();
-
-  void Initialize() override;
-
-  void Create() override;
-
-  void Destroy() override;
-
-  /**
-   * Lifecycle event for pausing application
-   */
-  void Pause() override;
-
-  /**
-   * Lifecycle event for resuming application
-   */
-  void Resume() override;
-
-  /**
-   * Prerender
-   */
-  void PreRender() override;
-
-  /*
-   * Postrender
-   */
-  void PostRender() override;
-
-  /**
-   * Returns controller object
-   * @return
-   */
-  Dali::Graphics::Controller& GetController();
-
-  /*
-   * Surface resized
-   */
-  void SurfaceResized( unsigned int width, unsigned int height );
-
-  Dali::Integration::Graphics::GraphicsCreateInfo& GetCreateInfo()
-  {
-    return mCreateInfo;
-  }
-
-private:
-  Dali::Integration::Graphics::GraphicsCreateInfo mCreateInfo;
-
-  struct Impl;
-  Impl* mImpl;
-};
-
-
-} // Namespace Test
-
-#endif // TEST_GRAPHICS_H
index 663a9288fb3de939522e26a3194b460d1dff11c7..102ea5fa41266c0c11a52d4b9044f06efa8089d8 100644 (file)
@@ -77,11 +77,9 @@ endif
 # Install headers under the correct subdirectories
 platformabstractiondir = $(includedir)/dali/integration-api
 platformabstractioneventsdir = $(includedir)/dali/integration-api/events
-platformabstractiongraphicsdir = $(includedir)/dali/integration-api/graphics
 
 platformabstraction_HEADERS = $(platform_abstraction_header_files)
 platformabstractionevents_HEADERS = $(platform_abstraction_events_header_files)
-platformabstractiongraphics_HEADERS = $(graphics_integration_header_files)
 
 # Graphics API (Integration)
 graphicsapidir = $(includedir)/dali/graphics-api
@@ -155,7 +153,6 @@ noinst_PROGRAMS = linker.test
 linker_test_SOURCES = linker-test.cpp  \
     ../../../automated-tests/src/dali/dali-test-suite-utils/test-application.cpp \
     ../../../automated-tests/src/dali/dali-test-suite-utils/test-graphics-controller.cpp \
-    ../../../automated-tests/src/dali/dali-test-suite-utils/test-graphics.cpp \
     ../../../automated-tests/src/dali/dali-test-suite-utils/test-graphics-buffer-factory.cpp \
     ../../../automated-tests/src/dali/dali-test-suite-utils/test-graphics-framebuffer-factory.cpp \
     ../../../automated-tests/src/dali/dali-test-suite-utils/test-graphics-pipeline-factory.cpp \
index 7974da3c19dec6d24e484b74251aa03f3de49663..6ba6d2c64ace4fe26ea7ad682508f6d4525a1d48 100644 (file)
@@ -23,5 +23,4 @@ graphics_api_header_files = \
     $(graphics_api_src_dir)/graphics-api-texture-factory.h \
     $(graphics_api_src_dir)/graphics-api-texture.h \
     $(graphics_api_src_dir)/graphics-api-types-debug.h \
-    $(graphics_api_src_dir)/graphics-api-types.h \
-    $(graphics_api_src_dir)/graphics-api-utility.h
+    $(graphics_api_src_dir)/graphics-api-types.h
index 3539389212bfefeaf178dea96ad6365890e124e0..d990d99437af7b9a1b50acd4ba9986b4c24b207f 100644 (file)
@@ -22,7 +22,6 @@
 #include <dali/graphics-api/graphics-api-framebuffer.h>
 #include <dali/graphics-api/graphics-api-texture-details.h>
 #include <dali/graphics-api/graphics-api-texture.h>
-#include <dali/graphics-api/graphics-api-utility.h>
 
 namespace Dali
 {
@@ -38,7 +37,7 @@ public:
   /**
    * @brief Set the size of framebuffer
    */
-  virtual FramebufferFactory& SetSize( const RectSize& size ) = 0;
+  virtual FramebufferFactory& SetSize( const Extent2D& size ) = 0;
 
   /**
    * @brief Set a color attachment texture on the framebuffer
index efee1515b4212573ad57f8bb34d7c0d9eff884f4..255e648b2712a2202ab8d687120e225fd271562f 100644 (file)
@@ -21,7 +21,6 @@
 #include <dali/graphics-api/graphics-api-base-factory.h>
 #include <dali/graphics-api/graphics-api-texture-details.h>
 #include <dali/graphics-api/graphics-api-texture.h>
-#include <dali/graphics-api/graphics-api-utility.h>
 
 namespace Dali
 {
@@ -35,7 +34,7 @@ class TextureFactory : public BaseFactory<Texture>
 {
 public:
   virtual TextureFactory& SetType(TextureDetails::Type type)             = 0;
-  virtual TextureFactory& SetSize(const RectSize& size)                  = 0;
+  virtual TextureFactory& SetSize(const Extent2D& size)                  = 0;
   virtual TextureFactory& SetFormat(TextureDetails::Format format)       = 0;
   virtual TextureFactory& SetMipMapFlag(TextureDetails::MipMapFlag mipMapFlag) = 0;
   virtual TextureFactory& SetUsage( TextureDetails::Usage usage )        = 0;
index ecb7f5941058431fc556da729169889a01188dce..48e7d0cb079e94456b49517b118179ded954d4a5 100644 (file)
@@ -18,7 +18,6 @@
  *
  */
 
-#include <dali/graphics-api/graphics-api-utility.h>
 #include <vector>
 #include <string>
 
diff --git a/dali/graphics-api/graphics-api-utility.h b/dali/graphics-api/graphics-api-utility.h
deleted file mode 100644 (file)
index e04d9b4..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#ifndef DALI_GRAPHICS_API_UTILITY_H
-#define DALI_GRAPHICS_API_UTILITY_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.
- *
- */
-
-// EXTERNAL INCLUDES
-#include <cstdint>
-#include <cstdlib>
-
-namespace Dali
-{
-namespace Graphics
-{
-
-/**
- * Structure that represents a rectangular size
- */
-struct RectSize {
-  size_t width = 0;
-  size_t height = 0;
-};
-
-} // namespace Graphics
-} // namespace Dali
-
-#endif // DALI_GRAPHICS_API_UTILITY_H
index 230650e44f6a6ddee013fb01ca8bfa9a3b6764ae..6cae5164b7254cfc1d301749312ffcbcb96836e6 100644 (file)
 #include <dali/public-api/common/dali-common.h>
 #include <dali/integration-api/events/event.h>
 #include <dali/integration-api/debug.h>
-#include <dali/integration-api/graphics/graphics-interface.h>
+#include <dali/graphics-api/graphics-api-controller.h>
 #include <dali/internal/common/core-impl.h>
 
-using Dali::Integration::Graphics::GraphicsInterface;
 
 namespace Dali
 {
@@ -34,7 +33,7 @@ namespace Integration
 
 Core* Core::New( RenderController& renderController,
                  PlatformAbstraction& platformAbstraction,
-                 GraphicsInterface& graphics,
+                 Graphics::Controller& graphicsController,
                  GestureManager& gestureManager,
                  ResourcePolicy::DataRetention policy,
                  RenderToFrameBuffer renderToFboEnabled,
@@ -44,7 +43,7 @@ Core* Core::New( RenderController& renderController,
   Core* instance = new Core;
   instance->mImpl = new Internal::Core( renderController,
                                         platformAbstraction,
-                                        graphics,
+                                        graphicsController,
                                         gestureManager,
                                         policy,
                                         renderToFboEnabled,
index 69564f7f0d97677fc09149c0f856fbe30fe7f774..3177b343b3c0821ce19b6fdad0275b4ed57c39cf 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTEGRATION_CORE_H
 
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * 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.
@@ -34,13 +34,13 @@ namespace Internal
 class Core;
 }
 
-namespace Integration
-{
 namespace Graphics
 {
-class GraphicsInterface;
+class Controller;
 }
 
+namespace Integration
+{
 class Core;
 class GestureManager;
 class PlatformAbstraction;
@@ -237,7 +237,7 @@ public:
    * This object is used for integration with the native windowing system.
    * @param[in] renderController The interface to an object which controls rendering.
    * @param[in] platformAbstraction The interface providing platform specific services.
-   * @param[in] graphics The interface providing graphics services
+   * @param[in] graphicsController The interface providing graphics services
    * @param[in] gestureManager The interface providing gesture manager services.
    * @param[in] policy The data retention policy. This depends on application setting
    * and platform support. Dali should honour this policy when deciding to discard
@@ -249,7 +249,7 @@ public:
    */
   static Core* New( RenderController& renderController,
                     PlatformAbstraction& platformAbstraction,
-                    Graphics::GraphicsInterface& graphics,
+                    Graphics::Controller& graphics,
                     GestureManager& gestureManager,
                     ResourcePolicy::DataRetention policy,
                     RenderToFrameBuffer renderToFboEnabled,
index ea20a8d357ca824df7564599c1322dcfde9eb8eb..5c31088024d63127fae9907282e7409f4b973e3b 100644 (file)
@@ -56,6 +56,3 @@ platform_abstraction_events_header_files = \
    $(platform_abstraction_src_dir)/events/tap-gesture-event.h \
    $(platform_abstraction_src_dir)/events/touch-event-combiner.h \
    $(platform_abstraction_src_dir)/events/touch-event-integ.h
-
-graphics_integration_header_files = \
-  $(platform_abstraction_src_dir)/graphics/graphics-interface.h
diff --git a/dali/integration-api/graphics/graphics-interface.h b/dali/integration-api/graphics/graphics-interface.h
deleted file mode 100644 (file)
index d5c3e01..0000000
+++ /dev/null
@@ -1,168 +0,0 @@
-#ifndef DALI_INTEGRATION_GRAPHICS_INTERFACE_H
-#define DALI_INTEGRATION_GRAPHICS_INTERFACE_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.
- */
-
-#include <dali/public-api/common/dali-common.h>
-#include <dali/integration-api/core-enumerations.h>
-#include <dali/graphics-api/graphics-api-controller.h>
-
-namespace Dali
-{
-
-namespace Integration
-{
-namespace Graphics
-{
-
-enum class DepthStencilMode
-{
-  /**
-   * No depth/stencil at all
-   */
-  NONE,
-
-  /**
-   * Optimal depth ( chosen by the implementation )
-   */
-  DEPTH_OPTIMAL,
-
-  /**
-   * Optimal depth and stencil ( chosen by the implementation )
-   */
-  DEPTH_STENCIL_OPTIMAL,
-
-  /**
-   * Depth and stencil with explicit format set in depthStencilFormat
-   */
-  DEPTH_STENCIL_EXPLICIT,
-};
-
-enum class SwapchainBufferingMode
-{
-  OPTIMAL = 0,
-  DOUBLE_BUFFERING = 2,
-  TRIPLE_BUFFERING = 3,
-};
-
-struct GraphicsCreateInfo
-{
-  uint32_t                    surfaceWidth;
-  uint32_t                    surfaceHeight;
-  DepthStencilMode            depthStencilMode;
-  SwapchainBufferingMode      swapchainBufferingMode;
-};
-
-
-/**
- * Graphics interface
- */
-class DALI_CORE_API GraphicsInterface
-{
-public:
-  /**
-   * Constructor
-   */
-  GraphicsInterface( const GraphicsCreateInfo& info,
-                     Integration::DepthBufferAvailable depthBufferRequired,
-                     Integration::StencilBufferAvailable stencilBufferRequired )
-  : mCreateInfo( info ),
-    mDepthBufferRequired( depthBufferRequired ),
-    mStencilBufferRequired( stencilBufferRequired )
-  {
-  }
-
-
-  /**
-   * Initialize the graphics interface
-   */
-  virtual void Initialize() = 0;
-
-  /**
-   * Create the  Graphics Factory implementation
-   */
-  virtual void Create() = 0;
-
-  /**
-   * Destroy the Graphics Factory implementation
-   */
-  virtual void Destroy() = 0;
-
-  /**
-   * Lifecycle event for pausing application
-   */
-  virtual void Pause() = 0;
-
-  /**
-   * Lifecycle event for resuming application
-   */
-  virtual void Resume() = 0;
-
-  /**
-   * Prerender
-   */
-  virtual void PreRender() = 0;
-
-  /*
-   * Postrender
-   */
-  virtual void PostRender() = 0;
-
-  /**
-   * Returns controller object
-   * @return
-   */
-  virtual Dali::Graphics::Controller& GetController() = 0;
-
-  /*
-   * Surface resized
-   */
-  virtual void SurfaceResized( unsigned int width, unsigned int height ) = 0;
-
-  /**
-   * Get whether the depth buffer is required
-   * @return TRUE if the depth buffer is required
-   */
-  Integration::DepthBufferAvailable GetDepthBufferRequired() const
-  {
-    return mDepthBufferRequired;
-  };
-
-  /**
-   * Get whether the stencil buffer is required
-   * @return TRUE if the stencil buffer is required
-   */
-  Integration::StencilBufferAvailable GetStencilBufferRequired() const
-  {
-    return mStencilBufferRequired;
-  };
-
-protected:
-  // No destruction through this interface
-  virtual ~GraphicsInterface() = default;
-
-protected:
-  GraphicsCreateInfo mCreateInfo;
-  const Integration::DepthBufferAvailable mDepthBufferRequired;       ///< Whether the depth buffer is required
-  const Integration::StencilBufferAvailable mStencilBufferRequired;   ///< Whether the stencil buffer is required
-};
-
-} // namespace Graphics
-} // namespace Integration
-} // namespace Dali
-
-#endif //DALI_INTEGRATION_GRAPHICS_INTERFACE_H
index 856b4e726fcf2490b05a09af6ed9b684e6faed70..2c852521f597b027fb714c9f5a3ba4c6c9cf89cb 100644 (file)
@@ -23,7 +23,6 @@
 #include <dali/integration-api/core.h>
 #include <dali/integration-api/debug.h>
 #include <dali/integration-api/events/event.h>
-#include <dali/integration-api/graphics/graphics-interface.h>
 #include <dali/integration-api/platform-abstraction.h>
 #include <dali/integration-api/render-controller.h>
 #include <dali/integration-api/system-overlay.h>
@@ -72,12 +71,12 @@ using Integration::GestureManager;
 using Integration::Event;
 using Integration::UpdateStatus;
 using Integration::RenderStatus;
-using Integration::Graphics::GraphicsInterface;
+
 
 
 Core::Core( RenderController& renderController,
             PlatformAbstraction& platform,
-            GraphicsInterface& graphics,
+            Graphics::Controller& graphicsController,
             GestureManager& gestureManager,
             ResourcePolicy::DataRetention dataRetentionPolicy,
             Integration::RenderToFrameBuffer renderToFboEnabled,
@@ -85,8 +84,8 @@ Core::Core( RenderController& renderController,
             Integration::StencilBufferAvailable stencilBufferAvailable )
 : mRenderController( renderController ),
   mPlatform(platform),
-  mProcessingEvent(false),
-  mGraphics(graphics)
+  mGraphicsController(graphicsController),
+  mProcessingEvent(false)
 {
   // Create the thread local storage
   CreateThreadLocalStorage();
@@ -110,7 +109,7 @@ Core::Core( RenderController& renderController,
                                       *mDiscardQueue,
                                        renderController,
                                       *mRenderTaskProcessor,
-                                       graphics );
+                                       graphicsController );
 
 
   mStage = IntrusivePtr<Stage>( Stage::New( *mAnimationPlaylist, *mPropertyNotificationManager, *mUpdateManager, *mNotificationManager, mRenderController ) );
@@ -164,8 +163,6 @@ void Core::SurfaceResized( uint32_t width, uint32_t height )
   // The stage-size may be less than surface-size (reduced by top-margin)
   Vector2 size = mStage->GetSize();
   mRelayoutController->SetStageSize( static_cast<uint32_t>( size.width ), static_cast<uint32_t>( size.height ) ); // values get truncated
-
-  mGraphics.SurfaceResized( width, height );
 }
 
 void Core::SetTopMargin( uint32_t margin )
index 3f99333971b41bb05ed21368545489fdb21bc5ec..e8a1300c09ad53809d1211c4efff715b0bfc9ffd 100644 (file)
@@ -24,8 +24,8 @@
 #include <dali/public-api/object/ref-object.h>
 
 #include <dali/integration-api/core-enumerations.h>
-#include <dali/integration-api/graphics/graphics-interface.h>
 #include <dali/integration-api/resource-policies.h>
+#include <dali/graphics-api/graphics-api-controller.h>
 #include <dali/internal/common/owner-pointer.h>
 #include <dali/internal/event/animation/animation-playlist-declarations.h>
 #include <dali/internal/event/common/stage-def.h>
@@ -78,7 +78,7 @@ public:
    */
   Core( Integration::RenderController& renderController,
         Integration::PlatformAbstraction& platform,
-        Integration::Graphics::GraphicsInterface& graphics,
+        Graphics::Controller& graphicsController,
         Integration::GestureManager& gestureManager,
         ResourcePolicy::DataRetention dataRetentionPolicy,
         Integration::RenderToFrameBuffer renderToFboEnabled,
@@ -228,23 +228,20 @@ private:
 
   Integration::RenderController&            mRenderController;            ///< Reference to Render controller to tell it to keep rendering
   Integration::PlatformAbstraction&         mPlatform;                    ///< The interface providing platform specific services.
-
+  Graphics::Controller&                     mGraphicsController;          ///< Graphics object
   IntrusivePtr<Stage>                       mStage;                       ///< The current stage
   AnimationPlaylistOwner                    mAnimationPlaylist;           ///< For 'Fire and forget' animation support
   OwnerPointer<PropertyNotificationManager> mPropertyNotificationManager; ///< For safe signal emmision of property changed notifications
   IntrusivePtr< RelayoutController >        mRelayoutController;          ///< Size negotiation relayout controller
-  bool                                      mProcessingEvent  : 1;        ///< True during ProcessEvents()
-
-  OwnerPointer<SceneGraph::RenderTaskProcessor> mRenderTaskProcessor;         ///< Handles the processing of render tasks
-  OwnerPointer<SceneGraph::UpdateManager>       mUpdateManager;               ///< Update manager
-  OwnerPointer<SceneGraph::DiscardQueue>        mDiscardQueue;                ///< Used to cleanup nodes & resources when no longer in use.
-  OwnerPointer<ShaderFactory>                   mShaderFactory;               ///< Shader resource factory
-  OwnerPointer<NotificationManager>             mNotificationManager;         ///< Notification manager
-  OwnerPointer<GestureEventProcessor>           mGestureEventProcessor;       ///< The gesture event processor
-  OwnerPointer<EventProcessor>                  mEventProcessor;              ///< The event processor
-  Dali::Vector<Integration::Processor*>         mProcessors;                  ///< Registered processors (not owned)
-
-  Integration::Graphics::GraphicsInterface& mGraphics; ///< Graphics object
+  OwnerPointer<SceneGraph::RenderTaskProcessor> mRenderTaskProcessor;     ///< Handles the processing of render tasks
+  OwnerPointer<SceneGraph::UpdateManager>   mUpdateManager;               ///< Update manager
+  OwnerPointer<SceneGraph::DiscardQueue>    mDiscardQueue;                ///< Used to cleanup nodes & resources when no longer in use.
+  OwnerPointer<ShaderFactory>               mShaderFactory;               ///< Shader resource factory
+  OwnerPointer<NotificationManager>         mNotificationManager;         ///< Notification manager
+  OwnerPointer<GestureEventProcessor>       mGestureEventProcessor;       ///< The gesture event processor
+  OwnerPointer<EventProcessor>              mEventProcessor;              ///< The event processor
+  Dali::Vector<Integration::Processor*>     mProcessors;                  ///< Registered processors (not owned)
+  bool                                      mProcessingEvent : 1;         ///< True during ProcessEvents()
 
   friend class ThreadLocalStorage;
 
index a8198055e2b3aa524ce27379cf59c2dbdbc88991..89425213becfcf7d9175aab3d18c244e9339eeb0 100644 (file)
@@ -54,9 +54,9 @@ public:
    * @param renderInstructions container of render instructions
    * @param bufferIndex current buffer index
    */
-  void SubmitRenderInstructions(Graphics::Controller &graphics,
-                                SceneGraph::RenderInstructionContainer &renderInstructions,
-                                BufferIndex bufferIndex );
+  void SubmitRenderInstructions( Graphics::Controller &graphics,
+                                 SceneGraph::RenderInstructionContainer &renderInstructions,
+                                 BufferIndex bufferIndex );
 
   void DiscardUnusedResources( Graphics::Controller& controller );
 
@@ -74,18 +74,18 @@ private:
 
   bool SetupPipelineViewportState( Graphics::ViewportState& outViewportState );
 
-  void RecordRenderItemList(Graphics::Controller& graphics,
-                            BufferIndex bufferIndex,
-                            Graphics::RenderCommand::RenderTargetBinding& renderTargetBinding,
-                            Matrix viewProjection,
-                            RenderInstruction& instruction,
-                            const RenderList& renderItemList,
-                            std::vector<Graphics::RenderCommand*>& commandList);
-
-  void RecordInstruction(Graphics::Controller& graphics,
-                         BufferIndex bufferIndex,
-                         RenderInstruction& instruction,
-                         std::vector<Graphics::RenderCommand*>& commandList);
+  void RecordRenderItemList( Graphics::Controller& graphics,
+                             BufferIndex bufferIndex,
+                             Graphics::RenderCommand::RenderTargetBinding& renderTargetBinding,
+                             Matrix viewProjection,
+                             RenderInstruction& instruction,
+                             const RenderList& renderItemList,
+                             std::vector<Graphics::RenderCommand*>& commandList);
+
+  void RecordInstruction( Graphics::Controller& graphics,
+                          BufferIndex bufferIndex,
+                          RenderInstruction& instruction,
+                          std::vector<Graphics::RenderCommand*>& commandList);
 
   bool PrepareGraphicsPipeline( Graphics::Controller& controller,
                                 RenderInstruction& instruction,
index 3bac6b12618e5a3814cd034dea1467bbd316eb1a..107ebe246aa03225834866096a43ce51f5a2ea75 100644 (file)
@@ -19,7 +19,6 @@
 #include <dali/internal/update/manager/update-manager.h>
 
 // EXTERNAL INCLUDES
-#include <dali/graphics-api/graphics-api-controller.h>
 
 // INTERNAL INCLUDES
 #include <dali/public-api/common/stage.h>
@@ -27,7 +26,7 @@
 #include <dali/integration-api/core.h>
 #include <dali/integration-api/debug.h>
 #include <dali/integration-api/render-controller.h>
-#include <dali/integration-api/graphics/graphics-interface.h>
+#include <dali/graphics-api/graphics-api-controller.h>
 
 #include <dali/devel-api/common/owner-container.h>
 #include <dali/devel-api/threading/mutex.h>
@@ -95,7 +94,7 @@ extern Debug::Filter* gRenderTaskLogFilter;
 
 using namespace Dali::Integration;
 using Dali::Internal::Update::MessageQueue;
-using Dali::Integration::Graphics::GraphicsInterface;
+
 
 namespace Dali
 {
@@ -184,7 +183,7 @@ struct UpdateManager::Impl
         RenderController& renderController,
         SceneGraphBuffers& sceneGraphBuffers,
         RenderTaskProcessor& renderTaskProcessor,
-        GraphicsInterface& graphics )
+        Graphics::Controller& graphicsController )
   : notificationManager( notificationManager ),
     transformManager(),
     animationPlaylist( animationPlaylist ),
@@ -195,7 +194,7 @@ struct UpdateManager::Impl
     graphicsAlgorithms(),
     renderInstructions( ),
     renderTaskProcessor( renderTaskProcessor ),
-    graphics( graphics ),
+    graphicsController( graphicsController ),
     backgroundColor( Dali::Stage::DEFAULT_BACKGROUND_COLOR ),
     renderers(),
     textureSets(),
@@ -213,7 +212,7 @@ struct UpdateManager::Impl
     renderersAdded( false ),
     surfaceRectChanged( false ),
     graphicsShutdown( false ),
-    shaderCache( graphics.GetController() )
+    shaderCache( graphicsController )
   {
     sceneController = new SceneControllerImpl( discardQueue );
 
@@ -276,8 +275,7 @@ struct UpdateManager::Impl
   GraphicsAlgorithms                   graphicsAlgorithms;            ///< Graphics algorithms
   RenderInstructionContainer           renderInstructions;            ///< List of current instructions per frame
   RenderTaskProcessor&                 renderTaskProcessor;           ///< Handles RenderTasks and RenderInstrucitons
-
-  GraphicsInterface&                   graphics;                      ///< Graphics
+  Graphics::Controller&                graphicsController;            ///< Graphics controller
 
   Vector4                              backgroundColor;               ///< The glClear color used at the beginning of each frame.
 
@@ -336,7 +334,7 @@ UpdateManager::UpdateManager( NotificationManager&             notificationManag
                               DiscardQueue&                    discardQueue,
                               RenderController&                controller,
                               RenderTaskProcessor&             renderTaskProcessor,
-                              GraphicsInterface& graphics )
+                              Graphics::Controller&            graphicsController )
 : mImpl( new Impl( notificationManager,
                    animationFinishedNotifier,
                    propertyNotifier,
@@ -344,7 +342,7 @@ UpdateManager::UpdateManager( NotificationManager&             notificationManag
                    controller,
                    mSceneGraphBuffers,
                    renderTaskProcessor,
-                   graphics) )
+                   graphicsController) )
 {
 }
 
@@ -534,7 +532,7 @@ void UpdateManager::PropertyNotificationSetNotify( PropertyNotification* propert
 
 void UpdateManager::AddShader( OwnerPointer< Shader >& shader )
 {
-  shader->Initialize( mImpl->graphics, mImpl->shaderCache );
+  shader->Initialize( mImpl->graphicsController, mImpl->shaderCache );
   mImpl->shaders.PushBack( shader.Release() );
 }
 
@@ -546,7 +544,7 @@ void UpdateManager::RemoveShader( Shader* shader )
 
 void UpdateManager::AddRenderer( OwnerPointer< Renderer >& renderer )
 {
-  renderer->Initialize( mImpl->graphics );
+  renderer->Initialize( mImpl->graphicsController );
   mImpl->renderers.PushBack( renderer.Release() );
   mImpl->renderersAdded = true;
 }
@@ -802,7 +800,7 @@ uint32_t UpdateManager::Update( float elapsedSeconds,
 
   //Process Touches & Gestures
   const bool gestureUpdated = ProcessGestures( bufferIndex, lastVSyncTimeMilliseconds, nextVSyncTimeMilliseconds );
-  const bool resumed = mImpl->graphics.GetController().IsDrawOnResumeRequired();
+  const bool resumed = mImpl->graphicsController.IsDrawOnResumeRequired();
 
   bool updateScene =                                   // The scene-graph requires an update if..
     (mImpl->nodeDirtyFlags & RenderableUpdateFlags) || // ..nodes were dirty in previous frame OR
@@ -908,19 +906,19 @@ uint32_t UpdateManager::Update( float elapsedSeconds,
       // This may trigger garbage collection.
       if( numberOfDiscardedRenderers > 0 )
       {
-        mImpl->graphics.GetController().RunGarbageCollector( numberOfDiscardedRenderers );
+        mImpl->graphicsController.RunGarbageCollector( numberOfDiscardedRenderers );
       }
 
       // generate graphics objects
       PrepareNodes( bufferIndex );
       PrepareRenderers( bufferIndex );
-      mImpl->graphicsAlgorithms.SubmitRenderInstructions( mImpl->graphics.GetController(), mImpl->renderInstructions, bufferIndex );
+      mImpl->graphicsAlgorithms.SubmitRenderInstructions( mImpl->graphicsController, mImpl->renderInstructions, bufferIndex );
     }
   }
   else
   {
     // Discard graphics resources
-    mImpl->graphicsAlgorithms.DiscardUnusedResources( mImpl->graphics.GetController() );
+    mImpl->graphicsAlgorithms.DiscardUnusedResources( mImpl->graphicsController );
   }
 
   for( auto taskList : mImpl->taskLists )
@@ -974,7 +972,7 @@ uint32_t UpdateManager::Update( float elapsedSeconds,
   // The update has finished; swap the double-buffering indices
   mSceneGraphBuffers.Swap();
 
-  mImpl->graphics.GetController().SwapBuffers();
+  mImpl->graphicsController.SwapBuffers();
   return keepUpdating;
 }
 
@@ -1014,7 +1012,7 @@ uint32_t UpdateManager::KeepUpdatingCheck( float elapsedSeconds ) const
 
   const BufferIndex bufferIndex = mSceneGraphBuffers.GetUpdateBufferIndex();
   if( !mImpl->discardQueue.IsEmpty( bufferIndex ) ||
-      !mImpl->graphics.GetController().IsDiscardQueueEmpty() )
+      !mImpl->graphicsController.IsDiscardQueueEmpty() )
   {
     keepUpdatingRequest |= KeepUpdating::DISCARD_RESOURCES;
   }
@@ -1104,7 +1102,7 @@ void UpdateManager::RemoveFrameCallback( FrameCallbackInterface* frameCallback )
 
 void UpdateManager::AddSampler( OwnerPointer< SceneGraph::Sampler >& sampler )
 {
-  sampler->Initialize( mImpl->graphics );
+  sampler->Initialize( mImpl->graphicsController );
   mImpl->samplerContainer.PushBack( sampler.Release() );
 }
 
@@ -1115,7 +1113,7 @@ void UpdateManager::RemoveSampler( SceneGraph::Sampler* sampler )
 
 void UpdateManager::AddPropertyBuffer( OwnerPointer< SceneGraph::PropertyBuffer >& propertyBuffer )
 {
-  propertyBuffer->Initialize( mImpl->graphics );
+  propertyBuffer->Initialize( mImpl->graphicsController );
   mImpl->propertyBufferContainer.PushBack( propertyBuffer.Release() );
 }
 
@@ -1126,7 +1124,7 @@ void UpdateManager::RemovePropertyBuffer( SceneGraph::PropertyBuffer* propertyBu
 
 void UpdateManager::AddGeometry( OwnerPointer< SceneGraph::Geometry >& geometry )
 {
-  geometry->Initialize( mImpl->graphics );
+  geometry->Initialize( mImpl->graphicsController );
   mImpl->geometryContainer.PushBack( geometry.Release() );
 }
 
@@ -1137,7 +1135,7 @@ void UpdateManager::RemoveGeometry( SceneGraph::Geometry* geometry )
 
 void UpdateManager::AddTexture( OwnerPointer< SceneGraph::Texture >& texture )
 {
-  texture->Initialize( mImpl->graphics );
+  texture->Initialize( mImpl->graphicsController );
   mImpl->textureContainer.PushBack( texture.Release() );
 }
 
@@ -1158,7 +1156,7 @@ void UpdateManager::RemoveTexture( SceneGraph::Texture* texture)
 
 void UpdateManager::AddFrameBuffer( OwnerPointer< SceneGraph::FrameBuffer>& frameBuffer )
 {
-  frameBuffer->Initialize( mImpl->graphics );
+  frameBuffer->Initialize( mImpl->graphicsController );
   mImpl->frameBufferContainer.PushBack( frameBuffer.Release() );
 }
 
@@ -1180,7 +1178,7 @@ void UpdateManager::RemoveFrameBuffer( SceneGraph::FrameBuffer* frameBuffer)
 void UpdateManager::DestroyGraphicsObjects()
 {
   // Wait for the current frame to finish drawing
-  mImpl->graphics.GetController().WaitIdle();
+  mImpl->graphicsController.WaitIdle();
 
   DALI_LOG_INFO(gLogFilter, Debug::Verbose, "Destroying graphics objects\n");
 
@@ -1226,7 +1224,7 @@ void UpdateManager::DestroyGraphicsObjects()
   mImpl->shaderCache.DestroyGraphicsObjects();
 
   // Ensure resources are discarded
-  mImpl->graphicsAlgorithms.DiscardUnusedResources( mImpl->graphics.GetController() );
+  mImpl->graphicsAlgorithms.DiscardUnusedResources( mImpl->graphicsController );
 
   mImpl->graphicsShutdown = true;
 
index 0de82ef89fd826243e46095b3665c8a7686e1ba6..0b7368d7af30071a6c520ca4c365df4bfbff0ed0 100644 (file)
 #include <dali/public-api/common/vector-wrapper.h>
 
 #include <dali/devel-api/common/stage-devel.h>
-#include <dali/integration-api/graphics/graphics-interface.h>
-
 #include <dali/internal/common/message.h>
-
 #include <dali/internal/common/type-abstraction-enums.h>
 #include <dali/internal/event/common/event-thread-services.h>
 #include <dali/internal/event/rendering/texture-impl.h>
@@ -51,6 +48,7 @@
 #include <dali/internal/update/rendering/scene-graph-shader.h> // for OwnerPointer< Shader >
 #include <dali/internal/update/rendering/scene-graph-texture-set.h> // for OwnerPointer< TextureSet >
 #include <dali/internal/update/render-tasks/scene-graph-render-task-list.h>
+
 #include <dali/graphics-api/graphics-api-controller.h>
 
 namespace Dali
@@ -108,7 +106,7 @@ public:
    * @param[in] discardQueue Nodes are added here when disconnected from the scene-graph.
    * @param[in] controller After messages are flushed, we request a render from the RenderController.
    * @param[in] renderTaskProcessor Handles RenderTasks and RenderInstrucitons.
-   * @param[in] graphics The graphics backend
+   * @param[in] graphicsController The graphics backend
    */
   UpdateManager( NotificationManager& notificationManager,
                  CompleteNotificationInterface& animationPlaylist,
@@ -116,7 +114,7 @@ public:
                  DiscardQueue& discardQueue,
                  Integration::RenderController& controller,
                  RenderTaskProcessor& renderTaskProcessor,
-                 Dali::Integration::Graphics::GraphicsInterface& graphics);
+                 Graphics::Controller& graphicsController );
 
   /**
    * Destructor.
index 47ecef9dae48ef0d5e5d65aeb8f80b34c9abd1d9..0b8e970198f21da59ad0b09ed024eac39c1d21bd 100644 (file)
 
 // INTERNAL INCLUDES
 #include <dali/internal/update/rendering/scene-graph-texture.h>
-#include <dali/graphics-api/graphics-api-controller.h>
 #include <dali/graphics-api/graphics-api-texture-details.h>
 #include <dali/graphics-api/graphics-api-framebuffer.h>
 #include <dali/graphics-api/graphics-api-framebuffer-factory.h>
-#include <dali/graphics-api/graphics-api-utility.h>
 
 namespace Dali
 {
@@ -33,7 +31,7 @@ namespace SceneGraph
 {
 
 FrameBuffer::FrameBuffer( unsigned int width, unsigned int height, unsigned int attachments )
-: mGraphics( nullptr ),
+: mGraphicsController( nullptr ),
   mGraphicsFramebuffer( nullptr ),
   mWidth( width ),
   mHeight( height )
@@ -42,9 +40,9 @@ FrameBuffer::FrameBuffer( unsigned int width, unsigned int height, unsigned int
 
 FrameBuffer::~FrameBuffer() = default;
 
-void FrameBuffer::Initialize( Integration::Graphics::GraphicsInterface& graphics )
+void FrameBuffer::Initialize( Graphics::Controller& graphicsController )
 {
-  mGraphics = &graphics;
+  mGraphicsController = &graphicsController;
   // Defer creation of framebuffer until a render instruction uses it
 }
 
@@ -78,13 +76,11 @@ unsigned int FrameBuffer::GetHeight() const
 
 void FrameBuffer::PrepareFramebuffer()
 {
-  auto& controller = mGraphics->GetController();
-
   // @todo Check if the color attachments or depth attachments have changed since the graphics object was created
   if( !mGraphicsFramebuffer )
   {
-    auto& factory = controller.GetFramebufferFactory();
-    factory.SetSize( Graphics::RectSize{ mWidth, mHeight } );
+    auto& factory = mGraphicsController->GetFramebufferFactory();
+    factory.SetSize( Graphics::Extent2D{ mWidth, mHeight } );
 
     /**
      * If the framebuffer has a color attachment without a graphics object, create one
@@ -139,7 +135,7 @@ void FrameBuffer::PrepareFramebuffer()
       }
     }
 
-    mGraphicsFramebuffer = controller.CreateFramebuffer( factory );
+    mGraphicsFramebuffer = mGraphicsController->CreateFramebuffer( factory );
   }
 }
 
index ef9caf60bba56ce68835b93153b4212d14579a61..04c2ee42159760c4b1324a6fbe0ce405f694b5db 100644 (file)
@@ -20,6 +20,7 @@
 // INTERNAL INCLUDES
 #include <dali/public-api/rendering/frame-buffer.h>
 #include <dali/internal/update/rendering/scene-graph-texture.h>
+#include <dali/graphics-api/graphics-api-controller.h>
 #include <dali/graphics-api/graphics-api-framebuffer.h>
 
 namespace Dali
@@ -52,7 +53,7 @@ public:
    *
    * @param[in] graphics The Graphics API
    */
-  void Initialize( Integration::Graphics::GraphicsInterface& graphics );
+  void Initialize( Graphics::Controller& graphics );
 
   /**
    * @brief Attach a texture for color rendering. Valid only for Framebuffers with COLOR attachments.
@@ -102,7 +103,7 @@ public:
   void DestroyGraphicsObjects();
 
 private:
-  Integration::Graphics::GraphicsInterface* mGraphics; ///< Graphics interface object
+  Graphics::Controller* mGraphicsController;
   std::unique_ptr<Graphics::Framebuffer> mGraphicsFramebuffer;
 
   struct Attachment
index baf88c75abe068d7de12c41d9384fbde23abd25f..d5d32acdfa6b5baef276fc6953ace3522a92f6ed 100644 (file)
@@ -32,7 +32,7 @@ namespace SceneGraph
 {
 
 Geometry::Geometry()
-: mGraphics( nullptr ),
+: mGraphicsController( nullptr ),
   mIndexBuffer{ nullptr },
   mIndexBufferElementCount( 0 ),
   mGeometryType( Dali::Geometry::TRIANGLES ),
@@ -47,9 +47,9 @@ Geometry::~Geometry()
 {
 }
 
-void Geometry::Initialize( Integration::Graphics::GraphicsInterface& graphics )
+void Geometry::Initialize( Graphics::Controller& graphics )
 {
-  mGraphics = &graphics;
+  mGraphicsController = &graphics;
 }
 
 void Geometry::AddPropertyBuffer( SceneGraph::PropertyBuffer* propertyBuffer )
@@ -61,14 +61,10 @@ void Geometry::AddPropertyBuffer( SceneGraph::PropertyBuffer* propertyBuffer )
 void Geometry::SetIndexBuffer( Dali::Vector<unsigned short>& indices )
 {
   // set new index buffer
-  auto& mController = mGraphics->GetController();
-
-  // create index buffer]
   auto sizeInBytes = uint32_t(indices.Size() * sizeof(indices[0]));
-  auto indexBuffer = mController.CreateBuffer(
-                        mController.GetBufferFactory()
-                                 .SetSize( uint32_t(indices.Size() * sizeof(indices[0])) )
-                                 .SetUsageFlags( 0u | Graphics::BufferUsage::INDEX_BUFFER )
+  auto indexBuffer = mGraphicsController->CreateBuffer( mGraphicsController->GetBufferFactory()
+                                                        .SetSize( uint32_t(indices.Size() * sizeof(indices[0])) )
+                                                        .SetUsageFlags( 0u | Graphics::BufferUsage::INDEX_BUFFER )
   );
 
   // transfer data
index 6f8146d19a95a7602dce97fb3cef2bbdde92193b..74b18e05bd91e0571500040af333e8da854dbefc 100644 (file)
@@ -21,7 +21,6 @@
 #include <dali/public-api/rendering/geometry.h>
 #include <dali/devel-api/common/owner-container.h>
 #include <dali/graphics-api/graphics-api-controller.h>
-#include <dali/integration-api/graphics/graphics-interface.h>
 #include <dali/internal/common/message.h>
 #include <dali/internal/common/owner-pointer.h>
 #include <dali/internal/common/buffer-index.h>
@@ -56,7 +55,7 @@ public:
    *
    * @param[in] graphics The Graphics API
    */
-  void Initialize( Integration::Graphics::GraphicsInterface& graphics );
+  void Initialize( Graphics::Controller& graphics );
 
   /**
    * Adds a property buffer to the geometry
@@ -135,7 +134,7 @@ public:
   }
 
 private:
-  Integration::Graphics::GraphicsInterface* mGraphics; ///< Graphics interface object
+  Graphics::Controller* mGraphicsController; ///< Graphics interface object
 
   // PropertyBuffers
   Vector< SceneGraph::PropertyBuffer* > mVertexBuffers;
index a5660c58fdb0e858dd91fa5bdfc193155ae009f3..fd33297c3f5219669dab257ae00a3229a0bd252e 100644 (file)
@@ -32,7 +32,7 @@ namespace SceneGraph
 {
 
 PropertyBuffer::PropertyBuffer()
-: mGraphics( nullptr ),
+: mGraphicsController( nullptr ),
   mFormat( nullptr ),
   mData( nullptr ),
   mSize(0),
@@ -46,9 +46,9 @@ PropertyBuffer::~PropertyBuffer()
 {
 }
 
-void PropertyBuffer::Initialize( Integration::Graphics::GraphicsInterface& graphics )
+void PropertyBuffer::Initialize( Graphics::Controller& graphicsController )
 {
-  mGraphics = &graphics;
+  mGraphicsController = &graphicsController;
 }
 
 void PropertyBuffer::SetFormat( OwnerPointer< PropertyBuffer::Format >& format )
@@ -63,12 +63,11 @@ void PropertyBuffer::SetData( OwnerPointer< Dali::Vector<uint8_t> >& data, uint3
   mSize = size;
   mDataChanged = true;
 
-  if( mGraphics )
+  if( mGraphicsController )
   {
-    auto& controller = mGraphics->GetController();
-    mGraphicsBuffer = controller.CreateBuffer( controller.GetBufferFactory()
-                                           .SetSize( uint32_t( mFormat->size * size) )
-                                           .SetUsageFlags( 0u | Graphics::BufferUsage::VERTEX_BUFFER ));
+    mGraphicsBuffer = mGraphicsController->CreateBuffer( mGraphicsController->GetBufferFactory()
+                                                         .SetSize( uint32_t( mFormat->size * size) )
+                                                         .SetUsageFlags( 0u | Graphics::BufferUsage::VERTEX_BUFFER ));
   }
 }
 
@@ -83,9 +82,9 @@ bool PropertyBuffer::Update( Dali::Graphics::Controller& controller )
   {
     if( !mGraphicsBuffer )
     {
-      mGraphicsBuffer = controller.CreateBuffer( controller.GetBufferFactory()
-                                                      .SetUsageFlags( mGraphicsBufferUsage )
-                                                      .SetSize( mSize ) );
+      mGraphicsBuffer = mGraphicsController->CreateBuffer( mGraphicsController->GetBufferFactory()
+                                                           .SetUsageFlags( mGraphicsBufferUsage )
+                                                           .SetSize( mSize ) );
     }
 
     // schedule deferred write
index 8069e07f1267c648d36271eaf603c018c9c0fab8..d93a4f90d9e0d303167f7d9ef683b546da2a4c73 100644 (file)
@@ -22,7 +22,7 @@
 #include <dali/public-api/common/vector-wrapper.h>
 #include <dali/public-api/rendering/sampler.h>
 #include <dali/graphics-api/graphics-api-buffer.h>
-#include <dali/integration-api/graphics/graphics-interface.h>
+#include <dali/graphics-api/graphics-api-controller.h>
 #include <dali/internal/common/message.h>
 #include <dali/internal/common/owner-pointer.h>
 #include <dali/internal/event/common/event-thread-services.h>
@@ -79,7 +79,7 @@ public:
    *
    * @param[in] graphics The Graphics API
    */
-  void Initialize( Integration::Graphics::GraphicsInterface& graphics );
+  void Initialize( Graphics::Controller& graphics );
 
   /**
    * @brief Set the format of the buffer
@@ -178,7 +178,7 @@ public:
   }
 
 private:
-  Integration::Graphics::GraphicsInterface* mGraphics;  ///< Graphics interface object
+  Graphics::Controller* mGraphicsController;  ///< Graphics controller
   OwnerPointer< PropertyBuffer::Format >  mFormat;    ///< Format of the buffer
   OwnerPointer< Dali::Vector< uint8_t > > mData;      ///< Data
 
index 9a5ae970933330325c6d8d428c8d317d9672e4dc..765303fc5ae4aad23d3661bd8fa05962607a1308 100644 (file)
@@ -121,7 +121,7 @@ Renderer* Renderer::New()
 }
 
 Renderer::Renderer()
-: mGraphics( nullptr ),
+: mGraphicsController( nullptr ),
   mTextureSet( NULL ),
   mGeometry( NULL ),
   mShader( NULL ),
@@ -165,9 +165,9 @@ void Renderer::operator delete( void* ptr )
   gRendererMemoryPool.FreeThreadSafe( static_cast<Renderer*>( ptr ) );
 }
 
-void Renderer::Initialize( Integration::Graphics::GraphicsInterface& graphics )
+void Renderer::Initialize( Graphics::Controller& graphicsController )
 {
-  mGraphics = &graphics;
+  mGraphicsController = &graphicsController;
 
   mRegenerateUniformMap = REGENERATE_UNIFORM_MAP;
 }
@@ -228,8 +228,7 @@ RenderCommand& Renderer::GetRenderCommand( RenderInstruction* renderInstruction,
 
 void Renderer::PrepareRender( BufferIndex updateBufferIndex, RenderInstruction* renderInstruction )
 {
-  auto &controller = mGraphics->GetController();
-  auto& renderCmd = mRenderCommands.AllocRenderCommand( renderInstruction, controller, updateBufferIndex );
+  auto& renderCmd = mRenderCommands.AllocRenderCommand( renderInstruction, *mGraphicsController, updateBufferIndex );
   auto& cmd = renderCmd.GetGfxRenderCommand( updateBufferIndex );
 
   if (!mShader->GetGfxObject())
@@ -278,7 +277,7 @@ void Renderer::PrepareRender( BufferIndex updateBufferIndex, RenderInstruction*
             else
             {
               // reinitialize sampler
-              sampler->Initialize( *mGraphics );
+              sampler->Initialize( *mGraphicsController );
             }
             sampler->mIsDirty = false;
           }
index 8239cc188e8294e0629ae7d56014c1b70f72c588..fb62d7a38eb8b47c8cf93f118ed909119373ed8a 100755 (executable)
@@ -19,7 +19,6 @@
 
 #include <dali/public-api/rendering/geometry.h>
 #include <dali/public-api/rendering/renderer.h> // Dali::Renderer
-#include <dali/integration-api/graphics/graphics-interface.h>
 #include <dali/internal/common/blending-options.h>
 #include <dali/internal/common/type-abstraction-enums.h>
 #include <dali/internal/event/common/event-thread-services.h>
@@ -30,9 +29,9 @@
 #include <dali/internal/update/rendering/data-providers/uniform-map-data-provider.h>
 #include <dali/internal/update/rendering/render-command-container.h>
 #include <dali/internal/update/rendering/stencil-parameters.h>
-#include <dali/graphics-api/graphics-api-render-command.h>
-#include <dali/graphics-api/graphics-api-pipeline.h>
 #include <dali/graphics-api/graphics-api-controller.h>
+#include <dali/graphics-api/graphics-api-pipeline.h>
+#include <dali/graphics-api/graphics-api-render-command.h>
 #include <cstring>
 
 namespace Dali
@@ -88,7 +87,7 @@ public:
    *
    * @param[in] graphics The Graphics API
    */
-  void Initialize( Integration::Graphics::GraphicsInterface& graphics );
+  void Initialize( Graphics::Controller& graphics );
 
   /**
    * Set the texture set for the renderer
@@ -488,7 +487,7 @@ private:
   Renderer();
 
 private:
-  Integration::Graphics::GraphicsInterface* mGraphics; ///< Graphics interface object
+  Graphics::Controller*        mGraphicsController;               ///< Graphics controller
 
   CollectedUniformMap          mCollectedUniformMap[2];           ///< Uniform maps collected by the renderer
   TextureSet*                  mTextureSet;                       ///< The texture set this renderer uses. (Not owned)
index 8369563e5a363e27351fc166eb1bab10937459cd..0acacc171bf5a6f862e539715f7a479a4585b067 100644 (file)
@@ -23,7 +23,6 @@
 #include <dali/internal/event/common/event-thread-services.h>
 #include <dali/graphics-api/graphics-api-controller.h>
 #include <dali/graphics-api/graphics-api-types.h>
-#include <dali/integration-api/graphics/graphics-interface.h>
 
 #include <memory>
 
@@ -45,7 +44,7 @@ struct Sampler
    * Constructor
    */
   Sampler()
-  : mGraphics( nullptr ),
+  : mGraphicsController( nullptr ),
     mGfxSampler( nullptr ),
     mMinificationFilter(FilterMode::DEFAULT),
     mMagnificationFilter(FilterMode::DEFAULT),
@@ -156,12 +155,12 @@ struct Sampler
     return {};
   }
 
-  void Initialize( Integration::Graphics::GraphicsInterface& graphics )
+  void Initialize( Graphics::Controller& graphicsController )
   {
-    mGraphics = &graphics;
+    mGraphicsController = &graphicsController;
     mGfxSampler.reset( nullptr );
-    mGfxSampler = mGraphics->GetController().CreateSampler(
-                    mGraphics->GetController().GetSamplerFactory()
+    mGfxSampler = graphicsController.CreateSampler(
+                    graphicsController.GetSamplerFactory()
                     .SetMinFilter( GetGfxFilter( mMinificationFilter ) )
                     .SetMagFilter( GetGfxFilter( mMagnificationFilter ) )
                     .SetAddressModeU( GetGfxSamplerAddressMode( mSWrapMode ) )
@@ -171,7 +170,7 @@ struct Sampler
                     );
   }
 
-  Integration::Graphics::GraphicsInterface* mGraphics;   ///< Graphics interface
+  Graphics::Controller* mGraphicsController;   ///< Graphics interface
   std::unique_ptr<Dali::Graphics::Sampler> mGfxSampler; ///< Graphics Sampler object, default sampler is nullptr
 
   FilterMode  mMinificationFilter   : 4;    ///< The minify filter
index 33e12f13df8fe1d8b598be189c30e10c6d331a3f..132ca7cc5ebbc1f8a12502cdcbc54ef5d923d108 100644 (file)
@@ -32,7 +32,7 @@ namespace SceneGraph
 {
 
 Shader::Shader( Dali::Shader::Hint::Value& hints )
-: mGraphics( nullptr ),
+: mGraphicsController( nullptr ),
   mGraphicsShader( nullptr ),
   mShaderCache( nullptr ),
   mHints( hints ),
@@ -46,9 +46,9 @@ Shader::~Shader()
   mConnectionObservers.Destroy( *this );
 }
 
-void Shader::Initialize( Integration::Graphics::GraphicsInterface& graphics, ShaderCache& shaderCache )
+void Shader::Initialize( Graphics::Controller& graphicsController, ShaderCache& shaderCache )
 {
-  mGraphics = &graphics;
+  mGraphicsController = &graphicsController;
   mShaderCache = &shaderCache;
 }
 
index f423a6a70807b87e1a861d6e85f1ae2a0c89667e..5c5a882d061246d0b0cbd9f3237435347a38d907 100644 (file)
@@ -22,8 +22,6 @@
 #include <dali/graphics-api/graphics-api-controller.h>
 #include <dali/graphics-api/graphics-api-shader.h>
 
-#include <dali/integration-api/graphics/graphics-interface.h>
-
 #include <dali/internal/common/message.h>
 #include <dali/internal/common/shader-data.h>
 #include <dali/internal/event/common/event-thread-services.h>
@@ -67,7 +65,7 @@ public:
    * @param[in] graphics The Graphics API
    * @param[in] shaderCache A cache
    */
-  void Initialize( Integration::Graphics::GraphicsInterface& graphics, ShaderCache& shaderCache );
+  void Initialize( Graphics::Controller& graphics, ShaderCache& shaderCache );
 
   /**
    * Query whether a shader hint is set.
@@ -154,12 +152,11 @@ private:
   void BuildReflection();
 
 private: // Data
-  Integration::Graphics::GraphicsInterface*      mGraphics; ///< Graphics interface object
-  Graphics::Shader*                         mGraphicsShader; ///< The graphics object ( owned by cache )
-  ShaderCache*                                   mShaderCache;
-  Dali::Shader::Hint::Value                      mHints; ///< Hints for the shader
-  ConnectionChangePropagator                     mConnectionObservers; ///< Watch for connection changes
-
+  Graphics::Controller*           mGraphicsController; ///< Graphics interface object
+  Graphics::Shader*               mGraphicsShader; ///< The graphics object ( owned by cache )
+  ShaderCache*                    mShaderCache;
+  Dali::Shader::Hint::Value       mHints; ///< Hints for the shader
+  ConnectionChangePropagator      mConnectionObservers; ///< Watch for connection changes
 
   /**
    * Struct ReflectionUniformInfo
@@ -167,8 +164,8 @@ private: // Data
    */
   struct ReflectionUniformInfo
   {
-    size_t                                    hashValue;
-    bool                                      hasCollision;
+    size_t                               hashValue;
+    bool                                 hasCollision;
     Graphics::Shader*                    graphicsShader;
     Graphics::ShaderDetails::UniformInfo uniformInfo;
   };
index 29a43f6ba90aeca62b0d673662ed8f5818d3faa7..0040b3475089ab686e0d90ae52ece204be495cb6 100644 (file)
@@ -267,7 +267,7 @@ constexpr Graphics::Format ConvertPixelFormat( Pixel::Format format )
 
 
 Texture::Texture( Type type, Pixel::Format format, ImageDimensions size )
-: mGraphics( nullptr ),
+: mGraphicsController( nullptr ),
   mGraphicsTexture( nullptr ),
   mNativeImage(),
   mSampler(),
@@ -282,7 +282,7 @@ Texture::Texture( Type type, Pixel::Format format, ImageDimensions size )
 }
 
 Texture::Texture( NativeImageInterfacePtr nativeImageInterface )
-: mGraphics( nullptr ),
+: mGraphicsController( nullptr ),
   mGraphicsTexture( nullptr ),
   mNativeImage( nativeImageInterface ),
   mSampler(),
@@ -299,9 +299,9 @@ Texture::Texture( NativeImageInterfacePtr nativeImageInterface )
 Texture::~Texture()
 {}
 
-void Texture::Initialize( Integration::Graphics::GraphicsInterface& graphics )
+void Texture::Initialize( Graphics::Controller& graphicsController )
 {
-  mGraphics = &graphics;
+  mGraphicsController = &graphicsController;
 }
 
 const Graphics::Texture* Texture::GetGfxObject() const
@@ -345,10 +345,8 @@ void Texture::CreateTexture( Usage usage )
 
 void Texture::CreateTextureInternal( Usage usage, unsigned char* buffer, unsigned int bufferSize )
 {
-  if( mGraphics )
+  if( mGraphicsController )
   {
-    auto& controller = mGraphics->GetController();
-
     Graphics::TextureDetails::Usage graphicsUsage{};
     switch( usage )
     {
@@ -370,7 +368,7 @@ void Texture::CreateTextureInternal( Usage usage, unsigned char* buffer, unsigne
     }
 
     // Convert DALi format to Graphics API format
-    mGraphicsTexture = controller.CreateTexture( controller.GetTextureFactory()
+    mGraphicsTexture = mGraphicsController->CreateTexture( mGraphicsController->GetTextureFactory()
                                                            .SetFormat( ConvertPixelFormat( mFormat ) )
                                                            .SetUsage( graphicsUsage )
                                                            .SetSize( { mWidth, mHeight } )
index 80665f639d817da25d7d57b555bd0947de68b319..98b9762e42d0e3260921750e704853a76fa72e0a 100644 (file)
@@ -24,8 +24,8 @@
 #include <dali/public-api/images/image-operations.h> // Dali::ImageDimensions
 #include <dali/public-api/rendering/sampler.h>
 #include <dali/public-api/rendering/texture.h>
+#include <dali/graphics-api/graphics-api-controller.h>
 #include <dali/graphics-api/graphics-api-texture.h>
-#include <dali/integration-api/graphics/graphics-interface.h>
 #include <dali/internal/common/message.h>
 #include <dali/internal/event/rendering/texture-impl.h>
 #include <dali/internal/update/rendering/scene-graph-sampler.h>
@@ -77,7 +77,7 @@ public:
    *
    * @param[in] graphics The Graphics API
    */
-  void Initialize( Integration::Graphics::GraphicsInterface& graphics );
+  void Initialize( Graphics::Controller& graphics );
 
   /**
    * Retrieve wheter the texture has an alpha channel
@@ -145,7 +145,7 @@ public:
   void CreateTextureInternal( Usage usage, unsigned char* buffer, unsigned int bufferSize );
 
 private:
-  Integration::Graphics::GraphicsInterface* mGraphics; ///< Graphics interface object
+  Graphics::Controller*   mGraphicsController; ///< Graphics interface object
   std::unique_ptr<Graphics::Texture> mGraphicsTexture; ///< Graphics texture
 
   NativeImageInterfacePtr mNativeImage;      ///< Pointer to native image
index 41bf88bb9d852e2afc4bb508fde716a112df61d0..0cc74720317ec7551eb004daf1cf37ec02f89a24 100644 (file)
  * limitations under the License.
  */
 
-#include <dali/integration-api/graphics/graphics-interface.h>
+#include <dali/graphics-api/graphics-api-controller.h>
 #include <dali/graphics-api/graphics-api-shader.h>
 #include <dali/graphics-api/graphics-api-shader-details.h>
+#include <memory>
 
 namespace Dali
 {