/*
- * 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.
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;
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++;
{
return mRenderStatus.NeedsUpdate();
}
-bool TestApplication::GetRenderHasRendered()
-{
- return mRenderStatus.HasRendered();
-}
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