Changed DiscardQueue to templated class 68/284268/9
authorDavid Steele <david.steele@samsung.com>
Thu, 10 Nov 2022 12:02:43 +0000 (12:02 +0000)
committerDavid Steele <david.steele@samsung.com>
Tue, 17 Jan 2023 16:30:00 +0000 (16:30 +0000)
Instead of having 1 discard queue for everything,
switched it out to a templated type that can work
on std containers.

Change-Id: Ie26d8c7ddece01ae8feeebfd27de9e73d9a9c9c4
Signed-off-by: David Steele <david.steele@samsung.com>
dali/internal/common/core-impl.cpp
dali/internal/common/core-impl.h
dali/internal/file.list
dali/internal/update/common/discard-queue.cpp [deleted file]
dali/internal/update/common/discard-queue.h
dali/internal/update/controllers/scene-controller-impl.cpp
dali/internal/update/controllers/scene-controller-impl.h
dali/internal/update/controllers/scene-controller.h
dali/internal/update/manager/update-manager.cpp
dali/internal/update/manager/update-manager.h
dali/internal/update/nodes/node.h

index a5cea80..44f193b 100644 (file)
@@ -50,7 +50,6 @@
 #include <dali/internal/render/common/performance-monitor.h>
 #include <dali/internal/render/common/render-manager.h>
 
-using Dali::Internal::SceneGraph::DiscardQueue;
 using Dali::Internal::SceneGraph::RenderManager;
 using Dali::Internal::SceneGraph::RenderQueue;
 using Dali::Internal::SceneGraph::UpdateManager;
@@ -112,12 +111,9 @@ Core::Core(RenderController&                   renderController,
 
   RenderQueue& renderQueue = mRenderManager->GetRenderQueue();
 
-  mDiscardQueue = new DiscardQueue(renderQueue);
-
   mUpdateManager = new UpdateManager(*mNotificationManager,
                                      *mAnimationPlaylist,
                                      *mPropertyNotificationManager,
-                                     *mDiscardQueue,
                                      renderController,
                                      *mRenderManager,
                                      renderQueue,
index 5c21a44..ba7b74b 100644 (file)
@@ -66,7 +66,6 @@ namespace SceneGraph
 {
 class UpdateManager;
 class RenderManager;
-class DiscardQueue;
 class RenderTaskProcessor;
 } // namespace SceneGraph
 
@@ -348,7 +347,6 @@ private:
   OwnerPointer<SceneGraph::RenderTaskProcessor> mRenderTaskProcessor;   ///< Handles the processing of render tasks
   OwnerPointer<SceneGraph::RenderManager>       mRenderManager;         ///< Render manager
   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
index e868466..a12bdbd 100644 (file)
@@ -134,7 +134,6 @@ SET( internal_src_files
   ${internal_src_dir}/update/animation/scene-graph-animation.cpp
   ${internal_src_dir}/update/animation/scene-graph-constraint-base.cpp
   ${internal_src_dir}/update/common/collected-uniform-map.cpp
-  ${internal_src_dir}/update/common/discard-queue.cpp
   ${internal_src_dir}/update/common/property-base.cpp
   ${internal_src_dir}/update/common/property-owner-messages.cpp
   ${internal_src_dir}/update/common/property-condition-functions.cpp
diff --git a/dali/internal/update/common/discard-queue.cpp b/dali/internal/update/common/discard-queue.cpp
deleted file mode 100644 (file)
index 1a31897..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (c) 2022 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.
- *
- */
-
-// CLASS HEADER
-#include <dali/internal/update/common/discard-queue.h>
-
-// INTERNAL INCLUDES
-#include <dali/internal/common/message.h>
-#include <dali/internal/render/queue/render-queue.h>
-#include <dali/internal/render/renderers/render-renderer.h>
-#include <dali/internal/render/shaders/render-shader.h>
-#include <dali/internal/update/common/scene-graph-scene.h>
-#include <dali/internal/update/nodes/node.h>
-
-namespace Dali
-{
-namespace Internal
-{
-namespace SceneGraph
-{
-DiscardQueue::DiscardQueue(RenderQueue& renderQueue)
-: mRenderQueue(renderQueue),
-  mNodeQueue(),
-  mShaderQueue(),
-  mRendererQueue(),
-  mSceneQueue()
-{
-}
-
-DiscardQueue::~DiscardQueue() = default;
-
-void DiscardQueue::Add(BufferIndex updateBufferIndex, Node* node)
-{
-  DALI_ASSERT_DEBUG(NULL != node);
-
-  // The GL resources will now be freed in frame N
-  // The Update for frame N+1 may occur in parallel with the rendering of frame N
-  // Queue the node for destruction in frame N+2
-  mNodeQueue[updateBufferIndex].PushBack(node);
-}
-
-void DiscardQueue::Add(BufferIndex updateBufferIndex, Shader* shader)
-{
-  DALI_ASSERT_DEBUG(NULL != shader);
-
-  // Programs are cached for the lifetime of DALi so no need for GL cleanup for shader for now.
-
-  // The GL resources will now be freed in frame N
-  // The Update for frame N+1 may occur in parallel with the rendering of frame N
-  // Queue the node for destruction in frame N+2
-  mShaderQueue[updateBufferIndex].PushBack(shader);
-}
-
-void DiscardQueue::Add(BufferIndex updateBufferIndex, Renderer* renderer)
-{
-  DALI_ASSERT_DEBUG(NULL != renderer);
-
-  // The GL resources will now be freed in frame N
-  // The Update for frame N+1 may occur in parallel with the rendering of frame N
-  // Queue the node for destruction in frame N+2
-  mRendererQueue[updateBufferIndex].PushBack(renderer);
-}
-
-void DiscardQueue::Add(BufferIndex updateBufferIndex, Scene* scene)
-{
-  DALI_ASSERT_DEBUG(NULL != scene);
-
-  mSceneQueue[updateBufferIndex].PushBack(scene);
-}
-
-void DiscardQueue::Clear(BufferIndex updateBufferIndex)
-{
-  // Destroy some discarded objects; these should no longer own any GL resources
-  mNodeQueue[updateBufferIndex].Clear();
-  mRendererQueue[updateBufferIndex].Clear();
-  mShaderQueue[updateBufferIndex].Clear();
-  mSceneQueue[updateBufferIndex].Clear();
-}
-
-} // namespace SceneGraph
-
-} // namespace Internal
-
-} // namespace Dali
index 3624898..e02a843 100644 (file)
  */
 
 // INTERNAL INCLUDES
-#include <dali/devel-api/common/owner-container.h>
 #include <dali/internal/common/buffer-index.h>
-#include <dali/internal/update/nodes/node-declarations.h>
-#include <dali/internal/update/rendering/scene-graph-renderer.h>
-#include <dali/internal/update/rendering/scene-graph-texture-set.h>
-#include <dali/public-api/object/ref-object.h>
 
 namespace Dali
 {
@@ -32,92 +27,31 @@ namespace Internal
 {
 namespace SceneGraph
 {
-class RenderQueue;
-class Shader;
-class Camera;
-class Scene;
-
-/**
- * DiscardQueue is used to cleanup nodes & resources when no longer in use.
- * Unwanted objects are added here during UpdateManager::Update().
- * When added, messages will be sent to clean-up GL resources in the next Render.
- * The Update for frame N+1 may occur in parallel with the rendering of frame N.
- * Therefore objects queued for destruction in frame N, are destroyed frame N+2.
- */
+template<class Type, class TypeContainer>
 class DiscardQueue
 {
 public:
-  using ShaderQueue   = OwnerContainer<Shader*>;
-  using RendererQueue = OwnerContainer<Renderer*>;
-  using SceneQueue    = OwnerContainer<Scene*>;
-
-  /**
-   * Create a new DiscardQueue.
-   * @param[in] renderQueue Used to send GL clean-up messages for the next Render.
-   */
-  DiscardQueue(RenderQueue& renderQueue);
-
-  /**
-   * Non-virtual destructor; DiscardQueue is not suitable as a base class.
-   */
-  ~DiscardQueue();
-
-  /**
-   * Adds an unwanted Node and its children to the discard queue.
-   * If necessary, a message will be sent to clean-up GL resources in the next Render.
-   * @pre This method is not thread-safe, and should only be called from the update-thread.
-   * @param[in] updateBufferIndex The current update buffer index.
-   * @param[in] node The discarded node; DiscardQueue takes ownership.
-   */
-  void Add(BufferIndex updateBufferIndex, Node* node);
-
-  /**
-   * Adds an unwanted shader to the discard queue.
-   * A message will be sent to clean-up GL resources in the next Render.
-   * @pre This method is not thread-safe, and should only be called from the update-thread.
-   * @param[in] bufferIndex The current update buffer index.
-   * @param[in] shader The shader to queue; DiscardQueue takes ownership.
-   */
-  void Add(BufferIndex bufferIndex, Shader* shader);
-
-  /**
-   * Adds an unwanted Renderer to the discard queue.
-   * A message will be sent to clean up GL resources in the next Render.
-   * @param[in] updateBufferIndex The current update buffer index.
-   * @param[in] renderer The discarded renderer; DiscardQueue takes ownership.
-   */
-  void Add(BufferIndex updateBufferIndex, Renderer* renderer);
-
-  /**
-   * Adds an unwanted Scene to the discard queue.
-   * A message will be sent to clean up GL resources in the next Render.
-   * @param[in] updateBufferIndex The current update buffer index.
-   * @param[in] scene The discarded scene; DiscardQueue takes ownership.
-   */
-  void Add(BufferIndex updateBufferIndex, Scene* scene);
-
-  /**
-   * Release the nodes which were queued in the frame N-2.
-   * @pre This method should be called (once) at the beginning of every Update.
-   * @param[in] updateBufferIndex The current update buffer index.
-   */
-  void Clear(BufferIndex updateBufferIndex);
-
-private:
-  // Undefined
-  DiscardQueue(const DiscardQueue&);
-
-  // Undefined
-  DiscardQueue& operator=(const DiscardQueue& rhs);
+  DiscardQueue() = default;
+
+  void Add(BufferIndex updateBufferIndex, Type object)
+  {
+    mDiscardQueue[updateBufferIndex].PushBack(object);
+  }
+  void add(BufferIndex updateBufferIndex, Type object)
+  {
+    mDiscardQueue[updateBufferIndex].push_back(object);
+  }
+  void Clear(BufferIndex updateBufferIndex)
+  {
+    mDiscardQueue[updateBufferIndex].Clear();
+  }
+  void clear(BufferIndex updateBufferIndex)
+  {
+    mDiscardQueue[updateBufferIndex].clear();
+  }
 
 private:
-  RenderQueue& mRenderQueue; ///< Used to send GL clean-up messages for the next Render.
-
-  // Messages are queued here following the current update buffer number
-  OwnerContainer<Node*> mNodeQueue[2];
-  ShaderQueue           mShaderQueue[2];
-  RendererQueue         mRendererQueue[2];
-  SceneQueue            mSceneQueue[2];
+  TypeContainer mDiscardQueue[2];
 };
 
 } // namespace SceneGraph
index 51c5043..1865126 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
@@ -27,11 +27,9 @@ namespace Internal
 namespace SceneGraph
 {
 SceneControllerImpl::SceneControllerImpl(RenderMessageDispatcher& renderMessageDispatcher,
-                                         RenderQueue&             renderQueue,
-                                         DiscardQueue&            discardQueue)
+                                         RenderQueue&             renderQueue)
 : mRenderMessageDispatcher(renderMessageDispatcher),
-  mRenderQueue(renderQueue),
-  mDiscardQueue(discardQueue)
+  mRenderQueue(renderQueue)
 {
 }
 
index 966b94a..5b09333 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_SCENE_GRAPH_SCENE_CONTROLLER_IMPL_H
 
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
@@ -37,11 +37,9 @@ public:
    * Constructor
    * @param[in] rendererDispatcher Used for passing ownership of renderers to the render-thread.
    * @param[in] renderQueue  The renderQueue
-   * @param[in] discardQueue The discardQueue
    */
   SceneControllerImpl(RenderMessageDispatcher& renderMessageDispatcher,
-                      RenderQueue&             renderQueue,
-                      DiscardQueue&            discardQueue);
+                      RenderQueue&             renderQueue);
 
   /**
    * Destructor
@@ -65,14 +63,6 @@ public: // from SceneController
     return mRenderQueue;
   }
 
-  /**
-   * @copydoc SceneController::GetDiscardQueue()
-   */
-  DiscardQueue& GetDiscardQueue() override
-  {
-    return mDiscardQueue;
-  }
-
 private:
   // Undefined copy constructor.
   SceneControllerImpl(const SceneControllerImpl&);
@@ -83,7 +73,6 @@ private:
 private:
   RenderMessageDispatcher& mRenderMessageDispatcher; ///< Used for passing messages to the render-thread
   RenderQueue&             mRenderQueue;             ///< render queue
-  DiscardQueue&            mDiscardQueue;            ///< discard queue
 };
 
 } // namespace SceneGraph
index e29c112..9ddc52e 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_SCENE_GRAPH_SCENE_CONTROLLER_H
 
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
@@ -26,7 +26,6 @@ namespace SceneGraph
 {
 class RenderMessageDispatcher;
 class RenderQueue;
-class DiscardQueue;
 
 /**
  * Abstract interface for the scene controller
@@ -56,12 +55,6 @@ public:
    */
   virtual RenderQueue& GetRenderQueue() = 0;
 
-  /**
-   * Return the discard queue
-   * @return A reference to the discard queue
-   */
-  virtual DiscardQueue& GetDiscardQueue() = 0;
-
 private:
   // Undefined copy constructor.
   SceneController(const SceneController&);
index 2873011..d181771 100644 (file)
@@ -88,8 +88,8 @@ namespace
  * @param discardQueue to put the object to
  * @param updateBufferIndex to use
  */
-template<class T>
-inline void EraseUsingDiscardQueue(OwnerContainer<T*>& container, T* object, DiscardQueue& discardQueue, BufferIndex updateBufferIndex)
+template<class Type>
+inline void EraseUsingDiscardQueue(OwnerContainer<Type*>& container, Type* object, DiscardQueue<Type*, OwnerContainer<Type*>>& discardQueue, BufferIndex updateBufferIndex)
 {
   DALI_ASSERT_DEBUG(object && "NULL object not allowed");
 
@@ -152,7 +152,6 @@ struct UpdateManager::Impl
   Impl(NotificationManager&           notificationManager,
        CompleteNotificationInterface& animationPlaylist,
        PropertyNotifier&              propertyNotifier,
-       DiscardQueue&                  discardQueue,
        RenderController&              renderController,
        RenderManager&                 renderManager,
        RenderQueue&                   renderQueue,
@@ -164,7 +163,6 @@ struct UpdateManager::Impl
     animationPlaylist(animationPlaylist),
     propertyNotifier(propertyNotifier),
     shaderSaver(nullptr),
-    discardQueue(discardQueue),
     renderController(renderController),
     sceneController(nullptr),
     renderManager(renderManager),
@@ -187,7 +185,7 @@ struct UpdateManager::Impl
     renderersAdded(false),
     renderingRequired(false)
   {
-    sceneController = new SceneControllerImpl(renderMessageDispatcher, renderQueue, discardQueue);
+    sceneController = new SceneControllerImpl(renderMessageDispatcher, renderQueue);
 
     // create first 'dummy' node
     nodes.PushBack(nullptr);
@@ -255,7 +253,6 @@ struct UpdateManager::Impl
   CompleteNotificationInterface& animationPlaylist;       ///< Holds handles to all the animations
   PropertyNotifier&              propertyNotifier;        ///< Provides notification to applications when properties are modified.
   ShaderSaver*                   shaderSaver;             ///< Saves shader binaries.
-  DiscardQueue&                  discardQueue;            ///< Nodes are added here when disconnected from the scene-graph.
   RenderController&              renderController;        ///< render controller
   SceneControllerImpl*           sceneController;         ///< scene controller
   RenderManager&                 renderManager;           ///< This is responsible for rendering the results of each "update"
@@ -280,7 +277,13 @@ struct UpdateManager::Impl
   OwnerContainer<Renderer*>             renderers;             ///< A container of owned renderers
   OwnerContainer<TextureSet*>           textureSets;           ///< A container of owned texture sets
   OwnerContainer<Shader*>               shaders;               ///< A container of owned shaders
-  OwnerPointer<PanGesture>              panGestureProcessor;   ///< Owned pan gesture processor; it lives for the lifecycle of UpdateManager
+
+  DiscardQueue<Node*, OwnerContainer<Node*>>         nodeDiscardQueue; ///< Nodes are added here when disconnected from the scene-graph.
+  DiscardQueue<Shader*, OwnerContainer<Shader*>>     shaderDiscardQueue;
+  DiscardQueue<Renderer*, OwnerContainer<Renderer*>> rendererDiscardQueue;
+  DiscardQueue<Scene*, OwnerContainer<Scene*>>       sceneDiscardQueue;
+
+  OwnerPointer<PanGesture> panGestureProcessor; ///< Owned pan gesture processor; it lives for the lifecycle of UpdateManager
 
   MessageQueue                         messageQueue;          ///< The messages queued from the event-thread
   std::vector<Internal::ShaderDataPtr> renderCompiledShaders; ///< Shaders compiled on Render thread are inserted here for update thread to pass on to event thread.
@@ -309,7 +312,6 @@ private:
 UpdateManager::UpdateManager(NotificationManager&           notificationManager,
                              CompleteNotificationInterface& animationFinishedNotifier,
                              PropertyNotifier&              propertyNotifier,
-                             DiscardQueue&                  discardQueue,
                              RenderController&              controller,
                              RenderManager&                 renderManager,
                              RenderQueue&                   renderQueue,
@@ -319,7 +321,6 @@ UpdateManager::UpdateManager(NotificationManager&           notificationManager,
   mImpl = new Impl(notificationManager,
                    animationFinishedNotifier,
                    propertyNotifier,
-                   discardQueue,
                    controller,
                    renderManager,
                    renderQueue,
@@ -365,7 +366,7 @@ void UpdateManager::UninstallRoot(Layer* layer)
     }
   }
 
-  mImpl->discardQueue.Add(mSceneGraphBuffers.GetUpdateBufferIndex(), layer);
+  mImpl->nodeDiscardQueue.Add(mSceneGraphBuffers.GetUpdateBufferIndex(), layer);
 
   // Notify the layer about impending destruction
   layer->OnDestroy();
@@ -448,7 +449,7 @@ void UpdateManager::DestroyNode(Node* node)
     RemoveCamera(static_cast<Camera*>(node));
   }
 
-  mImpl->discardQueue.Add(mSceneGraphBuffers.GetUpdateBufferIndex(), node);
+  mImpl->nodeDiscardQueue.Add(mSceneGraphBuffers.GetUpdateBufferIndex(), node);
 
   // Notify the Node about impending destruction
   node->OnDestroy();
@@ -542,7 +543,7 @@ void UpdateManager::RemoveScene(Scene* scene)
   {
     if(sceneInfo && sceneInfo->scene && sceneInfo->scene.Get() == scene)
     {
-      mImpl->discardQueue.Add(mSceneGraphBuffers.GetUpdateBufferIndex(), sceneInfo->scene.Release()); // take the address of the reference to a pointer
+      mImpl->sceneDiscardQueue.Add(mSceneGraphBuffers.GetUpdateBufferIndex(), sceneInfo->scene.Release()); // take the address of the reference to a pointer
       break;
     }
   }
@@ -625,7 +626,7 @@ void UpdateManager::AddShader(OwnerPointer<Shader>& shader)
 void UpdateManager::RemoveShader(Shader* shader)
 {
   // Find the shader and destroy it
-  EraseUsingDiscardQueue(mImpl->shaders, shader, mImpl->discardQueue, mSceneGraphBuffers.GetUpdateBufferIndex());
+  EraseUsingDiscardQueue(mImpl->shaders, shader, mImpl->shaderDiscardQueue, mSceneGraphBuffers.GetUpdateBufferIndex());
 }
 
 void UpdateManager::SaveBinary(Internal::ShaderDataPtr shaderData)
@@ -657,7 +658,7 @@ void UpdateManager::RemoveRenderer(Renderer* renderer)
   DALI_LOG_INFO(gLogFilter, Debug::General, "[%x] RemoveRenderer\n", renderer);
 
   // Find the renderer and destroy it
-  EraseUsingDiscardQueue(mImpl->renderers, renderer, mImpl->discardQueue, mSceneGraphBuffers.GetUpdateBufferIndex());
+  EraseUsingDiscardQueue(mImpl->renderers, renderer, mImpl->rendererDiscardQueue, mSceneGraphBuffers.GetUpdateBufferIndex());
   // Need to remove the render object as well
   renderer->DisconnectFromSceneGraph(*mImpl->sceneController, mSceneGraphBuffers.GetUpdateBufferIndex());
 }
@@ -950,7 +951,10 @@ uint32_t UpdateManager::Update(float    elapsedSeconds,
   const BufferIndex bufferIndex = mSceneGraphBuffers.GetUpdateBufferIndex();
 
   // Clear nodes/resources which were previously discarded
-  mImpl->discardQueue.Clear(bufferIndex);
+  mImpl->nodeDiscardQueue.Clear(bufferIndex);
+  mImpl->shaderDiscardQueue.Clear(bufferIndex);
+  mImpl->rendererDiscardQueue.Clear(bufferIndex);
+  mImpl->sceneDiscardQueue.Clear(bufferIndex);
 
   bool isAnimationRunning = IsAnimationRunning();
 
@@ -1278,7 +1282,7 @@ void UpdateManager::RemoveFrameCallback(FrameCallbackInterface* frameCallback)
 void UpdateManager::AddSampler(OwnerPointer<Render::Sampler>& sampler)
 {
   // Message has ownership of Sampler while in transit from update to render
-  using DerivedType = MessageValue1<RenderManager, OwnerPointer<Render::Sampler> >;
+  using DerivedType = MessageValue1<RenderManager, OwnerPointer<Render::Sampler>>;
 
   // Reserve some memory inside the render queue
   uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot(mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof(DerivedType));
@@ -1323,7 +1327,7 @@ void UpdateManager::SetWrapMode(Render::Sampler* sampler, uint32_t rWrapMode, ui
 void UpdateManager::AddVertexBuffer(OwnerPointer<Render::VertexBuffer>& vertexBuffer)
 {
   // Message has ownership of format while in transit from update -> render
-  using DerivedType = MessageValue1<RenderManager, OwnerPointer<Render::VertexBuffer> >;
+  using DerivedType = MessageValue1<RenderManager, OwnerPointer<Render::VertexBuffer>>;
 
   // Reserve some memory inside the render queue
   uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot(mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof(DerivedType));
@@ -1346,7 +1350,7 @@ void UpdateManager::RemoveVertexBuffer(Render::VertexBuffer* vertexBuffer)
 void UpdateManager::SetVertexBufferFormat(Render::VertexBuffer* vertexBuffer, OwnerPointer<Render::VertexBuffer::Format>& format)
 {
   // Message has ownership of format while in transit from update -> render
-  using DerivedType = MessageValue2<RenderManager, Render::VertexBuffer*, OwnerPointer<Render::VertexBuffer::Format> >;
+  using DerivedType = MessageValue2<RenderManager, Render::VertexBuffer*, OwnerPointer<Render::VertexBuffer::Format>>;
 
   // Reserve some memory inside the render queue
   uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot(mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof(DerivedType));
@@ -1355,10 +1359,10 @@ void UpdateManager::SetVertexBufferFormat(Render::VertexBuffer* vertexBuffer, Ow
   new(slot) DerivedType(&mImpl->renderManager, &RenderManager::SetVertexBufferFormat, vertexBuffer, format);
 }
 
-void UpdateManager::SetVertexBufferData(Render::VertexBuffer* vertexBuffer, OwnerPointer<Vector<uint8_t> >& data, uint32_t size)
+void UpdateManager::SetVertexBufferData(Render::VertexBuffer* vertexBuffer, OwnerPointer<Vector<uint8_t>>& data, uint32_t size)
 {
   // Message has ownership of format while in transit from update -> render
-  using DerivedType = MessageValue3<RenderManager, Render::VertexBuffer*, OwnerPointer<Dali::Vector<uint8_t> >, uint32_t>;
+  using DerivedType = MessageValue3<RenderManager, Render::VertexBuffer*, OwnerPointer<Dali::Vector<uint8_t>>, uint32_t>;
 
   // Reserve some memory inside the render queue
   uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot(mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof(DerivedType));
@@ -1370,7 +1374,7 @@ void UpdateManager::SetVertexBufferData(Render::VertexBuffer* vertexBuffer, Owne
 void UpdateManager::AddGeometry(OwnerPointer<Render::Geometry>& geometry)
 {
   // Message has ownership of format while in transit from update -> render
-  using DerivedType = MessageValue1<RenderManager, OwnerPointer<Render::Geometry> >;
+  using DerivedType = MessageValue1<RenderManager, OwnerPointer<Render::Geometry>>;
 
   // Reserve some memory inside the render queue
   uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot(mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof(DerivedType));
@@ -1437,7 +1441,7 @@ void UpdateManager::AttachVertexBuffer(Render::Geometry* geometry, Render::Verte
 void UpdateManager::AddTexture(OwnerPointer<Render::Texture>& texture)
 {
   // Message has ownership of Texture while in transit from update -> render
-  using DerivedType = MessageValue1<RenderManager, OwnerPointer<Render::Texture> >;
+  using DerivedType = MessageValue1<RenderManager, OwnerPointer<Render::Texture>>;
 
   // Reserve some memory inside the render queue
   uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot(mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof(DerivedType));
@@ -1481,7 +1485,7 @@ void UpdateManager::GenerateMipmaps(Render::Texture* texture)
 
 void UpdateManager::AddFrameBuffer(OwnerPointer<Render::FrameBuffer>& frameBuffer)
 {
-  using DerivedType = MessageValue1<RenderManager, OwnerPointer<Render::FrameBuffer> >;
+  using DerivedType = MessageValue1<RenderManager, OwnerPointer<Render::FrameBuffer>>;
 
   // Reserve some memory inside the render queue
   uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot(mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof(DerivedType));
index a8a6683..a0714bc 100644 (file)
@@ -82,7 +82,6 @@ struct ParameterType<PropertyNotification::NotifyMode>
 namespace SceneGraph
 {
 class Animation;
-class DiscardQueue;
 class RenderManager;
 class RenderTaskList;
 class RenderTaskProcessor;
@@ -105,7 +104,6 @@ public:
    * @param[in] notificationManager This should be notified when animations have finished.
    * @param[in] animationPlaylist The CompleteNotificationInterface that handles the animations
    * @param[in] propertyNotifier The PropertyNotifier
-   * @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] renderManager This is responsible for rendering the results of each "update".
    * @param[in] renderQueue Used to queue messages for the next render.
@@ -114,7 +112,6 @@ public:
   UpdateManager(NotificationManager&           notificationManager,
                 CompleteNotificationInterface& animationPlaylist,
                 PropertyNotifier&              propertyNotifier,
-                DiscardQueue&                  discardQueue,
                 Integration::RenderController& controller,
                 RenderManager&                 renderManager,
                 RenderQueue&                   renderQueue,
index be26b7a..c11c430 100644 (file)
@@ -55,7 +55,6 @@ struct ParameterType<ClippingMode::Type> : public BasicType<ClippingMode::Type>
 
 namespace SceneGraph
 {
-class DiscardQueue;
 class Layer;
 class RenderTask;
 class UpdateManager;