X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali%2Fdali-test-suite-utils%2Ftest-application.cpp;h=e4c6078fe06133a5c1d40ca4564323215bb2731f;hb=fe58df83b2d72c4beceb101eb9cffcc5442f3d6e;hp=440270aec9adb9013716cb23d379b7d1cd0edc80;hpb=01caa840db38833e5e5ecab7f1c18b9fcf069ff2;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/automated-tests/src/dali/dali-test-suite-utils/test-application.cpp b/automated-tests/src/dali/dali-test-suite-utils/test-application.cpp index 440270a..e4c6078 100644 --- a/automated-tests/src/dali/dali-test-suite-utils/test-application.cpp +++ b/automated-tests/src/dali/dali-test-suite-utils/test-application.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 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. @@ -82,8 +82,9 @@ void TestApplication::CreateScene() // Create render target for the scene Graphics::RenderTargetCreateInfo rtInfo{}; rtInfo.SetExtent({mSurfaceWidth, mSurfaceHeight}); - mRenderTarget = mGraphicsController.CreateRenderTarget(rtInfo, nullptr); - mScene.SetSurfaceRenderTarget(mRenderTarget.get()); + rtInfo.SetSurface(&mSurfaceWidth); // Can point to anything, really. + + mScene.SetSurfaceRenderTarget(rtInfo); } void TestApplication::InitializeCore() @@ -116,13 +117,16 @@ void TestApplication::LogMessage(Dali::Integration::Log::DebugPriority level, st { switch(level) { - case Dali::Integration::Log::DebugInfo: + case Dali::Integration::Log::DEBUG: + fprintf(stderr, "DEBUG: %s", message.c_str()); + break; + case Dali::Integration::Log::INFO: fprintf(stderr, "INFO: %s", message.c_str()); break; - case Dali::Integration::Log::DebugWarning: + case Dali::Integration::Log::WARNING: fprintf(stderr, "WARN: %s", message.c_str()); break; - case Dali::Integration::Log::DebugError: + case Dali::Integration::Log::ERROR: fprintf(stderr, "ERROR: %s", message.c_str()); break; default: @@ -178,7 +182,7 @@ void TestApplication::SendNotification() mCore->ProcessEvents(); } -void TestApplication::DoUpdate(uint32_t intervalMilliseconds, const char* location) +void TestApplication::DoUpdate(uint32_t intervalMilliseconds, const char* location, bool uploadOnly) { if(GetUpdateStatus() == 0 && mRenderStatus.NeedsUpdate() == false && @@ -190,25 +194,28 @@ void TestApplication::DoUpdate(uint32_t intervalMilliseconds, const char* locati uint32_t nextVSyncTime = mLastVSyncTime + intervalMilliseconds; float elapsedSeconds = static_cast(intervalMilliseconds) * 0.001f; - mCore->Update(elapsedSeconds, mLastVSyncTime, nextVSyncTime, mStatus, false, false); + mCore->Update(elapsedSeconds, mLastVSyncTime, nextVSyncTime, mStatus, false, false, uploadOnly); GetRenderController().Initialize(); mLastVSyncTime = nextVSyncTime; } -bool TestApplication::Render(uint32_t intervalMilliseconds, const char* location) +bool TestApplication::Render(uint32_t intervalMilliseconds, const char* location, bool uploadOnly) { - DoUpdate(intervalMilliseconds, location); + DoUpdate(intervalMilliseconds, location, uploadOnly); // Reset the status mRenderStatus.SetNeedsUpdate(false); mRenderStatus.SetNeedsPostRender(false); - mCore->PreRender(mRenderStatus, false /*do not force clear*/, false /*do not skip rendering*/); - mCore->RenderScene(mRenderStatus, mScene, true /*render the off-screen buffers*/); - mCore->RenderScene(mRenderStatus, mScene, false /*render the surface*/); - mCore->PostRender(false /*do not skip rendering*/); + mCore->PreRender(mRenderStatus, false /*do not force clear*/); + if(!uploadOnly) + { + mCore->RenderScene(mRenderStatus, mScene, true /*render the off-screen buffers*/); + mCore->RenderScene(mRenderStatus, mScene, false /*render the surface*/); + } + mCore->PostRender(); mFrame++; @@ -219,7 +226,7 @@ bool TestApplication::PreRenderWithPartialUpdate(uint32_t intervalMilliseconds, { DoUpdate(intervalMilliseconds, location); - mCore->PreRender(mRenderStatus, false /*do not force clear*/, false /*do not skip rendering*/); + mCore->PreRender(mRenderStatus, false /*do not force clear*/); mCore->PreRender(mScene, damagedRects); return mStatus.KeepUpdating() || mRenderStatus.NeedsUpdate(); @@ -229,7 +236,7 @@ bool TestApplication::RenderWithPartialUpdate(std::vector>& damagedRec { mCore->RenderScene(mRenderStatus, mScene, true /*render the off-screen buffers*/); mCore->RenderScene(mRenderStatus, mScene, false /*render the surface*/, clippingRect); - mCore->PostRender(false /*do not skip rendering*/); + mCore->PostRender(); mFrame++; @@ -260,10 +267,10 @@ bool TestApplication::GetRenderNeedsPostRender() bool TestApplication::RenderOnly() { // Update Time values - mCore->PreRender(mRenderStatus, false /*do not force clear*/, false /*do not skip rendering*/); + mCore->PreRender(mRenderStatus, false /*do not force clear*/); mCore->RenderScene(mRenderStatus, mScene, true /*render the off-screen buffers*/); mCore->RenderScene(mRenderStatus, mScene, false /*render the surface*/); - mCore->PostRender(false /*do not skip rendering*/); + mCore->PostRender(); mFrame++;