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.cpp;h=d89d4d23f5e86486cbcd005fd095010a08414a5d;hp=5fb6e110700c896c08d953f96fa41e2dc143cf2d;hb=675f5551ef3c7ca20ec45c36b865a5092883af43;hpb=edd951c375ac2a6ec5701aa850637503ba1348c8 diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-application.cpp b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-application.cpp index 5fb6e11..d89d4d2 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-application.cpp +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-application.cpp @@ -154,13 +154,18 @@ void TestApplication::SetSurfaceWidth( unsigned int width, unsigned height ) mCore->SurfaceResized( mSurfaceWidth, mSurfaceHeight ); } -void TestApplication::DoUpdate( unsigned int intervalMilliseconds ) +void TestApplication::SetTopMargin( unsigned int margin ) +{ + mCore->SetTopMargin( margin ); +} + +void TestApplication::DoUpdate( unsigned int intervalMilliseconds, const char* location ) { if( GetUpdateStatus() == 0 && mRenderStatus.NeedsUpdate() == false && ! GetRenderController().WasCalled(TestRenderController::RequestUpdateFunc) ) { - fprintf(stderr, "WARNING - Update not required\n"); + fprintf(stderr, "WARNING - Update not required :%s\n", location==NULL?"NULL":location); } unsigned int nextVSyncTime = mLastVSyncTime + intervalMilliseconds; @@ -173,9 +178,9 @@ void TestApplication::DoUpdate( unsigned int intervalMilliseconds ) mLastVSyncTime = nextVSyncTime; } -bool TestApplication::Render( unsigned int intervalMilliseconds ) +bool TestApplication::Render( unsigned int intervalMilliseconds, const char* location ) { - DoUpdate( intervalMilliseconds ); + DoUpdate( intervalMilliseconds, location ); mCore->Render( mRenderStatus ); mFrame++; @@ -198,10 +203,6 @@ bool TestApplication::GetRenderNeedsUpdate() { return mRenderStatus.NeedsUpdate(); } -bool TestApplication::GetRenderHasRendered() -{ - return mRenderStatus.HasRendered(); -} bool TestApplication::RenderOnly( ) { @@ -216,8 +217,21 @@ bool TestApplication::RenderOnly( ) void TestApplication::ResetContext() { mCore->ContextDestroyed(); + mGlAbstraction.Initialize(); mCore->ContextCreated(); } +unsigned int TestApplication::Wait( unsigned int durationToWait ) +{ + int time = 0; + + for(unsigned int i = 0; i <= ( durationToWait / RENDER_FRAME_INTERVAL); i++) + { + SendNotification(); + Render(RENDER_FRAME_INTERVAL); + time += RENDER_FRAME_INTERVAL; + } + return time; +} } // Namespace dali