Update test-application after Core::Render API is changed
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / dali-toolkit-test-utils / test-application.cpp
index d457916..44b4964 100644 (file)
@@ -28,7 +28,8 @@ TestApplication::TestApplication( uint32_t surfaceWidth,
                                   uint32_t  verticalDpi,
                                   ResourcePolicy::DataRetention policy,
                                   bool initialize )
-: mCore( NULL ),
+: mRenderSurface( NULL ),
+  mCore( NULL ),
   mSurfaceWidth( surfaceWidth ),
   mSurfaceHeight( surfaceHeight ),
   mFrame( 0u ),
@@ -58,6 +59,7 @@ void TestApplication::CreateCore()
                                         mPlatformAbstraction,
                                         mGlAbstraction,
                                         mGlSyncAbstraction,
+                                        mGlContextHelperAbstraction,
                                         mDataRetentionPolicy,
                                         Integration::RenderToFrameBuffer::FALSE,
                                         Integration::DepthBufferAvailable::TRUE,
@@ -77,11 +79,8 @@ void TestApplication::CreateCore()
 void TestApplication::CreateScene()
 {
   mRenderSurface = new TestRenderSurface( Dali::PositionSize( 0, 0, mSurfaceWidth, mSurfaceHeight ) );
-  mScene = Dali::Integration::Scene::New( Vector2( static_cast<float>( mSurfaceWidth ), static_cast<float>( mSurfaceHeight ) ) );
-  mScene.SetSurface( *mRenderSurface );
+  mScene = Dali::Integration::Scene::New( *mRenderSurface );
   mScene.SetDpi( Vector2( static_cast<float>( mDpi.x ), static_cast<float>( mDpi.y ) ) );
-
-  mCore->SurfaceResized( mRenderSurface );
 }
 
 void TestApplication::InitializeCore()
@@ -156,6 +155,11 @@ TestGlSyncAbstraction& TestApplication::GetGlSyncAbstraction()
   return mGlSyncAbstraction;
 }
 
+TestGlContextHelperAbstraction& TestApplication::GetGlContextHelperAbstraction()
+{
+  return mGlContextHelperAbstraction;
+}
+
 void TestApplication::ProcessEvent(const Integration::Event& event)
 {
   mCore->QueueEvent(event);
@@ -189,7 +193,7 @@ void TestApplication::DoUpdate( uint32_t intervalMilliseconds, const char* locat
 bool TestApplication::Render( uint32_t intervalMilliseconds, const char* location )
 {
   DoUpdate( intervalMilliseconds, location );
-  mCore->Render( mRenderStatus, false );
+  mCore->Render( mRenderStatus, false /*do not force clear*/, false /*do not skip rendering*/ );
 
   mFrame++;
 
@@ -215,7 +219,7 @@ bool TestApplication::GetRenderNeedsUpdate()
 bool TestApplication::RenderOnly( )
 {
   // Update Time values
-  mCore->Render( mRenderStatus, false );
+  mCore->Render( mRenderStatus, false /*do not force clear*/, false /*do not skip rendering*/ );
 
   mFrame++;