X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Fintegration-api%2Fcore.cpp;h=36b6319c17bb629ea3f025cc6940cbffc71d7864;hb=872c598cecbe0c7922dfdbca0d2f8009eeaff5cd;hp=ee0b6082258655705664f708a1d583dc53525860;hpb=881debaa847c90abd86092c8dad4375c08a8f8c4;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/integration-api/core.cpp b/dali/integration-api/core.cpp index ee0b608..36b6319 100644 --- a/dali/integration-api/core.cpp +++ b/dali/integration-api/core.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. @@ -19,41 +19,33 @@ #include // INTERNAL INCLUDES -#include -#include -#include #include -#include -#include #include #include +#include +#include +#include namespace Dali { - namespace Integration { - -Core* Core::New( RenderController& renderController, - PlatformAbstraction& platformAbstraction, - GlAbstraction& glAbstraction, - GlSyncAbstraction& glSyncAbstraction, - GlContextHelperAbstraction& glContextHelperAbstraction, - RenderToFrameBuffer renderToFboEnabled, - DepthBufferAvailable depthBufferAvailable, - StencilBufferAvailable stencilBufferAvailable, - PartialUpdateAvailable partialUpdateAvailable ) -{ - Core* instance = new Core; - instance->mImpl = new Internal::Core( renderController, - platformAbstraction, - glAbstraction, - glSyncAbstraction, - glContextHelperAbstraction, - renderToFboEnabled, - depthBufferAvailable, - stencilBufferAvailable, - partialUpdateAvailable ); +Core* Core::New(RenderController& renderController, + PlatformAbstraction& platformAbstraction, + Graphics::Controller& graphicsController, + RenderToFrameBuffer renderToFboEnabled, + DepthBufferAvailable depthBufferAvailable, + StencilBufferAvailable stencilBufferAvailable, + PartialUpdateAvailable partialUpdateAvailable) +{ + Core* instance = new Core; + instance->mImpl = new Internal::Core(renderController, + platformAbstraction, + graphicsController, + renderToFboEnabled, + depthBufferAvailable, + stencilBufferAvailable, + partialUpdateAvailable); return instance; } @@ -108,48 +100,53 @@ uint32_t Core::GetMaximumUpdateCount() const return mImpl->GetMaximumUpdateCount(); } -void Core::Update( float elapsedSeconds, uint32_t lastVSyncTimeMilliseconds, uint32_t nextVSyncTimeMilliseconds, UpdateStatus& status, bool renderToFboEnabled, bool isRenderingToFbo ) +void Core::Update(float elapsedSeconds, uint32_t lastVSyncTimeMilliseconds, uint32_t nextVSyncTimeMilliseconds, UpdateStatus& status, bool renderToFboEnabled, bool isRenderingToFbo) +{ + mImpl->Update(elapsedSeconds, lastVSyncTimeMilliseconds, nextVSyncTimeMilliseconds, status, renderToFboEnabled, isRenderingToFbo); +} + +void Core::PreRender(RenderStatus& status, bool forceClear, bool uploadOnly) { - mImpl->Update( elapsedSeconds, lastVSyncTimeMilliseconds, nextVSyncTimeMilliseconds, status, renderToFboEnabled, isRenderingToFbo ); + mImpl->PreRender(status, forceClear, uploadOnly); } -void Core::PreRender( RenderStatus& status, bool forceClear, bool uploadOnly ) +void Core::PreRender(RenderStatus& status, Integration::Scene& scene, std::vector>& damagedRects) { - mImpl->PreRender( status, forceClear, uploadOnly ); + mImpl->PreRender(status, scene, damagedRects); } -void Core::PreRender( Integration::Scene& scene, std::vector>& damagedRects ) +void Core::RenderScene(RenderStatus& status, Integration::Scene& scene, bool renderToFbo) { - mImpl->PreRender( scene, damagedRects ); + mImpl->RenderScene(status, scene, renderToFbo); } -void Core::RenderScene( RenderStatus& status, Integration::Scene& scene, bool renderToFbo ) +void Core::RenderScene(RenderStatus& status, Integration::Scene& scene, bool renderToFbo, Rect& clippingRect) { - mImpl->RenderScene( status, scene, renderToFbo ); + mImpl->RenderScene(status, scene, renderToFbo, clippingRect); } -void Core::RenderScene( RenderStatus& status, Integration::Scene& scene, bool renderToFbo, Rect& clippingRect ) +void Core::PostRender(bool uploadOnly) { - mImpl->RenderScene( status, scene, renderToFbo, clippingRect ); + mImpl->PostRender(uploadOnly); } -void Core::PostRender( bool uploadOnly ) +void Core::RegisterProcessor(Processor& processor, bool postProcessor) { - mImpl->PostRender( uploadOnly ); + mImpl->RegisterProcessor(processor, postProcessor); } -void Core::RegisterProcessor( Processor& processor ) +void Core::UnregisterProcessor(Processor& processor, bool postProcessor) { - mImpl->RegisterProcessor( processor ); + mImpl->UnregisterProcessor(processor, postProcessor); } -void Core::UnregisterProcessor( Processor& processor ) +ObjectRegistry Core::GetObjectRegistry() const { - mImpl->UnregisterProcessor( processor ); + return ObjectRegistry(&mImpl->GetObjectRegistry()); } Core::Core() -: mImpl( NULL ) +: mImpl(nullptr) { }