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

Unified Diff: src/gpu/GrAAHairLinePathRenderer.cpp

Issue 822733003: Fix conics for gpu GrAAHairLinePathRender (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Comment fix 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAAHairLinePathRenderer.cpp
diff --git a/src/gpu/GrAAHairLinePathRenderer.cpp b/src/gpu/GrAAHairLinePathRenderer.cpp
index b8c44c72d57cd53ff3e6a8c6ab61175cb71dc3c8..98e69657b344b1a543377f65fe1116fca26b12e9 100644
--- a/src/gpu/GrAAHairLinePathRenderer.cpp
+++ b/src/gpu/GrAAHairLinePathRenderer.cpp
@@ -45,7 +45,8 @@
// a0 c0
// a c
// a1 c1
-// Each is drawn as three triangles specified by these 9 indices:
+// Each is drawn as three triangles ((a0,a1,b0), (b0,c1,c0), (a1,c1,b0))
+// specified by these 9 indices:
static const uint16_t kQuadIdxBufPattern[] = {
0, 1, 2,
2, 4, 3,
@@ -943,11 +944,12 @@ bool GrAAHairLinePathRenderer::onDrawPath(GrDrawTarget* target,
}
if (conicCnt > 0) {
- GrDrawState::AutoRestoreEffects are(drawState);
SkAutoTUnref<GrGeometryProcessor> hairConicProcessor(
GrConicEffect::Create(color, kHairlineAA_GrProcessorEdgeType, *target->caps(),
newCoverage));
SkASSERT(hairConicProcessor);
+ GrDrawState::AutoRestoreEffects are(drawState);
+ target->setIndexSourceToBuffer(fQuadsIndexBuffer);
int conics = 0;
while (conics < conicCnt) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698