Revert "Revert "Revert "Pass bounds into draw calls in path renderers."""
git-svn-id: http://skia.googlecode.com/svn/trunk@9181 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrDefaultPathRenderer.cpp b/src/gpu/GrDefaultPathRenderer.cpp
index 87deb9c..43809ed 100644
--- a/src/gpu/GrDefaultPathRenderer.cpp
+++ b/src/gpu/GrDefaultPathRenderer.cpp
@@ -445,9 +445,7 @@
}
}
- SkRect devBounds;
- GetPathDevBounds(path, drawState->getRenderTarget(), viewM, &devBounds);
-
+ {
for (int p = 0; p < passCount; ++p) {
drawState->setDrawFace(drawFace[p]);
if (NULL != passes[p]) {
@@ -462,8 +460,10 @@
GrDrawState::AutoDeviceCoordDraw adcd;
if (reverse) {
GrAssert(NULL != drawState->getRenderTarget());
- // draw over the dev bounds (which will be the whole dst surface for inv fill).
- bounds = devBounds;
+ // draw over the whole world.
+ bounds.setLTRB(0, 0,
+ SkIntToScalar(drawState->getRenderTarget()->width()),
+ SkIntToScalar(drawState->getRenderTarget()->height()));
SkMatrix vmi;
// mapRect through persp matrix may not be correct
if (!drawState->getViewMatrix().hasPerspective() &&
@@ -483,12 +483,13 @@
}
if (indexCnt) {
target->drawIndexed(primType, 0, 0,
- vertexCnt, indexCnt, &devBounds);
+ vertexCnt, indexCnt);
} else {
- target->drawNonIndexed(primType, 0, vertexCnt, &devBounds);
+ target->drawNonIndexed(primType, 0, vertexCnt);
}
}
}
+ }
return true;
}