Index: src/gpu/GrDefaultPathRenderer.cpp |
diff --git a/src/gpu/GrDefaultPathRenderer.cpp b/src/gpu/GrDefaultPathRenderer.cpp |
index 43809ed6a34b25cd586dbd35e62057e3cdeec9d4..664656a80932f6ad65d5d48634231a29f470cba3 100644 |
--- a/src/gpu/GrDefaultPathRenderer.cpp |
+++ b/src/gpu/GrDefaultPathRenderer.cpp |
@@ -445,7 +445,9 @@ bool GrDefaultPathRenderer::internalDrawPath(const SkPath& path, |
} |
} |
- { |
+ SkRect devBounds; |
+ GetPathDevBounds(path, drawState->getRenderTarget(), viewM, &devBounds); |
+ |
for (int p = 0; p < passCount; ++p) { |
drawState->setDrawFace(drawFace[p]); |
if (NULL != passes[p]) { |
@@ -461,9 +463,7 @@ bool GrDefaultPathRenderer::internalDrawPath(const SkPath& path, |
if (reverse) { |
GrAssert(NULL != drawState->getRenderTarget()); |
// draw over the whole world. |
robertphillips
2013/05/16 13:14:45
// GetPathDevBounds sets the bound to the device's
jvanverth1
2013/05/16 13:20:04
Change this comment?
bsalomon
2013/05/16 19:59:07
Done.
bsalomon
2013/05/16 19:59:07
Done.
|
- bounds.setLTRB(0, 0, |
- SkIntToScalar(drawState->getRenderTarget()->width()), |
- SkIntToScalar(drawState->getRenderTarget()->height())); |
+ bounds = devBounds; |
SkMatrix vmi; |
// mapRect through persp matrix may not be correct |
if (!drawState->getViewMatrix().hasPerspective() && |
@@ -483,13 +483,12 @@ bool GrDefaultPathRenderer::internalDrawPath(const SkPath& path, |
} |
if (indexCnt) { |
target->drawIndexed(primType, 0, 0, |
- vertexCnt, indexCnt); |
+ vertexCnt, indexCnt, &devBounds); |
} else { |
- target->drawNonIndexed(primType, 0, vertexCnt); |
+ target->drawNonIndexed(primType, 0, vertexCnt, &devBounds); |
} |
} |
} |
- } |
return true; |
} |