X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Fintegration-api%2Fcore.cpp;h=36b6319c17bb629ea3f025cc6940cbffc71d7864;hb=872c598cecbe0c7922dfdbca0d2f8009eeaff5cd;hp=f3bb7ad6b4d9209a1dc378d911b4629511df4fb6;hpb=40d561a78364178c7f5b5e95b0c01083f301acd6;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/integration-api/core.cpp b/dali/integration-api/core.cpp old mode 100755 new mode 100644 index f3bb7ad..36b6319 --- 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,46 +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, - PartialUpdateAvailable partialUpdateAvailable ) -{ - Core* instance = new Core; - instance->mImpl = new Internal::Core( renderController, - platformAbstraction, - glAbstraction, - glSyncAbstraction, - glContextHelperAbstraction, - policy, - 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; } @@ -91,11 +80,6 @@ void Core::RecoverFromContextLoss() mImpl->RecoverFromContextLoss(); } -void Core::SurfaceDeleted( Integration::RenderSurface* surface ) -{ - mImpl->SurfaceDeleted(surface); -} - void Core::SceneCreated() { mImpl->SceneCreated(); @@ -116,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 ) +void Core::RegisterProcessor(Processor& processor, bool postProcessor) { - mImpl->Render( status, forceClear ); + 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) { }