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

Unified Diff: src/gpu/GrDefaultPathRenderer.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/GrContext.cpp ('k') | src/gpu/GrDrawState.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDefaultPathRenderer.cpp
diff --git a/src/gpu/GrDefaultPathRenderer.cpp b/src/gpu/GrDefaultPathRenderer.cpp
index 7222e628e8e22bdd58664b77e9299cece06a6a3a..e7c678d164d7fa4f8449cb67f15010c89999d682 100644
--- a/src/gpu/GrDefaultPathRenderer.cpp
+++ b/src/gpu/GrDefaultPathRenderer.cpp
@@ -475,6 +475,8 @@ bool GrDefaultPathRenderer::internalDrawPath(GrDrawTarget* target,
drawState->setXPFactory(backupXPFactory);
SkRect bounds;
GrDrawState::AutoViewMatrixRestore avmr;
+ const SkMatrix& viewMatrix = drawState->getViewMatrix();
+ SkMatrix localMatrix = SkMatrix::I();
if (reverse) {
SkASSERT(drawState->getRenderTarget());
// draw over the dev bounds (which will be the whole dst surface for inv fill).
@@ -485,13 +487,16 @@ bool GrDefaultPathRenderer::internalDrawPath(GrDrawTarget* target,
drawState->getViewInverse(&vmi)) {
vmi.mapRect(&bounds);
} else {
+ if (!viewMatrix.invert(&localMatrix)) {
+ return false;
+ }
avmr.setIdentity(drawState);
}
} else {
bounds = path.getBounds();
}
GrDrawTarget::AutoGeometryPush agp(target);
- target->drawSimpleRect(drawState, color, bounds);
+ target->drawRect(drawState, color, bounds, NULL, &localMatrix);
} else {
if (passCount > 1) {
drawState->setDisableColorXPFactory();
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/GrDrawState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698