X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-core.git;a=blobdiff_plain;f=dali%2Finternal%2Fupdate%2Frender-tasks%2Fscene-graph-render-task.h;h=15c0e4f91ae280ce5181ab49817ad10cb122701c;hp=724681bdc753ed3ff930b70e4fa1acdfa5b3e10a;hb=79881246746f65474b24ea4fe14151ccef8df3f4;hpb=2fa249687dba04074502ee8b22fb738da437f5cd diff --git a/dali/internal/update/render-tasks/scene-graph-render-task.h b/dali/internal/update/render-tasks/scene-graph-render-task.h index 724681b..15c0e4f 100644 --- a/dali/internal/update/render-tasks/scene-graph-render-task.h +++ b/dali/internal/update/render-tasks/scene-graph-render-task.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_SCENE_GRAPH_RENDER_TASK_H /* - * Copyright (c) 2018 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. @@ -27,6 +27,7 @@ #include #include #include +#include namespace Dali { @@ -310,10 +311,10 @@ public: * then this method will ensure that a GL sync object is created to track * when the rendering has finished. * - * @param[out] instruction to prepare * @param[in] updateBufferIndex The current update buffer index. + * @return instruction to prepare */ - void PrepareRenderInstruction( RenderInstruction& instruction, BufferIndex updateBufferIndex ); + RenderInstruction& PrepareRenderInstruction( BufferIndex updateBufferIndex ); /** * @return true if the view matrix has been updated during this or last frame @@ -326,6 +327,16 @@ public: */ void SetSyncRequired( bool requiresSync ); + /** + * Retrieve the render instruction. + * @param[in] updateBufferIndex The current update buffer index. + * @return The render instruction + */ + RenderInstruction& GetRenderInstruction( BufferIndex updateBufferIndex ) + { + return mRenderInstruction[updateBufferIndex]; + } + private: // from PropertyOwner::Observer /** @@ -369,6 +380,8 @@ private: SceneGraph::Camera* mCamera; Render::FrameBuffer* mFrameBuffer; + RenderInstruction mRenderInstruction[2]; ///< Owned double buffered render instruction. (Double buffered because this owns render commands for the currently drawn frame) + uint32_t mRefreshRate; ///< REFRESH_ONCE, REFRESH_ALWAYS or render every N frames uint32_t mFrameCounter; ///< counter for rendering every N frames uint32_t mRenderedOnceCounter;///< Incremented whenever state changes to RENDERED_ONCE_AND_NOTIFIED