Revert "[3.0] Clipping API feature in Actor"
[platform/core/uifw/dali-core.git] / dali / internal / common / core-impl.h
index 81acf89..b9472cd 100644 (file)
@@ -1,29 +1,32 @@
 #ifndef __DALI_INTERNAL_CORE_H__
 #define __DALI_INTERNAL_CORE_H__
 
-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Flora License, Version 1.0 (the License);
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://floralicense.org/license/
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an AS IS BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
+/*
+ * Copyright (c) 2014 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
 
 // INTERNAL INCLUDES
 #include <dali/public-api/object/ref-object.h>
+#include <dali/integration-api/context-notifier.h>
 #include <dali/internal/common/owner-pointer.h>
 #include <dali/internal/event/animation/animation-playlist-declarations.h>
 #include <dali/internal/event/common/stage-def.h>
 #include <dali/internal/update/resources/resource-manager-declarations.h>
 #include <dali/public-api/common/view-mode.h>
+#include <dali/integration-api/resource-policies.h>
 
 namespace Dali
 {
@@ -48,24 +51,21 @@ namespace Internal
 class NotificationManager;
 class AnimationPlaylist;
 class PropertyNotificationManager;
-class Context;
 class EventProcessor;
 class GestureEventProcessor;
 class ResourceClient;
 class ResourceManager;
-class FrameTime;
-class FontFactory;
 class ImageFactory;
-class ModelFactory;
 class ShaderFactory;
 class TouchResampler;
-class EmojiFactory;
+class RelayoutController;
 
 namespace SceneGraph
 {
 class UpdateManager;
 class RenderManager;
 class DiscardQueue;
+class TextureCacheDispatcher;
 }
 
 /**
@@ -82,7 +82,8 @@ public:
         Integration::PlatformAbstraction& platform,
         Integration::GlAbstraction& glAbstraction,
         Integration::GlSyncAbstraction& glSyncAbstraction,
-        Integration::GestureManager& gestureManager );
+        Integration::GestureManager& gestureManager,
+        ResourcePolicy::DataRetention dataRetentionPolicy );
 
   /**
    * Destructor
@@ -90,14 +91,24 @@ public:
   ~Core();
 
   /**
+   * @copydoc Dali::Integration::Core::GetContextNotifier()
+   */
+  Integration::ContextNotifierInterface* GetContextNotifier();
+
+  /**
    * @copydoc Dali::Integration::Core::ContextCreated()
    */
   void ContextCreated();
 
   /**
-   * @copydoc Dali::Integration::Core::ContextToBeDestroyed()
+   * @copydoc Dali::Integration::Core::ContextDestroyed()
+   */
+  void ContextDestroyed();
+
+  /**
+   * @copydoc Dali::Integration::Core::RecoverFromContextLoss()
    */
-  void ContextToBeDestroyed();
+  void RecoverFromContextLoss();
 
   /**
    * @copydoc Dali::Integration::Core::SurfaceResized(unsigned int, unsigned int)
@@ -117,7 +128,7 @@ public:
   /**
    * @copydoc Dali::Integration::Core::Update()
    */
-  void Update( Integration::UpdateStatus& status );
+  void Update( float elapsedSeconds, unsigned int lastVSyncTimeMilliseconds, unsigned int nextVSyncTimeMilliseconds, Integration::UpdateStatus& status );
 
   /**
    * @copydoc Dali::Integration::Core::Render()
@@ -135,6 +146,11 @@ public:
   void Resume();
 
   /**
+   * @copydoc Dali::Integration::Core::SceneCreated()
+   */
+  void SceneCreated();
+
+  /**
    * @copydoc Dali::Integration::Core::QueueEvent(const Integration::Event&)
    */
   void QueueEvent( const Integration::Event& event );
@@ -145,31 +161,11 @@ public:
   void ProcessEvents();
 
   /**
-   * @copydoc Dali::Integration::Core::UpdateTouchData(const Integration::TouchData&)
-   */
-  void UpdateTouchData(const Integration::TouchData& touch);
-
-  /**
    * @copydoc Dali::Integration::Core::GetMaximumUpdateCount()
    */
   unsigned int GetMaximumUpdateCount() const;
 
   /**
-   * @copydoc Dali::Integration::Core::Sleep()
-   */
-  void Sleep();
-
-  /**
-   * @copydoc Dali::Integration::Core::Wake()
-   */
-  void WakeUp();
-
-  /**
-   * @copydoc Dali::Integration::Core::VSync()
-   */
-  void VSync( unsigned int frameNumber, unsigned int seconds, unsigned int microseconds );
-
-  /**
    * @copydoc Dali::Integration::Core::GetSystemOverlay()
    */
   Integration::SystemOverlay& GetSystemOverlay();
@@ -241,24 +237,12 @@ private:  // for use by ThreadLocalStorage
   ResourceClient& GetResourceClient();
 
   /**
-   * Returns the Font factory
-   * @return A reference to the Font factory.
-   */
-  FontFactory& GetFontFactory();
-
-  /**
    * Returns the Image factory
    * @return A reference to the Image factory.
    */
   ImageFactory& GetImageFactory();
 
   /**
-   * Returns the Model factory
-   * @return A reference to the Model factory.
-   */
-  ModelFactory& GetModelFactory();
-
-  /**
    * Returns the Shader factory
    * @return A reference to the Shader binary factory.
    */
@@ -271,10 +255,10 @@ private:  // for use by ThreadLocalStorage
   GestureEventProcessor& GetGestureEventProcessor();
 
   /**
-   * Returns the Emoji factory.
-   * @return a reference to the Emoji factory.
+   * Return the relayout controller
+   * @Return Return a reference to the relayout controller
    */
-  EmojiFactory& GetEmojiFactory();
+  RelayoutController& GetRelayoutController();
 
 private:
 
@@ -300,19 +284,16 @@ private:
   SceneGraph::UpdateManager*                mUpdateManager;               ///< Update manager
   SceneGraph::RenderManager*                mRenderManager;               ///< Render manager
   SceneGraph::DiscardQueue*                 mDiscardQueue;                ///< Used to cleanup nodes & resources when no longer in use.
-  ResourcePostProcessList*                  mResourcePostProcessQueue;    ///< Stores resource ids which require post processing after render
+  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<PropertyNotificationManager> mPropertyNotificationManager; ///< For safe signal emmision of property changed notifications
-  FrameTime*                                mFrameTime;                   ///< Time when we render
-  FontFactory*                              mFontFactory;                 ///< font resource factory
   ImageFactory*                             mImageFactory;                ///< Image resource factory
-  ModelFactory*                             mModelFactory;                ///< Model resource factory
   ShaderFactory*                            mShaderFactory;               ///< Shader resource factory
   ResourceClient*                           mResourceClient;              ///< Asynchronous Resource Loading
   ResourceManager*                          mResourceManager;             ///< Asynchronous Resource Loading
-  TouchResampler*                           mTouchResampler;              ///< Resamples touches to correct frame rate.
-  EmojiFactory*                             mEmojiFactory;                ///< Emoji resource factory.
+  IntrusivePtr< RelayoutController >        mRelayoutController;          ///< Size negotiation relayout controller
 
   bool                                      mIsActive         : 1;        ///< Whether Core is active or suspended
   bool                                      mProcessingEvent  : 1;        ///< True during ProcessEvents()