X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fupdate%2Fmanager%2Frender-instruction-processor.cpp;h=9f9bdd39e62f032a3fbe32d240c266453b34106c;hb=45f1be8a978b237f1f593e4981069faec6a9553b;hp=b43b9986dc42c961877c36c1c1e8047de5c9fc8f;hpb=62f113b9697bad2688e0d848a3e2f2f34a89bc77;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/update/manager/render-instruction-processor.cpp b/dali/internal/update/manager/render-instruction-processor.cpp index b43b998..9f9bdd3 100644 --- a/dali/internal/update/manager/render-instruction-processor.cpp +++ b/dali/internal/update/manager/render-instruction-processor.cpp @@ -242,7 +242,7 @@ inline void AddRendererToRenderList(BufferIndex updateBufferIndex, partialRenderingCacheInfo.color = node->GetColor(updateBufferIndex); partialRenderingCacheInfo.depthIndex = node->GetDepthIndex(); - if(renderable.mRenderer) + if(DALI_LIKELY(renderable.mRenderer)) { partialRenderingCacheInfo.textureSet = renderable.mRenderer->GetTextureSet(); } @@ -369,9 +369,15 @@ inline bool TryReuseCachedRenderers(Layer& layer, size_t checkSumOld = 0; for(uint32_t index = 0; index < renderableCount; ++index) { - const Render::Renderer& renderer = renderables[index].mRenderer->GetRenderer(); - checkSumNew += reinterpret_cast(&renderer); - checkSumOld += reinterpret_cast(&renderList.GetRenderer(index)); + if(DALI_LIKELY(renderables[index].mRenderer)) + { + const Render::Renderer& renderer = renderables[index].mRenderer->GetRenderer(); + checkSumNew += reinterpret_cast(&renderer); + } + if(DALI_LIKELY(renderList.GetItem(index).mRenderer)) + { + checkSumOld += reinterpret_cast(&renderList.GetRenderer(index)); + } } if(checkSumNew == checkSumOld) { @@ -440,7 +446,7 @@ inline void RenderInstructionProcessor::SortRenderItems(BufferIndex bufferIndex, { RenderItem& item = renderList.GetItem(index); - if(item.mRenderer) + if(DALI_LIKELY(item.mRenderer)) { item.mRenderer->SetSortAttributes(mSortingHelper[index]); } @@ -462,7 +468,10 @@ inline void RenderInstructionProcessor::SortRenderItems(BufferIndex bufferIndex, { RenderItem& item = renderList.GetItem(index); - item.mRenderer->SetSortAttributes(mSortingHelper[index]); + if(DALI_LIKELY(item.mRenderer)) + { + item.mRenderer->SetSortAttributes(mSortingHelper[index]); + } // texture set mSortingHelper[index].textureSet = item.mTextureSet;