diff options
author | 2015-08-19 15:10:24 -0700 | |
---|---|---|
committer | 2015-08-19 15:10:25 -0700 | |
commit | 7c85c54499994c687a833644f7f213e747fadb98 (patch) | |
tree | 42a87d7a8963fd633f988dc7900d69b6e1948ff1 | |
parent | e264f9a51ef2158df345c3c4b19dd6098e959141 (diff) |
Remove Matrix4::load(Matrix4&)
bug:22320446
Change-Id: Id6d1cc9b4aea828b0cdf622ad672064d72671f8d
-rw-r--r-- | libs/hwui/CanvasState.cpp | 2 | ||||
-rw-r--r-- | libs/hwui/GlopBuilder.cpp | 6 | ||||
-rw-r--r-- | libs/hwui/Matrix.cpp | 4 | ||||
-rw-r--r-- | libs/hwui/Matrix.h | 3 | ||||
-rw-r--r-- | libs/hwui/OpenGLRenderer.cpp | 2 | ||||
-rw-r--r-- | libs/hwui/RenderNode.cpp | 2 | ||||
-rw-r--r-- | libs/hwui/Snapshot.cpp | 5 |
7 files changed, 9 insertions, 15 deletions
diff --git a/libs/hwui/CanvasState.cpp b/libs/hwui/CanvasState.cpp index e22b0d3084ab..54fb5f233fce 100644 --- a/libs/hwui/CanvasState.cpp +++ b/libs/hwui/CanvasState.cpp @@ -138,7 +138,7 @@ void CanvasState::setMatrix(const SkMatrix& matrix) { } void CanvasState::setMatrix(const Matrix4& matrix) { - mSnapshot->transform->load(matrix); + *(mSnapshot->transform) = matrix; } void CanvasState::concatMatrix(const SkMatrix& matrix) { diff --git a/libs/hwui/GlopBuilder.cpp b/libs/hwui/GlopBuilder.cpp index 288fed360162..c9e388021558 100644 --- a/libs/hwui/GlopBuilder.cpp +++ b/libs/hwui/GlopBuilder.cpp @@ -467,8 +467,8 @@ void GlopBuilder::setTransform(const Matrix4& ortho, const Matrix4& canvas, const int transformFlags) { TRIGGER_STAGE(kTransformStage); - mOutGlop->transform.ortho.load(ortho); - mOutGlop->transform.canvas.load(canvas); + mOutGlop->transform.ortho = ortho; + mOutGlop->transform.canvas = canvas; mOutGlop->transform.transformFlags = transformFlags; } @@ -615,7 +615,7 @@ void GlopBuilder::build() { shaderMatrix.loadInverse(mOutGlop->transform.canvas); shaderMatrix.multiply(mOutGlop->transform.modelView); } else { - shaderMatrix.load(mOutGlop->transform.modelView); + shaderMatrix = mOutGlop->transform.modelView; } SkiaShader::store(mCaches, *mShader, shaderMatrix, &textureUnit, &mDescription, &(mOutGlop->fill.skiaShaderData)); diff --git a/libs/hwui/Matrix.cpp b/libs/hwui/Matrix.cpp index 115e23c848dc..73ebd1304750 100644 --- a/libs/hwui/Matrix.cpp +++ b/libs/hwui/Matrix.cpp @@ -152,10 +152,6 @@ void Matrix4::load(const float* v) { mType = kTypeUnknown; } -void Matrix4::load(const Matrix4& v) { - *this = v; -} - void Matrix4::load(const SkMatrix& v) { memset(data, 0, sizeof(data)); diff --git a/libs/hwui/Matrix.h b/libs/hwui/Matrix.h index ed54a25f3edf..ed517ac26295 100644 --- a/libs/hwui/Matrix.h +++ b/libs/hwui/Matrix.h @@ -114,7 +114,6 @@ public: void loadIdentity(); void load(const float* v); - void load(const Matrix4& v); void load(const SkMatrix& v); void loadInverse(const Matrix4& v); @@ -139,7 +138,7 @@ public: void multiply(const Matrix4& v) { Matrix4 u; u.loadMultiply(*this, v); - load(u); + *this = u; } void multiply(float v); diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp index 7a56d42b65e2..e63a579fe2b4 100644 --- a/libs/hwui/OpenGLRenderer.cpp +++ b/libs/hwui/OpenGLRenderer.cpp @@ -1141,7 +1141,7 @@ bool OpenGLRenderer::storeDisplayState(DeferredDisplayState& state, int stateDef // Transform and alpha always deferred, since they are used by state operations // (Note: saveLayer/restore use colorFilter and alpha, so we just save restore everything) - state.mMatrix.load(*currentMatrix); + state.mMatrix = *currentMatrix; state.mAlpha = currentSnapshot()->alpha; // always store/restore, since these are just pointers diff --git a/libs/hwui/RenderNode.cpp b/libs/hwui/RenderNode.cpp index 48da3e8b380e..4e159e3bf9ae 100644 --- a/libs/hwui/RenderNode.cpp +++ b/libs/hwui/RenderNode.cpp @@ -532,7 +532,7 @@ void RenderNode::computeOrderingImpl( if (properties().getProjectBackwards()) { // composited projectee, flag for out of order draw, save matrix, and store in proj surface opState->mSkipInOrderDraw = true; - opState->mTransformFromCompositingAncestor.load(localTransformFromProjectionSurface); + opState->mTransformFromCompositingAncestor = localTransformFromProjectionSurface; compositedChildrenOfProjectionSurface->push_back(opState); } else { // standard in order draw diff --git a/libs/hwui/Snapshot.cpp b/libs/hwui/Snapshot.cpp index fd077d9c8388..ca19a423e5c8 100644 --- a/libs/hwui/Snapshot.cpp +++ b/libs/hwui/Snapshot.cpp @@ -58,7 +58,7 @@ Snapshot::Snapshot(const sp<Snapshot>& s, int saveFlags) , mViewportData(s->mViewportData) , mRelativeLightCenter(s->mRelativeLightCenter) { if (saveFlags & SkCanvas::kMatrix_SaveFlag) { - mTransformRoot.load(*s->transform); + mTransformRoot = *s->transform; transform = &mTransformRoot; } else { transform = s->transform; @@ -190,8 +190,7 @@ void Snapshot::setClippingRoundRect(LinearAllocator& allocator, const Rect& boun state->highPriority = highPriority; // store the inverse drawing matrix - Matrix4 roundRectDrawingMatrix; - roundRectDrawingMatrix.load(getOrthoMatrix()); + Matrix4 roundRectDrawingMatrix = getOrthoMatrix(); roundRectDrawingMatrix.multiply(*transform); state->matrix.loadInverse(roundRectDrawingMatrix); |