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

Unified Diff: src/gpu/GrAAHairLinePathRenderer.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
Index: src/gpu/GrAAHairLinePathRenderer.cpp
diff --git a/src/gpu/GrAAHairLinePathRenderer.cpp b/src/gpu/GrAAHairLinePathRenderer.cpp
index da54ed643c1d99a990791cd19848a78e45a82747..e78b56339b1318a5b19119f6618a763bf08e6a6f 100644
--- a/src/gpu/GrAAHairLinePathRenderer.cpp
+++ b/src/gpu/GrAAHairLinePathRenderer.cpp
@@ -816,6 +816,9 @@ bool GrAAHairLinePathRenderer::onDrawPath(const SkPath& path,
GrEffectRef* hairLineEffect = HairLineEdgeEffect::Create();
GrEffectRef* hairQuadEffect = HairQuadEdgeEffect::Create();
+ SkRect devBounds;
+ GetPathDevBounds(path, drawState->getRenderTarget(), adcd.getOriginalMatrix(), &devBounds);
+
target->setIndexSourceToBuffer(fLinesIndexBuffer);
int lines = 0;
int nBufLines = fLinesIndexBuffer->maxQuads();
@@ -826,7 +829,8 @@ bool GrAAHairLinePathRenderer::onDrawPath(const SkPath& path,
kVertsPerLineSeg*lines, // startV
0, // startI
kVertsPerLineSeg*n, // vCount
- kIdxsPerLineSeg*n); // iCount
+ kIdxsPerLineSeg*n,
+ &devBounds); // iCount
lines += n;
}
@@ -839,7 +843,8 @@ bool GrAAHairLinePathRenderer::onDrawPath(const SkPath& path,
4 * lineCnt + kVertsPerQuad*quads, // startV
0, // startI
kVertsPerQuad*n, // vCount
- kIdxsPerQuad*n); // iCount
+ kIdxsPerQuad*n, // iCount
+ &devBounds);
quads += n;
}
target->resetIndexSource();

Powered by Google App Engine
This is Rietveld 408576698