X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fcommon%2Fcore-impl.h;h=30395e526a188fe3f10f4fa6c47d52d49901b051;hb=8fe192b252ce20626149d62291cafb4950462ada;hp=091408fd956fab7dd12fad66e4b58ba33c8a11b8;hpb=67edc0b3c42e3e9e330c51636045fcdf36adbb24;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/common/core-impl.h b/dali/internal/common/core-impl.h index 091408f..30395e5 100644 --- a/dali/internal/common/core-impl.h +++ b/dali/internal/common/core-impl.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_CORE_H /* - * Copyright (c) 2016 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. @@ -19,13 +19,13 @@ */ // INTERNAL INCLUDES +#include #include #include +#include #include #include #include -#include -#include #include namespace Dali @@ -33,6 +33,7 @@ namespace Dali namespace Integration { +class Processor; class RenderController; class PlatformAbstraction; class GestureManager; @@ -53,8 +54,6 @@ class AnimationPlaylist; class PropertyNotificationManager; class EventProcessor; class GestureEventProcessor; -class ResourceClient; -class ResourceManager; class ShaderFactory; class TouchResampler; class RelayoutController; @@ -64,8 +63,6 @@ namespace SceneGraph class UpdateManager; class RenderManager; class DiscardQueue; -class TextureCacheDispatcher; -class GeometryBatcher; class RenderTaskProcessor; } @@ -84,7 +81,10 @@ public: Integration::GlAbstraction& glAbstraction, Integration::GlSyncAbstraction& glSyncAbstraction, Integration::GestureManager& gestureManager, - ResourcePolicy::DataRetention dataRetentionPolicy ); + ResourcePolicy::DataRetention dataRetentionPolicy, + Integration::RenderToFrameBuffer renderToFboEnabled, + Integration::DepthBufferAvailable depthBufferAvailable, + Integration::StencilBufferAvailable stencilBufferAvailable ); /** * Destructor @@ -112,44 +112,34 @@ public: void RecoverFromContextLoss(); /** - * @copydoc Dali::Integration::Core::SurfaceResized(unsigned int, unsigned int) + * @copydoc Dali::Integration::Core::SurfaceResized(uint32_t, uint32_t) */ - void SurfaceResized(unsigned int width, unsigned int height); + void SurfaceResized(uint32_t width, uint32_t height); /** - * @copydoc Dali::Integration::Core::SetTopMargin( unsigned int margin ) + * @copydoc Dali::Integration::Core::SetTopMargin( uint32_t margin ) */ - void SetTopMargin( unsigned int margin ); + void SetTopMargin( uint32_t margin ); /** - * @copydoc Dali::Integration::Core::SetDpi(unsigned int, unsigned int) + * @copydoc Dali::Integration::Core::SetDpi(uint32_t, uint32_t) */ - void SetDpi(unsigned int dpiHorizontal, unsigned int dpiVertical); + void SetDpi(uint32_t dpiHorizontal, uint32_t dpiVertical); /** - * @copydoc Dali::Integration::Core::SetMinimumFrameTimeInterval(unsigned int) + * @copydoc Dali::Integration::Core::SetMinimumFrameTimeInterval(uint32_t) */ - void SetMinimumFrameTimeInterval(unsigned int interval); + void SetMinimumFrameTimeInterval(uint32_t interval); /** * @copydoc Dali::Integration::Core::Update() */ - void Update( float elapsedSeconds, unsigned int lastVSyncTimeMilliseconds, unsigned int nextVSyncTimeMilliseconds, Integration::UpdateStatus& status ); + void Update( float elapsedSeconds, uint32_t lastVSyncTimeMilliseconds, uint32_t nextVSyncTimeMilliseconds, Integration::UpdateStatus& status, bool renderToFboEnabled, bool isRenderingToFbo ); /** * @copydoc Dali::Integration::Core::Render() */ - void Render( Integration::RenderStatus& status ); - - /** - * @copydoc Dali::Integration::Core::Suspend() - */ - void Suspend(); - - /** - * @copydoc Dali::Integration::Core::Resume() - */ - void Resume(); + void Render( Integration::RenderStatus& status, bool forceClear ); /** * @copydoc Dali::Integration::Core::SceneCreated() @@ -169,36 +159,30 @@ public: /** * @copydoc Dali::Integration::Core::GetMaximumUpdateCount() */ - unsigned int GetMaximumUpdateCount() const; + uint32_t GetMaximumUpdateCount() const; /** * @copydoc Dali::Integration::Core::GetSystemOverlay() */ Integration::SystemOverlay& GetSystemOverlay(); - // Stereoscopy - - /** - * @copydoc Dali::Integration::Core::SetViewMode() - */ - void SetViewMode( ViewMode viewMode ); - /** - * @copydoc Dali::Integration::Core::GetViewMode() + * @copydoc Dali::Integration::Core::RegisterProcessor */ - ViewMode GetViewMode() const; + void RegisterProcessor( Dali::Integration::Processor& processor ); /** - * @copydoc Dali::Integration::Core::SetStereoBase() + * @copydoc Dali::Integration::Core::UnregisterProcessor */ - void SetStereoBase( float stereoBase ); + void UnregisterProcessor( Dali::Integration::Processor& processor ); +private: /** - * @copydoc Dali::Integration::Core::GetStereoBase() + * Run each registered processor */ - float GetStereoBase() const; + void RunProcessors(); -private: // for use by ThreadLocalStorage + // for use by ThreadLocalStorage /** * Returns the current stage. @@ -231,18 +215,6 @@ private: // for use by ThreadLocalStorage NotificationManager& GetNotificationManager(); /** - * Returns the Resource Manager. - * @return A reference to the Resource Manager. - */ - ResourceManager& GetResourceManager(); - - /** - * Returns the Resource client. - * @return A reference to the Resource Client. - */ - ResourceClient& GetResourceClient(); - - /** * Returns the Shader factory * @return A reference to the Shader binary factory. */ @@ -279,25 +251,21 @@ private: Integration::PlatformAbstraction& mPlatform; ///< The interface providing platform specific services. IntrusivePtr mStage; ///< The current stage - GestureEventProcessor* mGestureEventProcessor; ///< The gesture event processor - EventProcessor* mEventProcessor; ///< The event processor - SceneGraph::UpdateManager* mUpdateManager; ///< Update manager - SceneGraph::RenderManager* mRenderManager; ///< Render manager - SceneGraph::DiscardQueue* mDiscardQueue; ///< Used to cleanup nodes & resources when no longer in use. - SceneGraph::TextureCacheDispatcher* mTextureCacheDispatcher; ///< Used to send messages to TextureCache - LockedResourceQueue* mTextureUploadedQueue; ///< Stores resource ids which require post processing after render - NotificationManager* mNotificationManager; ///< Notification manager AnimationPlaylistOwner mAnimationPlaylist; ///< For 'Fire and forget' animation support OwnerPointer mPropertyNotificationManager; ///< For safe signal emmision of property changed notifications - ShaderFactory* mShaderFactory; ///< Shader resource factory - ResourceClient* mResourceClient; ///< Asynchronous Resource Loading - ResourceManager* mResourceManager; ///< Asynchronous Resource Loading IntrusivePtr< RelayoutController > mRelayoutController; ///< Size negotiation relayout controller - SceneGraph::GeometryBatcher* mGeometryBatcher; ///< Instance of the geometry batcher - SceneGraph::RenderTaskProcessor* mRenderTaskProcessor; ///< Handles the processing of render tasks - bool mIsActive : 1; ///< Whether Core is active or suspended bool mProcessingEvent : 1; ///< True during ProcessEvents() + OwnerPointer mRenderTaskProcessor; ///< Handles the processing of render tasks + OwnerPointer mRenderManager; ///< Render manager + OwnerPointer mUpdateManager; ///< Update manager + OwnerPointer mDiscardQueue; ///< Used to cleanup nodes & resources when no longer in use. + OwnerPointer mShaderFactory; ///< Shader resource factory + OwnerPointer mNotificationManager; ///< Notification manager + OwnerPointer mGestureEventProcessor; ///< The gesture event processor + OwnerPointer mEventProcessor; ///< The event processor + Dali::Vector mProcessors; ///< Registered processors (not owned) + friend class ThreadLocalStorage; };