X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fcommon%2Fcore-impl.cpp;h=f1c6cd4081ed4c6f524c26a8678a1ec24d43f967;hb=79881246746f65474b24ea4fe14151ccef8df3f4;hp=8841da45ae4e0a407a0ff1a16db0ab7df6cc8fae;hpb=24fcf9819928219dc76bf9c015f8a3c7e248568c;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/common/core-impl.cpp b/dali/internal/common/core-impl.cpp index 8841da4..f1c6cd4 100644 --- a/dali/internal/common/core-impl.cpp +++ b/dali/internal/common/core-impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 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. @@ -23,10 +23,10 @@ #include #include #include +#include #include #include #include -#include #include #include @@ -75,6 +75,7 @@ using Integration::RenderController; using Integration::PlatformAbstraction; using Integration::GlSyncAbstraction; using Integration::GlAbstraction; +using Integration::GlContextHelperAbstraction; using Integration::Event; using Integration::UpdateStatus; using Integration::RenderStatus; @@ -83,7 +84,7 @@ Core::Core( RenderController& renderController, PlatformAbstraction& platform, GlAbstraction& glAbstraction, GlSyncAbstraction& glSyncAbstraction, - ResourcePolicy::DataRetention dataRetentionPolicy, + GlContextHelperAbstraction& glContextHelperAbstraction, Integration::RenderToFrameBuffer renderToFboEnabled, Integration::DepthBufferAvailable depthBufferAvailable, Integration::StencilBufferAvailable stencilBufferAvailable ) @@ -106,7 +107,7 @@ Core::Core( RenderController& renderController, mRenderTaskProcessor = new SceneGraph::RenderTaskProcessor(); - mRenderManager = RenderManager::New( glAbstraction, glSyncAbstraction, depthBufferAvailable, stencilBufferAvailable ); + mRenderManager = RenderManager::New( glAbstraction, glSyncAbstraction, glContextHelperAbstraction, depthBufferAvailable, stencilBufferAvailable ); RenderQueue& renderQueue = mRenderManager->GetRenderQueue(); @@ -151,7 +152,7 @@ Core::~Core() if( tls ) { tls->Remove(); - delete tls; + tls->Unreference(); } mObjectRegistry.Reset(); @@ -191,17 +192,6 @@ void Core::ContextDestroyed() mRenderManager->ContextDestroyed(); } -void Core::SurfaceResized( Integration::RenderSurface* surface ) -{ - for( auto iter = mScenes.begin(); iter != mScenes.end(); ++iter ) - { - if( (*iter)->GetSurface() == surface ) - { - (*iter)->SurfaceResized(); - } - } -} - void Core::Update( float elapsedSeconds, uint32_t lastVSyncTimeMilliseconds, uint32_t nextVSyncTimeMilliseconds, Integration::UpdateStatus& status, bool renderToFboEnabled, bool isRenderingToFbo ) { // set the time delta so adaptor can easily print FPS with a release build with 0 as @@ -226,9 +216,19 @@ void Core::Update( float elapsedSeconds, uint32_t lastVSyncTimeMilliseconds, uin // Any message to update will wake it up anyways } -void Core::Render( RenderStatus& status, bool forceClear ) +void Core::PreRender( RenderStatus& status, bool forceClear, bool uploadOnly ) +{ + mRenderManager->PreRender( status, forceClear, uploadOnly ); +} + +void Core::RenderScene( Integration::Scene& scene, bool renderToFbo ) +{ + mRenderManager->RenderScene( scene, renderToFbo ); +} + +void Core::PostRender( bool uploadOnly ) { - mRenderManager->Render( status, forceClear ); + mRenderManager->PostRender( uploadOnly ); } void Core::SceneCreated() @@ -429,7 +429,8 @@ void Core::CreateThreadLocalStorage() { // a pointer to the ThreadLocalStorage object will be stored in TLS // The ThreadLocalStorage object should be deleted by the Core destructor - new ThreadLocalStorage(this); + ThreadLocalStorage* tls = new ThreadLocalStorage(this); + tls->Reference(); } void Core::RegisterObject( Dali::BaseObject* object )