projects
/
platform
/
core
/
uifw
/
dali-adaptor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[Tizen] Implement partial update
[platform/core/uifw/dali-adaptor.git]
/
automated-tests
/
src
/
dali-adaptor
/
dali-test-suite-utils
/
test-application.cpp
diff --git
a/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-application.cpp
b/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-application.cpp
old mode 100644
(file)
new mode 100755
(executable)
index
1562d27
..
14258c9
--- a/
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-application.cpp
+++ b/
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-application.cpp
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (c) 20
19
Samsung Electronics Co., Ltd.
+ * Copyright (c) 20
20
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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-26,20
+26,30
@@
TestApplication::TestApplication( uint32_t surfaceWidth,
uint32_t surfaceHeight,
uint32_t horizontalDpi,
uint32_t verticalDpi,
uint32_t surfaceHeight,
uint32_t horizontalDpi,
uint32_t verticalDpi,
- ResourcePolicy::DataRetention policy)
-: mCore( NULL ),
+ bool initialize )
+: mRenderSurface( NULL ),
+ mCore( NULL ),
mSurfaceWidth( surfaceWidth ),
mSurfaceHeight( surfaceHeight ),
mFrame( 0u ),
mDpi{ horizontalDpi, verticalDpi },
mSurfaceWidth( surfaceWidth ),
mSurfaceHeight( surfaceHeight ),
mFrame( 0u ),
mDpi{ horizontalDpi, verticalDpi },
- mLastVSyncTime(0u),
- mDataRetentionPolicy( policy )
+ mLastVSyncTime(0u)
{
{
- Initialize();
+ if( initialize )
+ {
+ Initialize();
+ }
}
void TestApplication::Initialize()
{
}
void TestApplication::Initialize()
{
+ CreateCore();
+ CreateScene();
+ InitializeCore();
+}
+
+void TestApplication::CreateCore()
+{
// We always need the first update!
mStatus.keepUpdating = Integration::KeepUpdating::STAGE_KEEP_RENDERING;
// We always need the first update!
mStatus.keepUpdating = Integration::KeepUpdating::STAGE_KEEP_RENDERING;
@@
-47,11
+57,11
@@
void TestApplication::Initialize()
mPlatformAbstraction,
mGlAbstraction,
mGlSyncAbstraction,
mPlatformAbstraction,
mGlAbstraction,
mGlSyncAbstraction,
- mGestureManager,
- mDataRetentionPolicy,
+ mGlContextHelperAbstraction,
Integration::RenderToFrameBuffer::FALSE,
Integration::DepthBufferAvailable::TRUE,
Integration::RenderToFrameBuffer::FALSE,
Integration::DepthBufferAvailable::TRUE,
- Integration::StencilBufferAvailable::TRUE );
+ Integration::StencilBufferAvailable::TRUE,
+ Integration::PartialUpdateAvailable::FALSE );
mCore->ContextCreated();
mCore->ContextCreated();
@@
-62,15
+72,17
@@
void TestApplication::Initialize()
Dali::Integration::Trace::InstallLogContextFunction( logContextFunction );
Dali::Integration::Trace::LogContext( true, "Test" );
Dali::Integration::Trace::InstallLogContextFunction( logContextFunction );
Dali::Integration::Trace::LogContext( true, "Test" );
+}
+void TestApplication::CreateScene()
+{
mRenderSurface = new TestRenderSurface( Dali::PositionSize( 0, 0, mSurfaceWidth, mSurfaceHeight ) );
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 ) ) );
mScene.SetDpi( Vector2( static_cast<float>( mDpi.x ), static_cast<float>( mDpi.y ) ) );
+}
- mCore->SurfaceResized( mRenderSurface );
-
+void TestApplication::InitializeCore()
+{
mCore->SceneCreated();
mCore->Initialize();
}
mCore->SceneCreated();
mCore->Initialize();
}
@@
-141,9
+153,9
@@
TestGlSyncAbstraction& TestApplication::GetGlSyncAbstraction()
return mGlSyncAbstraction;
}
return mGlSyncAbstraction;
}
-TestG
estureManager& TestApplication::GetGestureManager
()
+TestG
lContextHelperAbstraction& TestApplication::GetGlContextHelperAbstraction
()
{
{
- return mG
estureManager
;
+ return mG
lContextHelperAbstraction
;
}
void TestApplication::ProcessEvent(const Integration::Event& event)
}
void TestApplication::ProcessEvent(const Integration::Event& event)
@@
-179,7
+191,7
@@
void TestApplication::DoUpdate( uint32_t intervalMilliseconds, const char* locat
bool TestApplication::Render( uint32_t intervalMilliseconds, const char* location )
{
DoUpdate( intervalMilliseconds, location );
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++;
mFrame++;
@@
-205,7
+217,7
@@
bool TestApplication::GetRenderNeedsUpdate()
bool TestApplication::RenderOnly( )
{
// Update Time values
bool TestApplication::RenderOnly( )
{
// Update Time values
- mCore->Render( mRenderStatus, false );
+ mCore->Render( mRenderStatus, false
/*do not force clear*/, false /*do not skip rendering*/
);
mFrame++;
mFrame++;