X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Fdali-toolkit-test-utils%2Ftest-application.h;h=5c942524cff94429208e7f148f65124770924802;hp=bcc2dd8dd85b5df48ae750326ec2b004ceb679b4;hb=d07dc4c4a6067ba3080184d862bca40a90d1789c;hpb=d160a0e0ef708245ecbf94e6e34d7bd9f0cad0c7 diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-application.h b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-application.h index bcc2dd8..5c94252 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-application.h +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-application.h @@ -2,7 +2,7 @@ #define __DALI_TEST_APPLICATION_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. @@ -25,6 +25,7 @@ #include "test-gl-abstraction.h" #include "test-render-controller.h" #include +#include namespace Dali { @@ -47,20 +48,24 @@ public: static const unsigned int DEFAULT_RENDER_INTERVAL = 1; + static const unsigned int RENDER_FRAME_INTERVAL = 16; + TestApplication( size_t surfaceWidth = DEFAULT_SURFACE_WIDTH, size_t surfaceHeight = DEFAULT_SURFACE_HEIGHT, float horizontalDpi = DEFAULT_HORIZONTAL_DPI, - float verticalDpi = DEFAULT_VERTICAL_DPI ); + float verticalDpi = DEFAULT_VERTICAL_DPI, + ResourcePolicy::DataRetention policy = ResourcePolicy::DALI_DISCARDS_ALL_DATA); TestApplication( bool initialize, size_t surfaceWidth = DEFAULT_SURFACE_WIDTH, size_t surfaceHeight = DEFAULT_SURFACE_HEIGHT, float horizontalDpi = DEFAULT_HORIZONTAL_DPI, - float verticalDpi = DEFAULT_VERTICAL_DPI ); + float verticalDpi = DEFAULT_VERTICAL_DPI, + ResourcePolicy::DataRetention policy = ResourcePolicy::DALI_DISCARDS_ALL_DATA); void Initialize(); virtual ~TestApplication(); - static void LogMessage(Dali::Integration::Log::DebugPriority level, std::string& message); + static void LogMessage( Dali::Integration::Log::DebugPriority level, std::string& message ); Dali::Integration::Core& GetCore(); TestPlatformAbstraction& GetPlatform(); TestRenderController& GetRenderController(); @@ -70,14 +75,17 @@ public: void ProcessEvent(const Integration::Event& event); void SendNotification(); void SetSurfaceWidth( unsigned int width, unsigned height ); - bool Render( unsigned int intervalMilliseconds = DEFAULT_RENDER_INTERVAL ); + void SetTopMargin( unsigned int margin ); + bool Render( unsigned int intervalMilliseconds = DEFAULT_RENDER_INTERVAL, const char* location=NULL ); unsigned int GetUpdateStatus(); bool UpdateOnly( unsigned int intervalMilliseconds = DEFAULT_RENDER_INTERVAL ); bool RenderOnly( ); void ResetContext(); + bool GetRenderNeedsUpdate(); + unsigned int Wait( unsigned int durationToWait ); private: - void DoUpdate( unsigned int intervalMilliseconds ); + void DoUpdate( unsigned int intervalMilliseconds, const char* location=NULL ); protected: TestPlatformAbstraction mPlatformAbstraction; @@ -97,6 +105,7 @@ protected: Vector2 mDpi; unsigned int mLastVSyncTime; + ResourcePolicy::DataRetention mDataRetentionPolicy; }; } // Dali