diff options
author | joshualitt <joshualitt@chromium.org> | 2015-03-02 12:00:52 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-03-02 12:00:52 -0800 |
commit | d0f5457c5ec974b3a0b080125a5ba07214c6d9d2 (patch) | |
tree | d8095a07602a0b66d4a16744e5f9171d9e8ed9c6 | |
parent | 281bf5249c2930ff4e8a500c8c26deb8e3253b11 (diff) |
valgrind fix
TBR=
BUG=skia:
Review URL: https://codereview.chromium.org/968873006
-rw-r--r-- | src/gpu/effects/GrDashingEffect.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gpu/effects/GrDashingEffect.cpp b/src/gpu/effects/GrDashingEffect.cpp index f9d526f7e7..fc3fc670ff 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 |