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

Unified Diff: src/gpu/GrSWMaskHelper.cpp

Issue 815553003: Move ViewMatrix off of drawstate (Closed) Base URL: https://skia.googlesource.com/skia.git@remove-fragment-stage
Patch Set: more cleaning Created 6 years 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/GrSWMaskHelper.h ('k') | src/gpu/GrSoftwarePathRenderer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrSWMaskHelper.cpp
diff --git a/src/gpu/GrSWMaskHelper.cpp b/src/gpu/GrSWMaskHelper.cpp
index b64d37bdb829f3cdfcf538c063ca791d6b420340..21c935236d57ecb8614bf6b08d4c8723c7e5d3b1 100644
--- a/src/gpu/GrSWMaskHelper.cpp
+++ b/src/gpu/GrSWMaskHelper.cpp
@@ -326,7 +326,7 @@ GrTexture* GrSWMaskHelper::DrawPathMaskToTexture(GrContext* context,
const SkStrokeRec& stroke,
const SkIRect& resultBounds,
bool antiAlias,
- SkMatrix* matrix) {
+ const SkMatrix* matrix) {
GrSWMaskHelper helper(context);
if (!helper.init(resultBounds, matrix)) {
@@ -349,12 +349,12 @@ void GrSWMaskHelper::DrawToTargetWithPathMask(GrTexture* texture,
GrDrawTarget* target,
GrDrawState* drawState,
GrColor color,
+ const SkMatrix& viewMatrix,
const SkIRect& rect) {
SkMatrix invert;
- if (!drawState->getViewMatrix().invert(&invert)) {
+ if (!viewMatrix.invert(&invert)) {
return;
}
- GrDrawState::AutoViewMatrixRestore avmr(drawState);
GrDrawState::AutoRestoreEffects are(drawState);
SkRect dstRect = SkRect::MakeLTRB(SK_Scalar1 * rect.fLeft,
@@ -375,5 +375,5 @@ void GrSWMaskHelper::DrawToTargetWithPathMask(GrTexture* texture,
GrTextureParams::kNone_FilterMode,
kDevice_GrCoordSet))->unref();
- target->drawRect(drawState, color, dstRect, NULL, &invert);
+ target->drawRect(drawState, color, SkMatrix::I(), dstRect, NULL, &invert);
}
« no previous file with comments | « src/gpu/GrSWMaskHelper.h ('k') | src/gpu/GrSoftwarePathRenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698