diff options
author | John Reck <jreck@google.com> | 2015-07-30 17:38:35 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-07-30 17:38:35 +0000 |
commit | cef25e5319e4f76682dd63a3c01bfacb19aeeb51 (patch) | |
tree | 9504d6b0708f8e3c06158ef597efded8dc93bfaf /libs/hwui/DisplayListCanvas.cpp | |
parent | ba36e0c2d1f6377671b493a5ae121140c002ce0f (diff) | |
parent | 272a685f17cc4828257e521a6f62b7b17870f75e (diff) |
Merge "Replace most usages of utils/Vector.h"
Diffstat (limited to 'libs/hwui/DisplayListCanvas.cpp')
-rw-r--r-- | libs/hwui/DisplayListCanvas.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libs/hwui/DisplayListCanvas.cpp b/libs/hwui/DisplayListCanvas.cpp index cc69d55cbfac..c48b070819a4 100644 --- a/libs/hwui/DisplayListCanvas.cpp +++ b/libs/hwui/DisplayListCanvas.cpp @@ -516,11 +516,12 @@ void DisplayListCanvas::flushTranslate() { } size_t DisplayListCanvas::addOpAndUpdateChunk(DisplayListOp* op) { - int insertIndex = mDisplayListData->displayListOps.add(op); + int insertIndex = mDisplayListData->displayListOps.size(); + mDisplayListData->displayListOps.push_back(op); if (mDeferredBarrierType != kBarrier_None) { // op is first in new chunk - mDisplayListData->chunks.push(); - DisplayListData::Chunk& newChunk = mDisplayListData->chunks.editTop(); + mDisplayListData->chunks.emplace_back(); + DisplayListData::Chunk& newChunk = mDisplayListData->chunks.back(); newChunk.beginOpIndex = insertIndex; newChunk.endOpIndex = insertIndex + 1; newChunk.reorderChildren = (mDeferredBarrierType == kBarrier_OutOfOrder); @@ -530,7 +531,7 @@ size_t DisplayListCanvas::addOpAndUpdateChunk(DisplayListOp* op) { mDeferredBarrierType = kBarrier_None; } else { // standard case - append to existing chunk - mDisplayListData->chunks.editTop().endOpIndex = insertIndex + 1; + mDisplayListData->chunks.back().endOpIndex = insertIndex + 1; } return insertIndex; } @@ -562,7 +563,7 @@ size_t DisplayListCanvas::addRenderNodeOp(DrawRenderNodeOp* op) { int childIndex = mDisplayListData->addChild(op); // update the chunk's child indices - DisplayListData::Chunk& chunk = mDisplayListData->chunks.editTop(); + DisplayListData::Chunk& chunk = mDisplayListData->chunks.back(); chunk.endChildIndex = childIndex + 1; if (op->renderNode()->stagingProperties().isProjectionReceiver()) { |