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

Unified Diff: src/gpu/GrSWMaskHelper.cpp

Issue 818233002: Remove coordchanges from drawstate (Closed) Base URL: https://skia.googlesource.com/skia.git@coord-change-off-paint
Patch Set: adding test to ignore 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/GrOvalRenderer.cpp ('k') | src/gpu/GrSoftwarePathRenderer.cpp » ('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 61e7f1f960ecceb901b75099141ec7f3bcae64f2..b64d37bdb829f3cdfcf538c063ca791d6b420340 100644
--- a/src/gpu/GrSWMaskHelper.cpp
+++ b/src/gpu/GrSWMaskHelper.cpp
@@ -350,10 +350,11 @@ void GrSWMaskHelper::DrawToTargetWithPathMask(GrTexture* texture,
GrDrawState* drawState,
GrColor color,
const SkIRect& rect) {
- GrDrawState::AutoViewMatrixRestore avmr;
- if (!avmr.setIdentity(drawState)) {
+ SkMatrix invert;
+ if (!drawState->getViewMatrix().invert(&invert)) {
return;
}
+ GrDrawState::AutoViewMatrixRestore avmr(drawState);
GrDrawState::AutoRestoreEffects are(drawState);
SkRect dstRect = SkRect::MakeLTRB(SK_Scalar1 * rect.fLeft,
@@ -374,5 +375,5 @@ void GrSWMaskHelper::DrawToTargetWithPathMask(GrTexture* texture,
GrTextureParams::kNone_FilterMode,
kDevice_GrCoordSet))->unref();
- target->drawSimpleRect(drawState, color, dstRect);
+ target->drawRect(drawState, color, dstRect, NULL, &invert);
}
« no previous file with comments | « src/gpu/GrOvalRenderer.cpp ('k') | src/gpu/GrSoftwarePathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698