[Tizen] Implement partial update
[platform/core/uifw/dali-adaptor.git] / dali / internal / system / common / environment-options.h
old mode 100644 (file)
new mode 100755 (executable)
index 13ba3ff..3fe351b
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_ADAPTOR_ENVIRONMENT_OPTIONS_H
 
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
  */
 
 // EXTERNAL INCLUDES
+#include <memory>
 #include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
 #include <dali/internal/adaptor/common/threading-mode.h>
+#include <dali/integration-api/log-factory-interface.h>
 
 namespace Dali
 {
@@ -30,13 +32,15 @@ namespace Internal
 {
 namespace Adaptor
 {
+class TraceManager;
+class PerformanceInterface;
 
 /**
  * This class provides the environment options which define settings as well as
  * the ability to install a log function.
  *
  */
-class EnvironmentOptions
+class EnvironmentOptions : public Dali::LogFactoryInterface
 {
 public:
 
@@ -46,9 +50,20 @@ public:
   EnvironmentOptions();
 
   /**
-   * non-virtual destructor, not intended as a base class
+   * Virtual Destructor for interface cleanup
    */
-  ~EnvironmentOptions();
+  virtual ~EnvironmentOptions();
+
+  /**
+   * Create a TraceManager which is used for tracing.
+   * @param PerformanceInterface for using network logging for tracing on Ubuntu
+   */
+  void CreateTraceManager( PerformanceInterface* performanceInterface );
+
+  /**
+   * Initialize TraceManager by installing Trace function.
+   */
+  void InstallTraceFunction() const;
 
   /**
    * @param logFunction logging function
@@ -58,7 +73,7 @@ public:
   /**
    * Install the log function for the current thread.
    */
-  void InstallLogFunction() const;
+  virtual void InstallLogFunction() const;
 
   /**
    * Un-install the log function for the current thread.
@@ -200,6 +215,11 @@ public:
   int GetMinimumPanEvents() const;
 
   /**
+   * @return The minimum pixels before a pinch can be started (-1 means it's not set)
+   */
+  float GetMinimumPinchDistance() const;
+
+  /**
    * @return The width of the window
    */
   unsigned int GetWindowWidth() const;
@@ -255,11 +275,6 @@ public:
   unsigned int GetMaxTextureSize() const;
 
   /**
-   * @return The maximum texture size
-   */
-  int GetIndicatorVisibleMode() const;
-
-  /**
    * @brief Retrieves the interval of frames to be rendered into the Frame Buffer Object and the Frame Buffer.
    *
    * @return The number of frames that are going to be rendered into the Frame Buffer Object but the last one which is going to be rendered into the Frame Buffer.
@@ -276,6 +291,11 @@ public:
    */
   bool StencilBufferRequired() const;
 
+  /**
+   * @return whether the partial update is available.
+   */
+  bool PartialUpdateAvailable() const;
+
   /// Deleted copy constructor.
   EnvironmentOptions( const EnvironmentOptions& ) = delete;
 
@@ -299,7 +319,6 @@ private: // Internal
 private: // Data
 
   Dali::Integration::Log::LogFunction mLogFunction;
-
   std::string mWindowName;                        ///< name of the window
   std::string mWindowClassName;                   ///< name of the class the window belongs to
   unsigned int mNetworkControl;                   ///< whether network control is enabled
@@ -332,13 +351,15 @@ private: // Data
   int mPanGestureMultitapSmoothingRange;          ///< The range in time (ms) of points in the history to smooth the final output against.
   int mPanMinimumDistance;                        ///< minimum distance required before pan starts
   int mPanMinimumEvents;                          ///< minimum events required before pan starts
+  float mPinchMinimumDistance;                    ///< minimum number of pixels moved before a pinch starts
   int mGlesCallTime;                              ///< time in seconds between status updates
   int mMultiSamplingLevel;                        ///< The number of samples required in multisample buffers
-  int mIndicatorVisibleMode;                      ///< Indicator visible mode
   ThreadingMode::Type mThreadingMode;             ///< threading mode
   bool mGlesCallAccumulate;                       ///< Whether or not to accumulate gles call statistics
   bool mDepthBufferRequired;                      ///< Whether the depth buffer is required
   bool mStencilBufferRequired;                    ///< Whether the stencil buffer is required
+  bool mPartialUpdateAvailable;                   ///< whether the partial update is available
+  std::unique_ptr<TraceManager> mTraceManager;    ///< TraceManager
 };
 
 } // Adaptor