{
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() = default;
+
+ 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{nullptr};
+ Render::Renderer* renderer{nullptr};
+ int32_t frame{0};
+ Rect<int32_t> rect{};
+ bool visited{true};
+};
class Scene
{
return mClearValues;
}
+ /**
+ * @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
bool mSkipRendering; ///< A flag to skip rendering
- Rect<int32_t> mSurfaceRect; ///< The rectangle of surface which is related ot this scene.
- int32_t mSurfaceOrientation; ///< The orientation of surface which is related of this scene
- bool mSurfaceRectChanged; ///< The flag of surface's rectangle is changed when is resized, moved or rotated.
+ Rect<int32_t> mSurfaceRect; ///< The rectangle of surface which is related ot this scene.
+ int32_t mSurfaceOrientation; ///< The orientation of surface which is related of this scene
+ bool mSurfaceRectChanged; ///< The flag of surface's rectangle is changed when is resized, moved or rotated.
bool mRotationCompletedAcknowledgement; ///< The flag of sending the acknowledgement to complete window rotation.
// Render pass and render target
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
};
/// Messages