X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Frender%2Fcommon%2Frender-instruction-container.cpp;h=da899a94d985d482de5c9965a60d405970944a65;hb=b7e444023df2cb8163e6def28e88a4fb250dd4c3;hp=3cbff8a047373ff171b4f1db3b51c1f4b6abb76b;hpb=7dcb0a38005dd8c6d71e466c1ea0ec4d7d57239f;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/render/common/render-instruction-container.cpp b/dali/internal/render/common/render-instruction-container.cpp index 3cbff8a..da899a9 100644 --- a/dali/internal/render/common/render-instruction-container.cpp +++ b/dali/internal/render/common/render-instruction-container.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2018 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. @@ -42,10 +42,10 @@ RenderInstructionContainer::~RenderInstructionContainer() // OwnerContainer deletes the instructions } -void RenderInstructionContainer::ResetAndReserve( BufferIndex bufferIndex, size_t capacityRequired ) +void RenderInstructionContainer::ResetAndReserve( BufferIndex bufferIndex, uint32_t capacityRequired ) { mIndex[ bufferIndex ] = 0u; - size_t oldcapacity = mInstructions[ bufferIndex ].Capacity(); + uint32_t oldcapacity = static_cast( mInstructions[ bufferIndex ].Capacity() ); // uint32_t is large enough in practice if( oldcapacity < capacityRequired ) { mInstructions[ bufferIndex ].Reserve( capacityRequired ); @@ -60,7 +60,7 @@ void RenderInstructionContainer::ResetAndReserve( BufferIndex bufferIndex, size_ // RenderInstruction holds a lot of data so we keep them and recycle instead of new & delete } -size_t RenderInstructionContainer::Count( BufferIndex bufferIndex ) +uint32_t RenderInstructionContainer::Count( BufferIndex bufferIndex ) { // mIndex contains the number of instructions that have been really prepared and updated // (from UpdateManager through GetNextInstruction) @@ -73,13 +73,17 @@ RenderInstruction& RenderInstructionContainer::GetNextInstruction( BufferIndex b return At( bufferIndex, mIndex[ bufferIndex ]++ ); } -RenderInstruction& RenderInstructionContainer::At( BufferIndex bufferIndex, size_t index ) +RenderInstruction& RenderInstructionContainer::At( BufferIndex bufferIndex, uint32_t index ) { DALI_ASSERT_DEBUG( index < mInstructions[ bufferIndex ].Count() ); return *mInstructions[ bufferIndex ][ index ]; } +void RenderInstructionContainer::DiscardCurrentInstruction( BufferIndex bufferIndex ) +{ + mIndex[ bufferIndex ]--; +} } // namespace SceneGraph