X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Fintegration-api%2Fcore.cpp;h=f3bb7ad6b4d9209a1dc378d911b4629511df4fb6;hb=b43741a90b40ca9dfbd33d6a9d390d3c09230e89;hp=ca761123ac517f1c8f669f218b484ffebcceea16;hpb=891753537c94d3fd31992540f7218e0de694a73c;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/integration-api/core.cpp b/dali/integration-api/core.cpp old mode 100644 new mode 100755 index ca76112..f3bb7ad --- a/dali/integration-api/core.cpp +++ b/dali/integration-api/core.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 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,11 +17,16 @@ // CLASS HEADER #include +#include // INTERNAL INCLUDES #include +#include +#include #include #include +#include +#include #include namespace Dali @@ -30,11 +35,28 @@ namespace Dali namespace Integration { -Core* Core::New(RenderController& renderController, PlatformAbstraction& platformAbstraction, - GlAbstraction& glAbstraction, GlSyncAbstraction& glSyncAbstraction, GestureManager& gestureManager, ResourcePolicy::DataRetention policy ) +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, gestureManager, policy ); + instance->mImpl = new Internal::Core( renderController, + platformAbstraction, + glAbstraction, + glSyncAbstraction, + glContextHelperAbstraction, + policy, + renderToFboEnabled, + depthBufferAvailable, + stencilBufferAvailable, + partialUpdateAvailable ); return instance; } @@ -44,6 +66,11 @@ Core::~Core() delete mImpl; } +void Core::Initialize() +{ + mImpl->Initialize(); +} + ContextNotifierInterface* Core::GetContextNotifier() { return mImpl->GetContextNotifier(); @@ -64,29 +91,9 @@ 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::Suspend() +void Core::SurfaceDeleted( Integration::RenderSurface* surface ) { - mImpl->Suspend(); -} - -void Core::Resume() -{ - mImpl->Resume(); + mImpl->SurfaceDeleted(surface); } void Core::SceneCreated() @@ -104,44 +111,29 @@ 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 ) -{ - mImpl->Update( elapsedSeconds, lastVSyncTimeMilliseconds, nextVSyncTimeMilliseconds, status ); -} - -void Core::Render( RenderStatus& status ) -{ - mImpl->Render( status ); -} - -SystemOverlay& Core::GetSystemOverlay() -{ - return mImpl->GetSystemOverlay(); -} - -void Core::SetViewMode( ViewMode viewMode ) +void Core::Update( float elapsedSeconds, uint32_t lastVSyncTimeMilliseconds, uint32_t nextVSyncTimeMilliseconds, UpdateStatus& status, bool renderToFboEnabled, bool isRenderingToFbo ) { - mImpl->SetViewMode( viewMode ); + mImpl->Update( elapsedSeconds, lastVSyncTimeMilliseconds, nextVSyncTimeMilliseconds, status, renderToFboEnabled, isRenderingToFbo ); } -ViewMode Core::GetViewMode() const +void Core::Render( RenderStatus& status, bool forceClear ) { - return mImpl->GetViewMode(); + mImpl->Render( status, forceClear ); } -void Core::SetStereoBase( float stereoBase ) +void Core::RegisterProcessor( Processor& processor ) { - mImpl->SetStereoBase( stereoBase ); + mImpl->RegisterProcessor( processor ); } -float Core::GetStereoBase() const +void Core::UnregisterProcessor( Processor& processor ) { - return mImpl->GetStereoBase(); + mImpl->UnregisterProcessor( processor ); } Core::Core()