X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fevent%2Fcommon%2Fscene-impl.h;h=6597ddc49cf9e17947f78d830373525d8010ef57;hb=c8d4a9700affd6dce08df45fbf40cd5946ffdd5f;hp=fbf22b22ec72830580e9858b5bce7f29bfd3c532;hpb=93faafb980ccea822d80f7c14e891f07869c3497;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/event/common/scene-impl.h b/dali/internal/event/common/scene-impl.h old mode 100644 new mode 100755 index fbf22b2..6597ddc --- a/dali/internal/event/common/scene-impl.h +++ b/dali/internal/event/common/scene-impl.h @@ -44,6 +44,54 @@ namespace Internal namespace SceneGraph { class Scene; + +struct DirtyRect +{ + DirtyRect(Node* node, Render::Renderer* renderer, int frame, Rect& 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; + int frame; + + Rect rect; + bool visited; +}; + } class EventProcessor; @@ -71,7 +119,7 @@ public: /** * virtual destructor */ - virtual ~Scene(); + ~Scene() override; /** * @copydoc Dali::Integration::Scene::Add @@ -123,8 +171,10 @@ public: * * @param[in] width The new width of the set surface * @param[in] height The new height of the set surface + * @param[in] orientation The orientation of the surface + * @param[in] forceUpdate The flag to update force */ - void SurfaceResized( float width, float height ); + void SurfaceResized( float width, float height, int orientation, bool forceUpdate ); /** * @copydoc Dali::Integration::Scene::SurfaceReplaced @@ -187,14 +237,14 @@ public: * Used by the EventProcessor to emit key event signals. * @param[in] event The key event. */ - void EmitKeyEventSignal(const KeyEvent& event); + void EmitKeyEventSignal(const Dali::KeyEvent& event); /** * Used by the KeyEventProcessor to emit KeyEventGenerated signals. * @param[in] event The key event. * @return The return is true if KeyEvent is consumed, otherwise false. */ - bool EmitKeyEventGeneratedSignal(const KeyEvent& event); + bool EmitKeyEventGeneratedSignal(const Dali::KeyEvent& event); /** * Emits the event processing finished signal. @@ -205,16 +255,15 @@ public: /** * Emits the touched signal. - * @param[in] touchEvent The touch event details (Old API). * @param[in] touch The touch event details. */ - void EmitTouchedSignal( const TouchEvent& touchEvent, const Dali::TouchData& touch ); + void EmitTouchedSignal( const Dali::TouchEvent& touch ); /** * Used by the EventProcessor to emit wheel event signals. * @param[in] event The wheel event. */ - void EmitWheelEventSignal( const WheelEvent& event ); + void EmitWheelEventSignal( const Dali::WheelEvent& event ); /** * @copydoc Dali::Integration::Scene::AddFrameRenderedCallback @@ -251,37 +300,36 @@ public: */ Integration::Scene::EventProcessingFinishedSignalType& EventProcessingFinishedSignal(); - // The touched signal, to support Stage touched signal, will be removed when deprecated in public Stage API - using TouchedSignalType = Signal< void (const TouchEvent&) >; - - /** - * Touched signal to support deprecated stage touched signal. - */ - TouchedSignalType& TouchedSignal(); - /** - * @copydoc Integration::Scene::TouchSignal() + * @copydoc Integration::Scene::TouchedSignal() */ - Integration::Scene::TouchSignalType& TouchSignal(); + Integration::Scene::TouchEventSignalType& TouchedSignal(); /** * @copydoc Integration::Scene::sWheelEventSignal() */ Integration::Scene::WheelEventSignalType& WheelEventSignal(); + /** + * @brief Get ItemsDirtyRects + * + * @return the ItemsDirtyRects + */ + std::vector& GetItemsDirtyRects(); + public: /** * From RenderTaskDefaults; retrieve the default root actor. * @return The default root actor. */ - virtual Actor& GetDefaultRootActor(); + Actor& GetDefaultRootActor() override; /** * From RenderTaskDefaults; retrieve the default camera actor. * @return The default camera actor. */ - virtual CameraActor& GetDefaultCameraActor(); + CameraActor& GetDefaultCameraActor() override; private: @@ -310,6 +358,9 @@ private: Vector4 mBackgroundColor; + // The SurfaceOrientation + int mSurfaceOrientation; + LayerPtr mRootLayer; // Ordered list of currently on-stage layers @@ -332,13 +383,12 @@ private: Integration::Scene::EventProcessingFinishedSignalType mEventProcessingFinishedSignal; // The touch signal - Integration::Scene::TouchSignalType mTouchSignal; - - // The touched signal - TouchedSignalType mTouchedSignal; + Integration::Scene::TouchEventSignalType mTouchedSignal; // The wheel event signal Integration::Scene::WheelEventSignalType mWheelEventSignal; + + std::vector mItemsDirtyRects; }; } // Internal