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

Unified Diff: src/gpu/effects/GrDashingEffect.cpp

Issue 968873006: valgrind fix (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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/effects/GrDashingEffect.cpp
diff --git a/src/gpu/effects/GrDashingEffect.cpp b/src/gpu/effects/GrDashingEffect.cpp
index f9d526f7e7b34438a85c0896d7bc97b18dd8f768..fc3fc670ff018ae42fa41ceb4ef026ad3241bf15 100644
--- a/src/gpu/effects/GrDashingEffect.cpp
+++ b/src/gpu/effects/GrDashingEffect.cpp
@@ -340,6 +340,7 @@ public:
SkSTArray<128, DashDraw, true> draws;
int totalRectCount = 0;
+ int rectOffset = 0;
for (int i = 0; i < instanceCount; i++) {
Geometry& args = fGeoData[i];
@@ -366,9 +367,12 @@ public:
// Too simplify the algorithm, we always push back rects for start and end rect.
// Otherwise we'd have to track start / end rects for each individual geometry
- SkRect& bounds = rects.push_back();
- SkRect& startRect = rects.push_back();
- SkRect& endRect = rects.push_back();
+ rects.push_back();
+ rects.push_back();
+ rects.push_back();
+ SkRect& bounds = rects[rectOffset++];
+ SkRect& startRect = rects[rectOffset++];
+ SkRect& endRect = rects[rectOffset++];
bool hasStartRect = false;
// If we are using AA, check to see if we are drawing a partial dash at the start. If so
« 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