aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrSoftwarePathRenderer.cpp
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2014-12-29 07:43:36 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-12-29 07:43:36 -0800
commitd27f73ef27ff65a6a0a5d00aa8e5b784b1a0b47e (patch)
tree59641f01b273776245fb12d98f2f0173591bb578 /src/gpu/GrSoftwarePathRenderer.cpp
parentb0ae649b7ebda86ef53bf913798b809d500973ed (diff)
Remove coordchanges from drawstate
Diffstat (limited to 'src/gpu/GrSoftwarePathRenderer.cpp')
-rw-r--r--src/gpu/GrSoftwarePathRenderer.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/gpu/GrSoftwarePathRenderer.cpp b/src/gpu/GrSoftwarePathRenderer.cpp
index 157e81d108..8eb66d81bf 100644
--- a/src/gpu/GrSoftwarePathRenderer.cpp
+++ b/src/gpu/GrSoftwarePathRenderer.cpp
@@ -81,30 +81,34 @@ void draw_around_inv_path(GrDrawTarget* target,
GrColor color,
const SkIRect& devClipBounds,
const SkIRect& devPathBounds) {
- GrDrawState::AutoViewMatrixRestore avmr;
- if (!avmr.setIdentity(drawState)) {
+ const SkMatrix& matrix = drawState->getViewMatrix();
+ SkMatrix invert;
+ if (!matrix.invert(&invert)) {
return;
}
+
+ GrDrawState::AutoViewMatrixRestore avmr(drawState);
+
SkRect rect;
if (devClipBounds.fTop < devPathBounds.fTop) {
rect.iset(devClipBounds.fLeft, devClipBounds.fTop,
devClipBounds.fRight, devPathBounds.fTop);
- target->drawSimpleRect(drawState, color, rect);
+ target->drawRect(drawState, color, rect, NULL, &invert);
}
if (devClipBounds.fLeft < devPathBounds.fLeft) {
rect.iset(devClipBounds.fLeft, devPathBounds.fTop,
devPathBounds.fLeft, devPathBounds.fBottom);
- target->drawSimpleRect(drawState, color, rect);
+ target->drawRect(drawState, color, rect, NULL, &invert);
}
if (devClipBounds.fRight > devPathBounds.fRight) {
rect.iset(devPathBounds.fRight, devPathBounds.fTop,
devClipBounds.fRight, devPathBounds.fBottom);
- target->drawSimpleRect(drawState, color, rect);
+ target->drawRect(drawState, color, rect, NULL, &invert);
}
if (devClipBounds.fBottom > devPathBounds.fBottom) {
rect.iset(devClipBounds.fLeft, devPathBounds.fBottom,
devClipBounds.fRight, devClipBounds.fBottom);
- target->drawSimpleRect(drawState, color, rect);
+ target->drawRect(drawState, color, rect, NULL, &invert);
}
}