#define DALI_ENV_LOG_PERFORMANCE "DALI_LOG_PERFORMANCE"
+#define DALI_ENV_LOG_PAN_GESTURE "DALI_LOG_PAN_GESTURE"
+
} // namespace Adaptor
} // namespace Internal
namespace Dali
{
+
namespace Internal
{
+
namespace Adaptor
{
: mFpsFrequency(0),
mUpdateStatusFrequency(0),
mPerformanceLoggingLevel(0),
+ mPanGestureLoggingLevel(0),
mLogFunction( NULL )
{
}
LogOptions::~LogOptions()
{
-
}
void LogOptions::SetOptions( const Dali::Integration::Log::LogFunction& logFunction,
unsigned int logFrameRateFrequency,
unsigned int logupdateStatusFrequency,
- unsigned int logPerformanceLevel )
+ unsigned int logPerformanceLevel,
+ unsigned int logPanGestureLevel )
{
mLogFunction = logFunction;
mFpsFrequency = logFrameRateFrequency;
mUpdateStatusFrequency = logupdateStatusFrequency;
mPerformanceLoggingLevel = logPerformanceLevel;
+ mPanGestureLoggingLevel = logPanGestureLevel;
}
void LogOptions::InstallLogFunction() const
return mPerformanceLoggingLevel;
}
+unsigned int LogOptions::GetPanGestureLoggingLevel() const
+{
+ return mPanGestureLoggingLevel;
+}
} // Adaptor
+
} // Internal
+
} // Dali
* @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 logPerformanceLevel performance logging, 0 = disabled, 1+ = enabled
+ * @param logPanGestureLevel pan-gesture logging, 0 = disabled, 1 = enabled
*/
void SetOptions( const Dali::Integration::Log::LogFunction& logFunction,
unsigned int logFrameRateFrequency,
unsigned int logupdateStatusFrequency,
- unsigned int logPerformanceLevel );
+ unsigned int logPerformanceLevel,
+ unsigned int logPanGestureLevel );
/**
* Install the log function for the current thread.
*/
unsigned int GetPerformanceLoggingLevel() const;
+ /**
+ * @return pan-gesture logging level ( 0 == off )
+ */
+ unsigned int GetPanGestureLoggingLevel() const;
+
private:
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 mPerformanceLoggingLevel; ///< performance log level
+ unsigned int mPanGestureLoggingLevel; ///< pan-gesture log level
Dali::Integration::Log::LogFunction mLogFunction;
#include <dali/public-api/common/dali-common.h>
#include <dali/integration-api/debug.h>
#include <dali/integration-api/core.h>
+#include <dali/integration-api/profiling.h>
#include <dali/integration-api/events/touch-event-integ.h>
// INTERNAL INCLUDES
void Adaptor::ParseLogOptions()
{
-
// get logging options
unsigned int logFrameRateFrequency = GetIntegerEnvironmentVariable( DALI_ENV_FPS_TRACKING, 0 );
unsigned int logupdateStatusFrequency = GetIntegerEnvironmentVariable( DALI_ENV_UPDATE_STATUS_INTERVAL, 0 );
unsigned int logPerformanceLevel = GetIntegerEnvironmentVariable( DALI_ENV_LOG_PERFORMANCE, 0 );
+ unsigned int logPanGesture = GetIntegerEnvironmentVariable( DALI_ENV_LOG_PAN_GESTURE, 0 );
Dali::Integration::Log::LogFunction logFunction(Dali::SlpPlatform::LogMessage);
- mLogOptions.SetOptions( logFunction, logFrameRateFrequency, logupdateStatusFrequency, logPerformanceLevel );
+ mLogOptions.SetOptions( logFunction, logFrameRateFrequency, logupdateStatusFrequency, logPerformanceLevel, logPanGesture );
// all threads here (event, update, and render) will send their logs to SLP Platform's LogMessage handler.
// Dali::Integration::Log::LogFunction logFunction(Dali::SlpPlatform::LogMessage);
mLogOptions.InstallLogFunction();
-
-
}
+
void Adaptor::Initialize()
{
ParseLogOptions();
mUpdateRenderController = new UpdateRenderController( *this, mLogOptions );
mDaliFeedbackPlugin = new FeedbackPluginProxy( FeedbackPluginProxy::DEFAULT_OBJECT_NAME );
+
+ // Should be called after Core creation
+ if( mLogOptions.GetPanGestureLoggingLevel() )
+ {
+ Integration::EnableProfiling( Dali::Integration::PROFILING_TYPE_PAN_GESTURE );
+ }
}
Adaptor::~Adaptor()