/*
- * 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.
*/
void TestGraphicsController::PresentRenderTarget(Graphics::RenderTarget* renderTarget)
{
+ auto* rt = static_cast<const TestGraphicsRenderTarget*>(renderTarget);
TraceCallStack::NamedParams namedParams;
namedParams["renderTarget"] << std::hex << renderTarget;
- mCallStack.PushCall("PresentRenderTarget", "", namedParams);
+ namedParams["surface"] << std::hex << rt->mCreateInfo.surface;
+ mCallStack.PushCall("PresentRenderTarget", namedParams.str(), namedParams);
}
/**
Graphics::UniquePtr<Graphics::RenderTarget> TestGraphicsController::CreateRenderTarget(const Graphics::RenderTargetCreateInfo& renderTargetCreateInfo, Graphics::UniquePtr<Graphics::RenderTarget>&& oldRenderTarget)
{
- mCallStack.PushCall("CreateRenderTarget", "");
+ TraceCallStack::NamedParams namedParams;
+ namedParams["surface"] << std::hex << renderTargetCreateInfo.surface;
+ mCallStack.PushCall("CreateRenderTarget", namedParams.str(), namedParams);
+
return Graphics::MakeUnique<TestGraphicsRenderTarget>(mGl, renderTargetCreateInfo);
}
/*
- * Copyright (c) 2020 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.
// INTERNAL INCLUDES
#include <dali-test-suite-utils.h>
-#include <dali/devel-api/text-abstraction/font-client.h>
#include <dali/devel-api/adaptor-framework/accessibility-bridge.h>
#include <dali/devel-api/atspi-interfaces/accessible.h>
+#include <dali/devel-api/text-abstraction/font-client.h>
#include <dali/integration-api/adaptor-framework/adaptor.h>
#include <toolkit-adaptor-impl.h>
#include <toolkit-lifecycle-controller.h>
namespace Dali
{
-
using AdaptorImpl = Dali::Internal::Adaptor::Adaptor;
-ToolkitTestApplication::ToolkitTestApplication( size_t surfaceWidth, size_t surfaceHeight, float horizontalDpi, float verticalDpi )
-: TestApplication( surfaceWidth, surfaceHeight, horizontalDpi, verticalDpi, false /* Do not Initialize Core */ ),
- mMainWindow( new Dali::Window ),
- mAdaptor( &AdaptorImpl::New() ) // Need to create Adaptor first as many singletons in dali-adaptor need it
+ToolkitTestApplication::ToolkitTestApplication(size_t surfaceWidth, size_t surfaceHeight, float horizontalDpi, float verticalDpi)
+: TestApplication(surfaceWidth, surfaceHeight, horizontalDpi, verticalDpi, false /* Do not Initialize Core */),
+ mMainWindow(new Dali::Window),
+ mAdaptor(&AdaptorImpl::New()) // Need to create Adaptor first as many singletons in dali-adaptor need it
{
// Create Core next
CreateCore();
// Override Scene creation in TestApplication by creating a window.
// The window will create a Scene & surface and set up the scene's surface appropriately.
- *mMainWindow = Window::New( PositionSize( 0, 0, surfaceWidth, surfaceHeight ), "" );
- mScene = AdaptorImpl::GetScene( *mMainWindow );
- mScene.SetDpi( Vector2( horizontalDpi, verticalDpi ) );
+ *mMainWindow = Window::New(PositionSize(0, 0, surfaceWidth, surfaceHeight), "");
+ mScene = AdaptorImpl::GetScene(*mMainWindow);
+ mScene.SetDpi(Vector2(horizontalDpi, verticalDpi));
// Create render target for the scene
Graphics::RenderTargetCreateInfo rtInfo{};
- rtInfo.SetExtent( {mSurfaceWidth, mSurfaceHeight });
- mRenderTarget = mGraphicsController.CreateRenderTarget( rtInfo, nullptr );
- mScene.SetSurfaceRenderTarget( mRenderTarget.get() );
+ rtInfo.SetExtent({mSurfaceWidth, mSurfaceHeight});
+ mScene.SetSurfaceRenderTarget(rtInfo);
// Core needs to be initialized next before we start the adaptor
InitializeCore();
Accessibility::Accessible::SetObjectRegistry(mCore->GetObjectRegistry());
// This will also emit the window created signals
- AdaptorImpl::GetImpl( *mAdaptor ).Start( *mMainWindow );
- AdaptorImpl::GetImpl( *mAdaptor ).SetApplication( *this );
+ AdaptorImpl::GetImpl(*mAdaptor).Start(*mMainWindow);
+ AdaptorImpl::GetImpl(*mAdaptor).SetApplication(*this);
Dali::LifecycleController lifecycleController = Dali::LifecycleController::Get();
lifecycleController.InitSignal().Emit();
// set the DPI value for font rendering
TextAbstraction::FontClient fontClient = Dali::TextAbstraction::FontClient::Get();
- if( fontClient )
+ if(fontClient)
{
- fontClient.SetDpi( mDpi.x, mDpi.y );
+ fontClient.SetDpi(mDpi.x, mDpi.y);
}
}
void ToolkitTestApplication::RunIdles()
{
- AdaptorImpl::GetImpl( *mAdaptor.get() ).RunIdles();
+ AdaptorImpl::GetImpl(*mAdaptor.get()).RunIdles();
}
} // namespace Dali