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

Unified Diff: src/gpu/GrDefaultPathRenderer.cpp

Issue 14882011: Pass bounds into draw calls in path renderers. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 7 months 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/GrAAHairLinePathRenderer.cpp ('k') | src/gpu/GrPathRenderer.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 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;
}
« no previous file with comments | « src/gpu/GrAAHairLinePathRenderer.cpp ('k') | src/gpu/GrPathRenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698