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

Unified Diff: src/gpu/GrAAHairLinePathRenderer.cpp

Issue 930123002: fix for ASAN heap overflow (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: cleanup Created 5 years, 10 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 | « 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 9a374279c7bf491b153356e33a8f89e2ae9b62dc..fe89b887bd66761a48f2deef7af3cd8fb33f82e3 100644
--- a/src/gpu/GrAAHairLinePathRenderer.cpp
+++ b/src/gpu/GrAAHairLinePathRenderer.cpp
@@ -869,15 +869,15 @@ void AAHairlineBatch::generateGeometry(GrBatchTarget* batchTarget, const GrPipel
PREALLOC_PTARRAY(128) conics;
IntArray qSubdivs;
FloatArray cWeights;
+ int quadCount = 0;
int instanceCount = fGeoData.count();
for (int i = 0; i < instanceCount; i++) {
const Geometry& args = fGeoData[i];
- gather_lines_and_quads(args.fPath, args.fViewMatrix, args.fDevClipBounds,
- &lines, &quads, &conics, &qSubdivs, &cWeights);
+ quadCount += gather_lines_and_quads(args.fPath, args.fViewMatrix, args.fDevClipBounds,
+ &lines, &quads, &conics, &qSubdivs, &cWeights);
}
- int quadCount = quads.count() / 3;
int lineCount = lines.count() / 2;
int conicCount = conics.count() / 3;
@@ -945,7 +945,6 @@ void AAHairlineBatch::generateGeometry(GrBatchTarget* batchTarget, const GrPipel
// Setup vertices
BezierVertex* verts = reinterpret_cast<BezierVertex*>(vertices);
- // is this the same as quadcount? TODO
int unsubdivQuadCnt = quads.count() / 3;
for (int i = 0; i < unsubdivQuadCnt; ++i) {
SkASSERT(qSubdivs[i] >= 0);
« 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