X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fupdate%2Fcommon%2Fscene-graph-scene.cpp;h=2ca0e6b9b7f8d7bfb6364ddeb00ba1bde3be2d0b;hb=9c10746b2b943035acf1150f59d4cb3146e077f8;hp=7313724aa76b742d5ba2f245aebe6c78ec51e857;hpb=2097fc22810616f365474bff8b52ec4a84445d40;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/update/common/scene-graph-scene.cpp b/dali/internal/update/common/scene-graph-scene.cpp index 7313724..2ca0e6b 100644 --- a/dali/internal/update/common/scene-graph-scene.cpp +++ b/dali/internal/update/common/scene-graph-scene.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Samsung Electronics Co., Ltd. + * Copyright (c) 2023 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. @@ -30,12 +30,13 @@ namespace SceneGraph Scene::Scene() : mFrameRenderedCallbacks(), mFramePresentedCallbacks(), - mSkipRendering(false), mSurfaceRect(), mSurfaceOrientation(0), mScreenOrientation(0), mSurfaceRectChanged(false), - mRotationCompletedAcknowledgement(false) + mRotationCompletedAcknowledgement(false), + mSkipRendering(false), + mNeedFullUpdate(false) { } @@ -232,6 +233,25 @@ void Scene::SetSurfaceRenderTargetCreateInfo(const Graphics::RenderTargetCreateI } } +void Scene::KeepRendering(float durationSeconds) +{ + mKeepRenderingSeconds = std::max(mKeepRenderingSeconds, durationSeconds); +} + +bool Scene::KeepRenderingCheck(float elapsedSeconds) +{ + if(mKeepRenderingSeconds > 0.0f) + { + mNeedFullUpdate = true; // Full update if KeepRendering is required + mKeepRenderingSeconds = std::max(0.0f, mKeepRenderingSeconds - elapsedSeconds); + return true; + } + + mNeedFullUpdate = false; + mKeepRenderingSeconds = 0.0f; + return false; +} + } // namespace SceneGraph } // namespace Internal