X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Fintegration-api%2Fcore.cpp;h=05f6d52b086d0a6ebdc48c48846287f37537e67f;hb=ae5d63b3fed3b074c2031ec52e49334bd2ff7284;hp=47eb71380b86e206a594b7863c951d8a931e7771;hpb=287725b70acc8ef86fc59515dc4a13dde8eb5b2d;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/integration-api/core.cpp b/dali/integration-api/core.cpp index 47eb713..05f6d52 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,39 +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 ) -{ - Core* instance = new Core; - instance->mImpl = new Internal::Core( renderController, - platformAbstraction, - glAbstraction, - glSyncAbstraction, - glContextHelperAbstraction, - renderToFboEnabled, - depthBufferAvailable, - stencilBufferAvailable ); +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; } @@ -106,38 +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, bool uploadOnly) +{ + mImpl->Update(elapsedSeconds, lastVSyncTimeMilliseconds, nextVSyncTimeMilliseconds, status, renderToFboEnabled, isRenderingToFbo, uploadOnly); +} + +void Core::PreRender(RenderStatus& status, bool forceClear) +{ + mImpl->PreRender(status, forceClear); +} + +void Core::PreRender(Integration::Scene& scene, std::vector>& damagedRects) +{ + mImpl->PreRender(scene, damagedRects); +} + +void Core::RenderScene(RenderStatus& status, Integration::Scene& scene, bool renderToFbo) { - mImpl->Update( elapsedSeconds, lastVSyncTimeMilliseconds, nextVSyncTimeMilliseconds, status, renderToFboEnabled, isRenderingToFbo ); + mImpl->RenderScene(status, scene, renderToFbo); } -void Core::PreRender( RenderStatus& status, bool forceClear, bool uploadOnly ) +void Core::RenderScene(RenderStatus& status, Integration::Scene& scene, bool renderToFbo, Rect& clippingRect) { - mImpl->PreRender( status, forceClear, uploadOnly ); + mImpl->RenderScene(status, scene, renderToFbo, clippingRect); } -void Core::RenderScene( RenderStatus& status, Integration::Scene& scene, bool renderToFbo ) +void Core::PostRender() { - mImpl->RenderScene( status, scene, renderToFbo ); + mImpl->PostRender(); } -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) { }