diff options
author | Robert Phillips <robertphillips@google.com> | 2018-02-26 13:48:26 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-02-26 20:19:58 +0000 |
commit | 9d57afd93e70d3bd40ed470b1de28ccc03b98208 (patch) | |
tree | 3eec728c564f47e8c37b304a8e874c6a1d536637 /src | |
parent | 98c3c6124bee2501df709ec3f91320cc888bedff (diff) |
Clean up GrDrawOpAtlas
Change-Id: I18dea851fa950231c4106e2e049e74a678a03df2
Reviewed-on: https://skia-review.googlesource.com/110380
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/gpu/GrDrawOpAtlas.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gpu/GrDrawOpAtlas.cpp b/src/gpu/GrDrawOpAtlas.cpp index 7539a7a05e..3fd3110dcc 100644 --- a/src/gpu/GrDrawOpAtlas.cpp +++ b/src/gpu/GrDrawOpAtlas.cpp @@ -303,7 +303,7 @@ bool GrDrawOpAtlas::addToAtlas(GrResourceProvider* resourceProvider, // Try to find a plot that we can perform an inline upload to. // We prioritize this upload in reverse order of pages to counterbalance the order above. Plot* plot = nullptr; - for (int pageIdx = (int)(fNumActivePages-1); pageIdx >= 0; --pageIdx) { + for (int pageIdx = ((int)fNumActivePages)-1; pageIdx >= 0; --pageIdx) { Plot* currentPlot = fPages[pageIdx].fPlotList.tail(); if (currentPlot->lastUseToken() != target->tokenTracker()->nextDrawToken()) { plot = currentPlot; @@ -565,8 +565,8 @@ inline void GrDrawOpAtlas::deactivateLastPage() { int numPlotsY = fTextureHeight/fPlotHeight; fPages[lastPageIndex].fPlotList.reset(); - for (int y = numPlotsY - 1, r = 0; y >= 0; --y, ++r) { - for (int x = numPlotsX - 1, c = 0; x >= 0; --x, ++c) { + for (int r = 0; r < numPlotsY; ++r) { + for (int c = 0; c < numPlotsX; ++c) { uint32_t plotIndex = r * numPlotsX + c; Plot* currPlot = fPages[lastPageIndex].fPlotArray[plotIndex].get(); |