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=22ff2fb42f83629dd3aab2c99045d560ddd4cb59;hp=062276a0b91bd3cbe0a478a25e3d6e94b06891e0;hb=de872571cf9b167665e003f30115c1c8cc600678;hpb=893ec494389e7fe476a64e220ae97eedb73e74d7 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 062276a..22ff2fb 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 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Samsung Electronics Co., Ltd. + * Copyright (c) 2021 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. @@ -55,9 +55,7 @@ void TestApplication::CreateCore() mCore = Dali::Integration::Core::New(mRenderController, mPlatformAbstraction, - mGlAbstraction, - mGlSyncAbstraction, - mGlContextHelperAbstraction, + mGraphicsController, Integration::RenderToFrameBuffer::FALSE, Integration::DepthBufferAvailable::TRUE, Integration::StencilBufferAvailable::TRUE, @@ -78,6 +76,12 @@ void TestApplication::CreateScene() { mScene = Dali::Integration::Scene::New(Size(static_cast(mSurfaceWidth), static_cast(mSurfaceHeight))); mScene.SetDpi(Vector2(static_cast(mDpi.x), static_cast(mDpi.y))); + + // Create render target for the scene + Graphics::RenderTargetCreateInfo rtInfo{}; + rtInfo.SetExtent( {mSurfaceWidth, mSurfaceHeight }); + mRenderTarget = mGraphicsController.CreateRenderTarget( rtInfo, nullptr ); + mScene.SetSurfaceRenderTarget( mRenderTarget.get() ); } void TestApplication::InitializeCore() @@ -141,19 +145,24 @@ TestRenderController& TestApplication::GetRenderController() return mRenderController; } +TestGraphicsController& TestApplication::GetGraphicsController() +{ + return mGraphicsController; +} + TestGlAbstraction& TestApplication::GetGlAbstraction() { - return mGlAbstraction; + return static_cast(mGraphicsController.GetGlAbstraction()); } TestGlSyncAbstraction& TestApplication::GetGlSyncAbstraction() { - return mGlSyncAbstraction; + return static_cast(mGraphicsController.GetGlSyncAbstraction()); } TestGlContextHelperAbstraction& TestApplication::GetGlContextHelperAbstraction() { - return mGlContextHelperAbstraction; + return static_cast(mGraphicsController.GetGlContextHelperAbstraction()); } void TestApplication::ProcessEvent(const Integration::Event& event) @@ -262,7 +271,7 @@ bool TestApplication::RenderOnly() void TestApplication::ResetContext() { mCore->ContextDestroyed(); - mGlAbstraction.Initialize(); + mGraphicsController.Initialize(); mCore->ContextCreated(); }