return mWheelEventSignal;
}
-std::vector<Dali::Internal::SceneGraph::DirtyRect>& Scene::GetItemsDirtyRects()
-{
- return mItemsDirtyRects;
-}
-
} // namespace Internal
} // namespace Dali
namespace Internal
{
-//@todo Break this dependence somehow.
-namespace Render
-{
-class Renderer;
-}
-
namespace SceneGraph
{
class Scene;
-
-struct DirtyRect
-{
- DirtyRect(Node* node, Render::Renderer* renderer, int32_t frame, Rect<int>& rect)
- : node(node),
- renderer(renderer),
- frame(frame),
- rect(rect),
- visited(true)
- {
- }
-
- DirtyRect()
- : node(nullptr),
- renderer(nullptr),
- frame(0),
- rect(),
- visited(true)
- {
- }
-
- bool operator<(const DirtyRect& rhs) const
- {
- if(node == rhs.node)
- {
- if(renderer == rhs.renderer)
- {
- return frame > rhs.frame; // Most recent rects come first
- }
- else
- {
- return renderer < rhs.renderer;
- }
- }
- else
- {
- return node < rhs.node;
- }
- }
-
- Node* node;
- Render::Renderer* renderer;
- int32_t frame;
-
- Rect<int32_t> rect;
- bool visited;
-};
-
} // namespace SceneGraph
class EventProcessor;
*/
Integration::Scene::WheelEventSignalType& WheelEventSignal();
- /**
- * @brief Get ItemsDirtyRects
- *
- * @return the ItemsDirtyRects
- */
- std::vector<Dali::Internal::SceneGraph::DirtyRect>& GetItemsDirtyRects();
-
public:
/**
* From RenderTaskDefaults; retrieve the default root actor.
// The wheel event signal
Integration::Scene::WheelEventSignalType mWheelEventSignal;
-
- std::vector<Dali::Internal::SceneGraph::DirtyRect> mItemsDirtyRects;
};
} // namespace Internal
// Mark previous dirty rects in the sorted array. The array is already sorted by node and renderer, frame number.
// so you don't need to sort: std::stable_sort(itemsDirtyRects.begin(), itemsDirtyRects.end());
- std::vector<DirtyRect>& itemsDirtyRects = sceneInternal.GetItemsDirtyRects();
+ std::vector<DirtyRect>& itemsDirtyRects = sceneObject->GetItemsDirtyRects();
for(DirtyRect& dirtyRect : itemsDirtyRects)
{
dirtyRect.visited = false;
bool Scene::IsRotationCompletedAcknowledgementSet()
{
bool setRotationCompletedAcknowledgement = mRotationCompletedAcknowledgement;
- mRotationCompletedAcknowledgement = false;
+ mRotationCompletedAcknowledgement = false;
return setRotationCompletedAcknowledgement;
}
+std::vector<DirtyRect>& Scene::GetItemsDirtyRects()
+{
+ return mItemsDirtyRects;
+}
+
} // namespace SceneGraph
} // namespace Internal
{
namespace Internal
{
+namespace Render
+{
+class Renderer;
+}
+
namespace SceneGraph
{
class RenderInstructionContainer;
+class Node;
+
+struct DirtyRect
+{
+ DirtyRect(Node* node, Render::Renderer* renderer, int32_t frame, Rect<int>& rect)
+ : node(node),
+ renderer(renderer),
+ frame(frame),
+ rect(rect),
+ visited(true)
+ {
+ }
+
+ DirtyRect()
+ : node(nullptr),
+ renderer(nullptr),
+ frame(0),
+ rect(),
+ visited(true)
+ {
+ }
+
+ bool operator<(const DirtyRect& rhs) const
+ {
+ if(node == rhs.node)
+ {
+ if(renderer == rhs.renderer)
+ {
+ return frame > rhs.frame; // Most recent rects come first
+ }
+ else
+ {
+ return renderer < rhs.renderer;
+ }
+ }
+ else
+ {
+ return node < rhs.node;
+ }
+ }
+
+ Node* node;
+ Render::Renderer* renderer;
+ int32_t frame;
+
+ Rect<int32_t> rect;
+ bool visited;
+};
class Scene
{
return mRoot;
}
+ /**
+ * @brief Get ItemsDirtyRects
+ *
+ * @return the ItemsDirtyRects
+ */
+ std::vector<DirtyRect>& GetItemsDirtyRects();
+
private:
// Render instructions describe what should be rendered during RenderManager::RenderScene()
// Update manager updates instructions for the next frame while we render the current one
Graphics::UniquePtr<Graphics::RenderPass> mRenderPassNoClear{nullptr}; ///< The render pass created to render the surface without clearing color
Graphics::RenderTarget* mRenderTarget{nullptr}; ///< This is created in the event thread when surface is created/resized/replaced
- // clear colors
- std::vector<Graphics::ClearValue> mClearValues{};
+ std::vector<Graphics::ClearValue> mClearValues{}; ///< Clear colors
+ std::vector<Dali::Internal::SceneGraph::DirtyRect> mItemsDirtyRects{}; ///< Dirty rect list
SceneGraph::Layer* mRoot{nullptr}; ///< Root node (root is a layer). The layer is not stored in the node memory pool.
};