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

Unified Diff: src/gpu/batches/GrAAHairLinePathRenderer.cpp

Issue 1327943003: Clean up some lint complaints and fix center_of_mass() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 3 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/batches/GrAAConvexTessellator.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrAAHairLinePathRenderer.cpp
diff --git a/src/gpu/batches/GrAAHairLinePathRenderer.cpp b/src/gpu/batches/GrAAHairLinePathRenderer.cpp
index e102db27a09c22e3a4cb7b3ef90d8cff6150d170..c6bdd055bb9eccb8bbdbc8cb98416745984e7fe1 100644
--- a/src/gpu/batches/GrAAHairLinePathRenderer.cpp
+++ b/src/gpu/batches/GrAAHairLinePathRenderer.cpp
@@ -908,28 +908,28 @@ void AAHairlineBatch::onPrepareDraws(Target* target) {
}
// Setup vertices
- BezierVertex* verts = reinterpret_cast<BezierVertex*>(vertices);
+ BezierVertex* bezVerts = reinterpret_cast<BezierVertex*>(vertices);
int unsubdivQuadCnt = quads.count() / 3;
for (int i = 0; i < unsubdivQuadCnt; ++i) {
SkASSERT(qSubdivs[i] >= 0);
- add_quads(&quads[3*i], qSubdivs[i], toDevice, toSrc, &verts);
+ add_quads(&quads[3*i], qSubdivs[i], toDevice, toSrc, &bezVerts);
}
// Start Conics
for (int i = 0; i < conicCount; ++i) {
- add_conics(&conics[3*i], cWeights[i], toDevice, toSrc, &verts);
+ add_conics(&conics[3*i], cWeights[i], toDevice, toSrc, &bezVerts);
}
if (quadCount > 0) {
target->initDraw(quadGP, this->pipeline());
{
- GrVertices verts;
- verts.initInstanced(kTriangles_GrPrimitiveType, vertexBuffer, quadsIndexBuffer,
- firstVertex, kQuadNumVertices, kIdxsPerQuad, quadCount,
- kQuadsNumInIdxBuffer);
- target->draw(verts);
+ GrVertices tempVerts;
+ tempVerts.initInstanced(kTriangles_GrPrimitiveType, vertexBuffer, quadsIndexBuffer,
+ firstVertex, kQuadNumVertices, kIdxsPerQuad, quadCount,
+ kQuadsNumInIdxBuffer);
+ target->draw(tempVerts);
firstVertex += quadCount * kQuadNumVertices;
}
}
@@ -938,11 +938,11 @@ void AAHairlineBatch::onPrepareDraws(Target* target) {
target->initDraw(conicGP, this->pipeline());
{
- GrVertices verts;
- verts.initInstanced(kTriangles_GrPrimitiveType, vertexBuffer, quadsIndexBuffer,
- firstVertex, kQuadNumVertices, kIdxsPerQuad, conicCount,
- kQuadsNumInIdxBuffer);
- target->draw(verts);
+ GrVertices tempVerts;
+ tempVerts.initInstanced(kTriangles_GrPrimitiveType, vertexBuffer, quadsIndexBuffer,
+ firstVertex, kQuadNumVertices, kIdxsPerQuad, conicCount,
+ kQuadsNumInIdxBuffer);
+ target->draw(tempVerts);
}
}
}
« no previous file with comments | « src/gpu/batches/GrAAConvexTessellator.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698