X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=adaptors%2Fbase%2Fenvironment-options.h;h=42022fd9dd958c5bd3a49192206a78f9296266c5;hb=1f2153d4febc92138f74ee6b51f2007255fb90b4;hp=61e692bf25664daab223522e7b4c554db2df50a7;hpb=c4dbb2103a3abc50a52a0850371d3fc6e0adc201;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/adaptors/base/environment-options.h b/adaptors/base/environment-options.h index 61e692b..42022fd 100644 --- a/adaptors/base/environment-options.h +++ b/adaptors/base/environment-options.h @@ -2,7 +2,7 @@ #define __DALI_INTERNAL_ADAPTOR_ENVIRONMENT_OPTIONS_H__ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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,9 @@ // EXTERNAL INCLUDES #include +// INTERNAL INCLUDES +#include + namespace Dali { namespace Internal @@ -29,9 +32,9 @@ namespace Adaptor { /** - * Contains environment options which define settings and the ability to install a log function. + * This class provides the environment options which define settings as well as + * the ability to install a log function. * - * TODO: This file and adaptor needs cleaning up. There should not be any environment options in the adaptor class, only here! */ class EnvironmentOptions { @@ -50,23 +53,8 @@ public: /** * @param logFunction logging function - * @param networkControl whether network control is enabled - * @param logFilterOptions bitmask of the logging options defined in intergration/debug.h (e.g. - * @param logFrameRateFrequency frequency of how often FPS is logged out (e.g. 0 = off, 2 = every 2 seconds). - * @param logupdateStatusFrequency frequency of how often the update status is logged in number of frames - * @param logPerformanceStats performance statistics logging, 0 = disabled, 1+ = enabled - * @param logPerformanceStatsFrequency statistics logging frequency in seconds - * @param performanceTimeStampOutput where to output performance related time stamps to - * @param logPanGestureLevel pan-gesture logging, 0 = disabled, 1 = enabled - */ - void SetLogOptions( const Dali::Integration::Log::LogFunction& logFunction, - unsigned int networkControl, - unsigned int logFrameRateFrequency, - unsigned int logupdateStatusFrequency, - unsigned int logPerformanceStats, - unsigned int logPerformanceStatsFrequency, - unsigned int performanceTimeStampOutput, - unsigned int logPanGestureLevel ); + */ + void SetLogFunction( const Dali::Integration::Log::LogFunction& logFunction ); /** * Install the log function for the current thread. @@ -94,6 +82,11 @@ public: unsigned int GetUpdateStatusLoggingFrequency() const; /** + * @return object profiler status interval ( 0 == off ) + */ + unsigned int GetObjectProfilerInterval() const; + + /** * @return performance statistics log level ( 0 == off ) */ unsigned int GetPerformanceStatsLoggingOptions() const; @@ -134,6 +127,13 @@ public: int GetPanGestureMinimumPredictionAmount() const; /** + * @brief Gets the prediction amount to adjust when the pan velocity is changed. + * + * If the pan velocity is accelerating, the prediction amount will be increased + * by the specified amount until it reaches the upper bound. If the pan velocity + * is decelerating, the prediction amount will be decreased by the specified + * amount until it reaches the lower bound. + * * @return pan-gesture prediction amount adjustment */ int GetPanGesturePredictionAmountAdjustment() const; @@ -169,104 +169,71 @@ public: unsigned int GetWindowHeight() const; /** - * @brief Sets the mode used to predict pan gesture movement - * - * @param[in] mode The prediction mode to use - */ - void SetPanGesturePredictionMode( unsigned int mode ); - - /** - * @brief Sets the prediction amount of the pan gesture - * - * @param[in] amount The prediction amount in milliseconds - */ - void SetPanGesturePredictionAmount( unsigned int amount ); - - /** - * @brief Sets the upper bound of the prediction amount for clamping - * - * @param[in] amount The prediction amount in milliseconds + * @brief Get the graphics status time */ - void SetPanGestureMaximumPredictionAmount( unsigned int amount ); + int GetGlesCallTime() const; /** - * @brief Sets the lower bound of the prediction amount for clamping - * - * @param[in] amount The prediction amount in milliseconds + * @brief Get whether or not to accumulate gles call statistics */ - void SetPanGestureMinimumPredictionAmount( unsigned int amount ); + bool GetGlesCallAccumulate() const; /** - * @brief Sets the prediction amount to adjust when the pan velocity is changed. - * If the pan velocity is accelerating, the prediction amount will be increased - * by the specified amount until it reaches the upper bound. If the pan velocity - * is decelerating, the prediction amount will be decreased by the specified - * amount until it reaches the lower bound. - * - * @param[in] amount The prediction amount in milliseconds + * @return true if performance server is required */ - void SetPanGesturePredictionAmountAdjustment( unsigned int amount ); + bool PerformanceServerRequired() const; /** - * @brief Called to set how pan gestures smooth input - * - * @param[in] mode The smoothing mode to use + * @return Gets the window name. */ - void SetPanGestureSmoothingMode( unsigned int mode ); + const std::string& GetWindowName() const; /** - * @brief Sets the mode used to smooth pan gesture movement properties calculated on the Update thread - * - * @param[in] amount The smoothing amount [0.0f,1.0f] - 0.0f would be no smoothing, 1.0f maximum smoothing + * @return Gets the window class. */ - void SetPanGestureSmoothingAmount( float amount ); + const std::string& GetWindowClassName() const; /** - * @brief Sets the minimum distance required before a pan starts - * - * @param[in] distance The minimum distance before a pan starts + * @return The thread mode that DALi should use. */ - void SetMinimumPanDistance( int distance ); + ThreadingMode::Type GetThreadingMode() const; /** - * @brief Sets the minimum number of events required before a pan starts - * - * @param[in] events The minimum events before a pan starts + * @return The render refresh rate. */ - void SetMinimumPanEvents( int events ); + unsigned int GetRenderRefreshRate() const; /** - * @brief Sets how often the gles call logging occurs - * - * @param[in] time the number of seconds between logging output + * @return The number of samples required in multisample buffers */ - void SetGlesCallTime( int time ); + unsigned int GetMultiSamplingLevel() const; /** - * @brief Get the graphics status time + * @return The maximum texture size */ - int GetGlesCallTime() const; + unsigned int GetMaxTextureSize() const; /** - * @brief Sets the width of the window + * @return The maximum texture size */ - void SetWindowWidth( int width ); + int GetIndicatorVisibleMode() const; - /** - * @brief Sets the width of the window - */ - void SetWindowHeight( int height ); +private: // Internal /** - * @return true if performance server is required + * Parses the environment options. + * Called from the constructor */ - bool PerformanceServerRequired() const; + void ParseEnvironmentOptions(); -private: +private: // Data + 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 unsigned int mFpsFrequency; ///< how often fps is logged out in seconds unsigned int mUpdateStatusFrequency; ///< how often update status is logged out in frames + unsigned int mObjectProfilerInterval; ///< how often object counts are logged out in seconds unsigned int mPerformanceStatsLevel; ///< performance statistics logging bitmask unsigned int mPerformanceStatsFrequency; ///< performance statistics logging frequency (seconds) unsigned int mPerformanceTimeStampOutput; ///< performance time stamp output ( bitmask) @@ -283,6 +250,12 @@ private: int mGlesCallTime; ///< time in seconds between status updates unsigned int mWindowWidth; ///< width of the window unsigned int mWindowHeight; ///< height of the window + ThreadingMode::Type mThreadingMode; ///< threading mode + unsigned int mRenderRefreshRate; ///< render refresh rate + bool mGlesCallAccumulate; ///< Whether or not to accumulate gles call statistics + unsigned int mMultiSamplingLevel; ///< The number of samples required in multisample buffers + unsigned int mMaxTextureSize; ///< The maximum texture size that GL can handle + int mIndicatorVisibleMode; ///< Indicator visible mode Dali::Integration::Log::LogFunction mLogFunction;