aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrInOrderDrawBuffer.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2014-08-04 09:21:30 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-08-04 09:21:30 -0700
commit01c8da1eef36570374f7e8764a38b25bf16ab7a6 (patch)
treee6cd4649959f5e1a57c1dfc59ce6ea651e751fb2 /src/gpu/GrInOrderDrawBuffer.cpp
parent5d8b1b44ea7636fc8e98247cb311568f277ce3a5 (diff)
Remove unused matrix param from GrContext/GrDrawTarget rect drawing functions.
R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/441623005
Diffstat (limited to 'src/gpu/GrInOrderDrawBuffer.cpp')
-rw-r--r--src/gpu/GrInOrderDrawBuffer.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/gpu/GrInOrderDrawBuffer.cpp b/src/gpu/GrInOrderDrawBuffer.cpp
index 26b54522b5..0cab19ff04 100644
--- a/src/gpu/GrInOrderDrawBuffer.cpp
+++ b/src/gpu/GrInOrderDrawBuffer.cpp
@@ -137,7 +137,6 @@ static bool cmd_has_trace_marker(uint8_t cmd) {
}
void GrInOrderDrawBuffer::onDrawRect(const SkRect& rect,
- const SkMatrix* matrix,
const SkRect* localRect,
const SkMatrix* localMatrix) {
GrDrawState::AutoColorRestore acr;
@@ -167,13 +166,8 @@ void GrInOrderDrawBuffer::onDrawRect(const SkRect& rect,
}
// Go to device coords to allow batching across matrix changes
- SkMatrix combinedMatrix;
- if (NULL != matrix) {
- combinedMatrix = *matrix;
- } else {
- combinedMatrix.reset();
- }
- combinedMatrix.postConcat(drawState->getViewMatrix());
+ SkMatrix matrix = drawState->getViewMatrix();
+
// When the caller has provided an explicit source rect for a stage then we don't want to
// modify that stage's matrix. Otherwise if the effect is generating its source rect from
// the vertex positions then we have to account for the view matrix change.
@@ -185,7 +179,7 @@ void GrInOrderDrawBuffer::onDrawRect(const SkRect& rect,
size_t vsize = drawState->getVertexSize();
geo.positions()->setRectFan(rect.fLeft, rect.fTop, rect.fRight, rect.fBottom, vsize);
- combinedMatrix.mapPointsWithStride(geo.positions(), vsize, 4);
+ matrix.mapPointsWithStride(geo.positions(), vsize, 4);
SkRect devBounds;
// since we already computed the dev verts, set the bounds hint. This will help us avoid