aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrDrawOpAtlas.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2018-02-28 16:40:18 +0000
committerGravatar Robert Phillips <robertphillips@google.com>2018-02-28 17:13:26 +0000
commit3bd55bd59a0ef8bce88241a577fe096b6d651f83 (patch)
tree79dda0b96fb103932d57732801f13cdf3d7b81e0 /src/gpu/GrDrawOpAtlas.cpp
parent5c56af1790f58e24d7e9a887c73637fee9b97b38 (diff)
Revert "Clean up GrDrawOpAtlas"
This reverts commit 9d57afd93e70d3bd40ed470b1de28ccc03b98208. Reason for revert: Chrome Original change's description: > 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> TBR=jvanverth@google.com,robertphillips@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: Ibf879c12e5074d8c4a4ec8563cfdd7ed0afb6aec Reviewed-on: https://skia-review.googlesource.com/111041 Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrDrawOpAtlas.cpp')
-rw-r--r--src/gpu/GrDrawOpAtlas.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gpu/GrDrawOpAtlas.cpp b/src/gpu/GrDrawOpAtlas.cpp
index 3fd3110dcc..7539a7a05e 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 r = 0; r < numPlotsY; ++r) {
- for (int c = 0; c < numPlotsX; ++c) {
+ for (int y = numPlotsY - 1, r = 0; y >= 0; --y, ++r) {
+ for (int x = numPlotsX - 1, c = 0; x >= 0; --x, ++c) {
uint32_t plotIndex = r * numPlotsX + c;
Plot* currPlot = fPages[lastPageIndex].fPlotArray[plotIndex].get();