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

Unified Diff: src/gpu/GrContext.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/GrClipMaskManager.cpp ('k') | src/gpu/GrDefaultPathRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrContext.cpp
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index 2818aa92dd325090b2e97d0da5e0f2ab45174c82..13de4fec26bce2a2bf5f53f62caed71a97feb103 100755
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -743,23 +743,26 @@ void GrContext::drawRect(const GrPaint& paint,
color);
if (doAA) {
- GrDrawState::AutoViewMatrixRestore avmr;
- if (!avmr.setIdentity(&drawState)) {
+ SkMatrix invert;
+ if (!drawState.getViewMatrix().invert(&invert)) {
return;
}
+ GrDrawState::AutoViewMatrixRestore avmr(&drawState);
if (width >= 0) {
const SkStrokeRec& strokeRec = strokeInfo->getStrokeRec();
fAARectRenderer->strokeAARect(target,
&drawState,
color,
+ invert,
rect,
matrix,
devBoundRect,
strokeRec);
} else {
// filled AA rect
- fAARectRenderer->fillAARect(target, &drawState, color, rect, matrix, devBoundRect);
+ fAARectRenderer->fillAARect(target, &drawState, color, invert, rect, matrix,
+ devBoundRect);
}
return;
}
@@ -1088,15 +1091,11 @@ void GrContext::drawPath(const GrPaint& paint,
GrDrawTarget* target = this->prepareToDraw(&drawState, &paint, &viewMatrix, &acf);
if (NULL == target) {
return;
- };
+ }
- SkMatrix origViewMatrix = drawState.getViewMatrix();
- GrDrawState::AutoViewMatrixRestore avmr;
- if (avmr.setIdentity(&drawState)) {
- if (GrDashingEffect::DrawDashLine(fGpu, target, &drawState, color, pts, paint,
- strokeInfo, origViewMatrix)) {
- return;
- }
+ if (GrDashingEffect::DrawDashLine(fGpu, target, &drawState, color, pts, paint,
+ strokeInfo)) {
+ return;
}
}
@@ -1138,12 +1137,15 @@ void GrContext::drawPath(const GrPaint& paint,
if (is_nested_rects(target, &drawState, color, path, strokeRec, rects)) {
SkMatrix origViewMatrix = drawState.getViewMatrix();
- GrDrawState::AutoViewMatrixRestore avmr;
- if (!avmr.setIdentity(&drawState)) {
+
+ SkMatrix invert;
+ if (!drawState.getViewMatrix().invert(&invert)) {
return;
}
+ GrDrawState::AutoViewMatrixRestore avmr(&drawState);
- fAARectRenderer->fillAANestedRects(target, &drawState, color, rects, origViewMatrix);
+ fAARectRenderer->fillAANestedRects(target, &drawState, color, invert, rects,
+ origViewMatrix);
return;
}
}
« no previous file with comments | « src/gpu/GrClipMaskManager.cpp ('k') | src/gpu/GrDefaultPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698