X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fevent%2Fcommon%2Fstage-impl.h;h=a6aa52e6c673863fb32e5b287f4b2ee9fb706347;hb=9697546f6395000a500259997c415d9ff3c2e337;hp=415f87b1ea48a2968f98306de9aa372c896f37d7;hpb=de2ca7c4b8120766f23113ac6695c12066657006;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/event/common/stage-impl.h b/dali/internal/event/common/stage-impl.h index 415f87b..a6aa52e 100644 --- a/dali/internal/event/common/stage-impl.h +++ b/dali/internal/event/common/stage-impl.h @@ -1,8 +1,8 @@ -#ifndef __DALI_INTERNAL_STAGE_H__ -#define __DALI_INTERNAL_STAGE_H__ +#ifndef DALI_INTERNAL_STAGE_H +#define DALI_INTERNAL_STAGE_H /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2018 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. @@ -21,6 +21,7 @@ // INTERNAL INCLUDES #include #include +#include #include #include #include @@ -44,6 +45,7 @@ struct Vector2; namespace Integration { class SystemOverlay; +class RenderController; } namespace Internal @@ -75,16 +77,19 @@ public: * @param[in] propertyNotificationManager * @param[in] updateManager * @param[in] notificationManager + * @param[in] renderController */ static StagePtr New( AnimationPlaylist& playlist, PropertyNotificationManager& propertyNotificationManager, SceneGraph::UpdateManager& updateManager, - NotificationManager& notificationManager ); + NotificationManager& notificationManager, + Integration::RenderController& renderController ); /** * Initialize the stage. + * @param[in] renderToFbo Whether to render into a Frame Buffer Object. */ - void Initialize(); + void Initialize( bool renderToFbo ); /** * Uninitialize the stage. @@ -151,7 +156,7 @@ public: * initial size is zero before it is assigned * @param[in] margin margin size */ - void SetTopMargin( unsigned int margin ); + void SetTopMargin( uint32_t margin ); /** * Returns the size of the Stage in pixels as a Vector. @@ -193,12 +198,12 @@ public: /** * @copydoc Dali::Stage::GetLayerCount() */ - unsigned int GetLayerCount() const; + uint32_t GetLayerCount() const; /** * @copydoc Dali::Stage::GetLayer() */ - Dali::Layer GetLayer( unsigned int depth ) const; + Dali::Layer GetLayer( uint32_t depth ) const; /** * @copydoc Dali::Stage::GetRootLayer() @@ -301,12 +306,29 @@ public: void KeepRendering( float durationSeconds ); /** + * @copydoc Dali::DevelStage::SetRenderingBehavior() + */ + void SetRenderingBehavior( DevelStage::Rendering renderingBehavior ); + + /** + * @copydoc Dali::DevelStage::GetRenderingBehavior() + */ + DevelStage::Rendering GetRenderingBehavior() const; + + /** * Used by the EventProcessor to emit key event signals. * @param[in] event The key event. */ void EmitKeyEventSignal(const 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); + + /** * Emits the event processing finished signal. * * @see Dali::Stage::SignalEventProcessingFinished() @@ -372,6 +394,21 @@ public: Dali::Stage::SceneCreatedSignalType& SceneCreatedSignal(); /** + * @copydoc Dali::DevelStage::KeyEventGeneratedSignal() + */ + Dali::DevelStage::KeyEventGeneratedSignalType& KeyEventGeneratedSignal(); + + /** + * @copydoc Dali::DevelStage::AddFrameCallback() + */ + void AddFrameCallback( FrameCallbackInterface& frameCallback, Actor& rootActor ); + + /** + * @copydoc Dali::DevelStage::RemoveFrameCallback() + */ + void RemoveFrameCallback( FrameCallbackInterface& frameCallback ); + + /** * Connects a callback function with the object's signals. * @param[in] object The object providing the signal. * @param[in] tracker Used to disconnect the signal. @@ -412,15 +449,41 @@ public: // Implementation of EventThreadServices virtual SceneGraph::UpdateManager& GetUpdateManager(); /** + * @copydoc EventThreadServices::GetRenderController + */ + virtual Integration::RenderController& GetRenderController(); + + /** * @copydoc EventThreadServices::ReserveMessageSlot */ - virtual unsigned int* ReserveMessageSlot( std::size_t size, bool updateScene ); + virtual uint32_t* ReserveMessageSlot( uint32_t size, bool updateScene ); /** * @copydoc EventThreadServices::GetEventBufferIndex */ virtual BufferIndex GetEventBufferIndex() const; + /** + * @copydoc EventThreadServices::ForceNextUpdate + */ + virtual void ForceNextUpdate(); + + /** + * @copydoc EventThreadServices::IsNextUpdateForced + */ + virtual bool IsNextUpdateForced(); + + /** + * Request that the depth tree is rebuilt + */ + void RequestRebuildDepthTree(); + + /** + * Rebuilds the depth tree at the end of the event frame if + * it was requested this frame. + */ + void RebuildDepthTree(); + private: /** @@ -429,7 +492,8 @@ private: Stage( AnimationPlaylist& playlist, PropertyNotificationManager& propertyNotificationManager, SceneGraph::UpdateManager& updateManager, - NotificationManager& notificationManager ); + NotificationManager& notificationManager, + Integration::RenderController& renderController ); /** * A reference counted object may only be deleted by calling Unreference() @@ -447,6 +511,8 @@ private: NotificationManager& mNotificationManager; + Integration::RenderController& mRenderController; + // The stage-size may be less than surface-size (reduced by top-margin) Vector2 mSize; Vector2 mSurfaceSize; @@ -464,7 +530,7 @@ private: ViewMode mViewMode; float mStereoBase; - unsigned int mTopMargin; + uint32_t mTopMargin; Vector2 mDpi; // The object registry @@ -482,6 +548,7 @@ private: // The key event signal Dali::Stage::KeyEventSignalType mKeyEventSignal; + Dali::DevelStage::KeyEventGeneratedSignalType mKeyEventGeneratedSignal; // The event processing finished signal Dali::Stage::EventProcessingFinishedSignalType mEventProcessingFinishedSignal; @@ -497,6 +564,12 @@ private: Dali::Stage::ContextStatusSignal mContextRegainedSignal; Dali::Stage::SceneCreatedSignalType mSceneCreatedSignal; + + DevelStage::Rendering mRenderingBehavior; ///< The rendering behavior + + bool mDepthTreeDirty:1; ///< True if the depth tree needs recalculating + bool mForceNextUpdate:1; ///< True if the next rendering is really required. + bool mRenderToFbo:1; ///< Whether to render to a Frame Buffer Object. }; } // namespace Internal @@ -523,4 +596,4 @@ inline const Internal::Stage& GetImplementation(const Dali::Stage& stage) } // namespace Dali -#endif // __DALI_INTERNAL_STAGE_H__ +#endif // DALI_INTERNAL_STAGE_H