Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(233)

Unified Diff: src/gpu/GrInOrderDrawBuffer.cpp

Issue 441623005: Remove unused matrix param from GrContext/GrDrawTarget rect drawing functions. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comment Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrInOrderDrawBuffer.h ('k') | src/gpu/GrOvalRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrInOrderDrawBuffer.cpp
diff --git a/src/gpu/GrInOrderDrawBuffer.cpp b/src/gpu/GrInOrderDrawBuffer.cpp
index 26b54522b52abae4fc9142446726d9871ac6431e..0cab19ff04fd82eb61c5971ff1a0cc086c080302 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
« no previous file with comments | « src/gpu/GrInOrderDrawBuffer.h ('k') | src/gpu/GrOvalRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698