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

Side by Side Diff: src/core/SkLatticeIter.cpp

Issue 2255963002: Batched implementation of drawLattice() for GPU (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Improve bench Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkLatticeIter.h" 8 #include "SkLatticeIter.h"
9 #include "SkRect.h" 9 #include "SkRect.h"
10 10
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 dst->set(fDstX[x], fDstY[y], fDstX[x + 1], fDstY[y + 1]); 221 dst->set(fDstX[x], fDstY[y], fDstX[x + 1], fDstY[y + 1]);
222 if (fSrcX.count() - 1 == ++fCurrX) { 222 if (fSrcX.count() - 1 == ++fCurrX) {
223 fCurrX = 0; 223 fCurrX = 0;
224 fCurrY += 1; 224 fCurrY += 1;
225 if (fCurrY >= fSrcY.count() - 1) { 225 if (fCurrY >= fSrcY.count() - 1) {
226 fDone = true; 226 fDone = true;
227 } 227 }
228 } 228 }
229 return true; 229 return true;
230 } 230 }
231
232 int SkLatticeIter::numRects() const {
233 SkASSERT(fSrcX.count() == fDstX.count() && fSrcY.count() == fDstY.count());
234 SkASSERT(fSrcX.count() >= 2 && fDstX.count() >= 2);
235 return (fSrcX.count() - 1) * (fDstX.count() - 1);
236 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698