From 272a685f17cc4828257e521a6f62b7b17870f75e Mon Sep 17 00:00:00 2001 From: John Reck Date: Wed, 29 Jul 2015 16:48:58 -0700 Subject: Replace most usages of utils/Vector.h Change-Id: I540d1b3523244d6c71fc52d6fb30555271c25644 --- libs/hwui/RenderNode.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'libs/hwui/RenderNode.cpp') diff --git a/libs/hwui/RenderNode.cpp b/libs/hwui/RenderNode.cpp index 3717aec43cbf..af8aaa20342e 100644 --- a/libs/hwui/RenderNode.cpp +++ b/libs/hwui/RenderNode.cpp @@ -528,7 +528,7 @@ void RenderNode::computeOrdering() { void RenderNode::computeOrderingImpl( DrawRenderNodeOp* opState, const SkPath* outlineOfProjectionSurface, - Vector* compositedChildrenOfProjectionSurface, + std::vector* compositedChildrenOfProjectionSurface, const mat4* transformFromProjectionSurface) { mProjectedNodes.clear(); if (mDisplayListData == nullptr || mDisplayListData->isEmpty()) return; @@ -542,7 +542,7 @@ void RenderNode::computeOrderingImpl( // composited projectee, flag for out of order draw, save matrix, and store in proj surface opState->mSkipInOrderDraw = true; opState->mTransformFromCompositingAncestor.load(localTransformFromProjectionSurface); - compositedChildrenOfProjectionSurface->add(opState); + compositedChildrenOfProjectionSurface->push_back(opState); } else { // standard in order draw opState->mSkipInOrderDraw = false; @@ -556,7 +556,7 @@ void RenderNode::computeOrderingImpl( RenderNode* child = childOp->mRenderNode; const SkPath* projectionOutline = nullptr; - Vector* projectionChildren = nullptr; + std::vector* projectionChildren = nullptr; const mat4* projectionTransform = nullptr; if (isProjectionReceiver && !child->properties().getProjectBackwards()) { // if receiving projections, collect projecting descendant @@ -638,7 +638,7 @@ void RenderNode::replay(ReplayStateStruct& replayStruct, const int level) { } void RenderNode::buildZSortedChildList(const DisplayListData::Chunk& chunk, - Vector& zTranslatedNodes) { + std::vector& zTranslatedNodes) { if (chunk.beginChildIndex == chunk.endChildIndex) return; for (unsigned int i = chunk.beginChildIndex; i < chunk.endChildIndex; i++) { @@ -647,7 +647,7 @@ void RenderNode::buildZSortedChildList(const DisplayListData::Chunk& chunk, float childZ = child->properties().getZ(); if (!MathUtils::isZero(childZ) && chunk.reorderChildren) { - zTranslatedNodes.add(ZDrawRenderNodeOpPair(childZ, childOp)); + zTranslatedNodes.push_back(ZDrawRenderNodeOpPair(childZ, childOp)); childOp->mSkipInOrderDraw = true; } else if (!child->properties().getProjectBackwards()) { // regular, in order drawing DisplayList @@ -719,7 +719,7 @@ void RenderNode::issueDrawShadowOperation(const Matrix4& transformFromParent, T& template void RenderNode::issueOperationsOf3dChildren(ChildrenSelectMode mode, - const Matrix4& initialTransform, const Vector& zTranslatedNodes, + const Matrix4& initialTransform, const std::vector& zTranslatedNodes, OpenGLRenderer& renderer, T& handler) { const int size = zTranslatedNodes.size(); if (size == 0 @@ -896,7 +896,7 @@ void RenderNode::issueOperations(OpenGLRenderer& renderer, T& handler) { for (size_t chunkIndex = 0; chunkIndex < mDisplayListData->getChunks().size(); chunkIndex++) { const DisplayListData::Chunk& chunk = mDisplayListData->getChunks()[chunkIndex]; - Vector zTranslatedNodes; + std::vector zTranslatedNodes; buildZSortedChildList(chunk, zTranslatedNodes); issueOperationsOf3dChildren(kNegativeZChildren, @@ -910,7 +910,7 @@ void RenderNode::issueOperations(OpenGLRenderer& renderer, T& handler) { #endif handler(op, saveCountOffset, properties().getClipToBounds()); - if (CC_UNLIKELY(!mProjectedNodes.isEmpty() && projectionReceiveIndex >= 0 && + if (CC_UNLIKELY(!mProjectedNodes.empty() && projectionReceiveIndex >= 0 && opIndex == static_cast(projectionReceiveIndex))) { issueOperationsOfProjectedChildren(renderer, handler); } -- cgit v1.2.3