[Tizen] Revert "Remove StereoMode"
[platform/core/uifw/dali-core.git] / dali / internal / common / core-impl.h
index 2a73f5a..49d62ea 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_CORE_H
 
 /*
- * Copyright (c) 2017 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.
  */
 
 // INTERNAL INCLUDES
+#include <dali/public-api/common/dali-vector.h>
 #include <dali/public-api/object/ref-object.h>
 #include <dali/integration-api/context-notifier.h>
+#include <dali/integration-api/core-enumerations.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>
@@ -32,6 +34,7 @@ namespace Dali
 
 namespace Integration
 {
+class Processor;
 class RenderController;
 class PlatformAbstraction;
 class GestureManager;
@@ -80,7 +83,9 @@ public:
         Integration::GlSyncAbstraction& glSyncAbstraction,
         Integration::GestureManager& gestureManager,
         ResourcePolicy::DataRetention dataRetentionPolicy,
-        bool renderToFboEnabled );
+        Integration::RenderToFrameBuffer renderToFboEnabled,
+        Integration::DepthBufferAvailable depthBufferAvailable,
+        Integration::StencilBufferAvailable stencilBufferAvailable );
 
   /**
    * Destructor
@@ -108,34 +113,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, bool renderToFboEnabled, bool isRenderingToFbo );
+  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 );
+  void Render( Integration::RenderStatus& status, bool forceClear );
 
   /**
    * @copydoc Dali::Integration::Core::SceneCreated()
@@ -155,7 +160,7 @@ public:
   /**
    * @copydoc Dali::Integration::Core::GetMaximumUpdateCount()
    */
-  unsigned int GetMaximumUpdateCount() const;
+  uint32_t GetMaximumUpdateCount() const;
 
   /**
    * @copydoc Dali::Integration::Core::GetSystemOverlay()
@@ -184,7 +189,24 @@ public:
    */
   float GetStereoBase() const;
 
-private:  // for use by ThreadLocalStorage
+
+  /**
+   * @copydoc Dali::Integration::Core::RegisterProcessor
+   */
+  void RegisterProcessor( Dali::Integration::Processor& processor );
+
+  /**
+   * @copydoc Dali::Integration::Core::UnregisterProcessor
+   */
+  void UnregisterProcessor( Dali::Integration::Processor& processor );
+
+private:
+  /**
+   * Run each registered processor
+   */
+  void RunProcessors();
+
+  // for use by ThreadLocalStorage
 
   /**
    * Returns the current stage.
@@ -266,6 +288,7 @@ private:
   OwnerPointer<NotificationManager>             mNotificationManager;         ///< Notification manager
   OwnerPointer<GestureEventProcessor>           mGestureEventProcessor;       ///< The gesture event processor
   OwnerPointer<EventProcessor>                  mEventProcessor;              ///< The event processor
+  Dali::Vector<Integration::Processor*>         mProcessors;                  ///< Registered processors (not owned)
 
   friend class ThreadLocalStorage;