X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Fintegration-api%2Fcore.cpp;h=c2c0fcf5f23d9b50a0e323302017f8f38979da49;hb=872c598cecbe0c7922dfdbca0d2f8009eeaff5cd;hp=41dfa0d97d0905f96df1ef582c1d01907e12404a;hpb=534057a9aa6dbf7d1dee1b17127153c3a6840b7f;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/integration-api/core.cpp b/dali/integration-api/core.cpp index 41dfa0d..36b6319 100644 --- a/dali/integration-api/core.cpp +++ b/dali/integration-api/core.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 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,37 +19,33 @@ #include // INTERNAL INCLUDES -#include #include -#include +#include #include +#include +#include +#include namespace Dali { - namespace Integration { - -Core* Core::New( RenderController& renderController, - PlatformAbstraction& platformAbstraction, - GlAbstraction& glAbstraction, - GlSyncAbstraction& glSyncAbstraction, - GestureManager& gestureManager, - ResourcePolicy::DataRetention policy, - RenderToFrameBuffer renderToFboEnabled, - DepthBufferAvailable depthBufferAvailable, - StencilBufferAvailable stencilBufferAvailable ) -{ - Core* instance = new Core; - instance->mImpl = new Internal::Core( renderController, - platformAbstraction, - glAbstraction, - glSyncAbstraction, - gestureManager, - 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; } @@ -59,6 +55,11 @@ Core::~Core() delete mImpl; } +void Core::Initialize() +{ + mImpl->Initialize(); +} + ContextNotifierInterface* Core::GetContextNotifier() { return mImpl->GetContextNotifier(); @@ -79,21 +80,6 @@ void Core::RecoverFromContextLoss() mImpl->RecoverFromContextLoss(); } -void Core::SurfaceResized(unsigned int width, unsigned int height) -{ - mImpl->SurfaceResized(width, height); -} - -void Core::SetTopMargin( unsigned int margin ) -{ - mImpl->SetTopMargin(margin); -} - -void Core::SetDpi(unsigned int dpiHorizontal, unsigned int dpiVertical) -{ - mImpl->SetDpi(dpiHorizontal, dpiVertical); -} - void Core::SceneCreated() { mImpl->SceneCreated(); @@ -109,48 +95,58 @@ void Core::ProcessEvents() mImpl->ProcessEvents(); } -unsigned int Core::GetMaximumUpdateCount() const +uint32_t Core::GetMaximumUpdateCount() const { return mImpl->GetMaximumUpdateCount(); } - void Core::Update( float elapsedSeconds, unsigned int lastVSyncTimeMilliseconds, unsigned int 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->Update( elapsedSeconds, lastVSyncTimeMilliseconds, nextVSyncTimeMilliseconds, status, renderToFboEnabled, isRenderingToFbo ); + mImpl->PreRender(status, scene, damagedRects); } -void Core::Render( RenderStatus& status ) +void Core::RenderScene(RenderStatus& status, Integration::Scene& scene, bool renderToFbo) { - mImpl->Render( status ); + mImpl->RenderScene(status, scene, renderToFbo); } -SystemOverlay& Core::GetSystemOverlay() +void Core::RenderScene(RenderStatus& status, Integration::Scene& scene, bool renderToFbo, Rect& clippingRect) { - return mImpl->GetSystemOverlay(); + mImpl->RenderScene(status, scene, renderToFbo, clippingRect); } -void Core::SetViewMode( ViewMode viewMode ) +void Core::PostRender(bool uploadOnly) { - mImpl->SetViewMode( viewMode ); + mImpl->PostRender(uploadOnly); } -ViewMode Core::GetViewMode() const +void Core::RegisterProcessor(Processor& processor, bool postProcessor) { - return mImpl->GetViewMode(); + mImpl->RegisterProcessor(processor, postProcessor); } -void Core::SetStereoBase( float stereoBase ) +void Core::UnregisterProcessor(Processor& processor, bool postProcessor) { - mImpl->SetStereoBase( stereoBase ); + mImpl->UnregisterProcessor(processor, postProcessor); } -float Core::GetStereoBase() const +ObjectRegistry Core::GetObjectRegistry() const { - return mImpl->GetStereoBase(); + return ObjectRegistry(&mImpl->GetObjectRegistry()); } Core::Core() -: mImpl( NULL ) +: mImpl(nullptr) { }