X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Fintegration-api%2Fcore.cpp;h=36b6319c17bb629ea3f025cc6940cbffc71d7864;hb=872c598cecbe0c7922dfdbca0d2f8009eeaff5cd;hp=d154574bbc8c6214bbce60467c1c3c0a98e0d576;hpb=d782b799bd76959c4b1a5078c7401a2bbe62e2c4;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/integration-api/core.cpp b/dali/integration-api/core.cpp index d154574..36b6319 100644 --- a/dali/integration-api/core.cpp +++ b/dali/integration-api/core.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 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. @@ -17,44 +17,35 @@ // CLASS HEADER #include -#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, - ResourcePolicy::DataRetention policy, - RenderToFrameBuffer renderToFboEnabled, - DepthBufferAvailable depthBufferAvailable, - StencilBufferAvailable stencilBufferAvailable ) -{ - Core* instance = new Core; - instance->mImpl = new Internal::Core( renderController, - platformAbstraction, - glAbstraction, - glSyncAbstraction, - glContextHelperAbstraction, - policy, - 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; } @@ -89,11 +80,6 @@ void Core::RecoverFromContextLoss() mImpl->RecoverFromContextLoss(); } -void Core::SurfaceDeleted( Integration::RenderSurface* surface ) -{ - mImpl->SurfaceDeleted(surface); -} - void Core::SceneCreated() { mImpl->SceneCreated(); @@ -114,28 +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->PreRender(status, forceClear, uploadOnly); +} + +void Core::PreRender(RenderStatus& status, Integration::Scene& scene, std::vector>& damagedRects) +{ + mImpl->PreRender(status, scene, damagedRects); +} + +void Core::RenderScene(RenderStatus& status, Integration::Scene& scene, bool renderToFbo) +{ + mImpl->RenderScene(status, scene, renderToFbo); +} + +void Core::RenderScene(RenderStatus& status, Integration::Scene& scene, bool renderToFbo, Rect& clippingRect) +{ + mImpl->RenderScene(status, scene, renderToFbo, clippingRect); +} + +void Core::PostRender(bool uploadOnly) { - mImpl->Update( elapsedSeconds, lastVSyncTimeMilliseconds, nextVSyncTimeMilliseconds, status, renderToFboEnabled, isRenderingToFbo ); + mImpl->PostRender(uploadOnly); } -void Core::Render( RenderStatus& status, bool forceClear, bool uploadOnly ) +void Core::RegisterProcessor(Processor& processor, bool postProcessor) { - mImpl->Render( status, forceClear, 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) { }