X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fupdate%2Frender-tasks%2Fscene-graph-render-task.cpp;h=641e4e2238d3698f0f6deded723bcbc46c72d62a;hb=79881246746f65474b24ea4fe14151ccef8df3f4;hp=b175fd5ead184abd4e9888b2281fb3d37d157c3e;hpb=c114bfe4714e8f02c54b25e381a41d80bdcb2d93;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/update/render-tasks/scene-graph-render-task.cpp b/dali/internal/update/render-tasks/scene-graph-render-task.cpp index b175fd5..641e4e2 100644 --- a/dali/internal/update/render-tasks/scene-graph-render-task.cpp +++ b/dali/internal/update/render-tasks/scene-graph-render-task.cpp @@ -1,5 +1,5 @@ /* - * 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. @@ -361,7 +361,7 @@ const Matrix& RenderTask::GetProjectionMatrix( BufferIndex bufferIndex ) const return mCamera->GetProjectionMatrix( bufferIndex ); } -void RenderTask::PrepareRenderInstruction( RenderInstruction& instruction, BufferIndex updateBufferIndex ) +RenderInstruction& RenderTask::PrepareRenderInstruction( BufferIndex updateBufferIndex ) { DALI_ASSERT_DEBUG( nullptr != mCamera ); @@ -370,10 +370,10 @@ void RenderTask::PrepareRenderInstruction( RenderInstruction& instruction, Buffe Viewport viewport; bool viewportSet = QueryViewport( updateBufferIndex, viewport ); - instruction.Reset( mCamera, - GetFrameBuffer(), - viewportSet ? &viewport : nullptr, - mClearEnabled ? &GetClearColor( updateBufferIndex ) : nullptr ); + mRenderInstruction[updateBufferIndex].Reset( mCamera, + GetFrameBuffer(), + viewportSet ? &viewport : nullptr, + mClearEnabled ? &GetClearColor( updateBufferIndex ) : nullptr ); if( mRequiresSync && mRefreshRate == Dali::RenderTask::REFRESH_ONCE ) @@ -384,13 +384,15 @@ void RenderTask::PrepareRenderInstruction( RenderInstruction& instruction, Buffe mRenderSyncTracker = new Render::RenderTracker(); mRenderMessageDispatcher->AddRenderTracker( *mRenderSyncTracker ); } - instruction.mRenderTracker = mRenderSyncTracker; + mRenderInstruction[updateBufferIndex].mRenderTracker = mRenderSyncTracker; } else { // no sync needed, texture FBOs are "ready" the same frame they are rendered to - instruction.mRenderTracker = nullptr; + mRenderInstruction[updateBufferIndex].mRenderTracker = nullptr; } + + return mRenderInstruction[updateBufferIndex]; } bool RenderTask::ViewMatrixUpdated()