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

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

Issue 2305433002: Add option to skip rects to drawImageLattice() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Better detection for zero divs Created 4 years, 3 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
« no previous file with comments | « include/private/SkRecords.h ('k') | src/core/SkLatticeIter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef SkLatticeIter_DEFINED 8 #ifndef SkLatticeIter_DEFINED
9 #define SkLatticeIter_DEFINED 9 #define SkLatticeIter_DEFINED
10 10
(...skipping 23 matching lines...) Expand all
34 * While it returns true, use src/dst to draw the image/bitmap 34 * While it returns true, use src/dst to draw the image/bitmap
35 */ 35 */
36 bool next(SkRect* src, SkRect* dst); 36 bool next(SkRect* src, SkRect* dst);
37 37
38 /** 38 /**
39 * Apply a matrix to the dst points. 39 * Apply a matrix to the dst points.
40 */ 40 */
41 void mapDstScaleTranslate(const SkMatrix& matrix); 41 void mapDstScaleTranslate(const SkMatrix& matrix);
42 42
43 /** 43 /**
44 * Returns the total number of rects that will be drawn. 44 * Returns the number of rects that will actually be drawn.
45 */ 45 */
46 int numRects() const { 46 int numRectsToDraw() const {
47 return fNumRects; 47 return fNumRectsToDraw;
48 } 48 }
49 49
50 private: 50 private:
51 SkTArray<SkScalar> fSrcX; 51 SkTArray<SkScalar> fSrcX;
52 SkTArray<SkScalar> fSrcY; 52 SkTArray<SkScalar> fSrcY;
53 SkTArray<SkScalar> fDstX; 53 SkTArray<SkScalar> fDstX;
54 SkTArray<SkScalar> fDstY; 54 SkTArray<SkScalar> fDstY;
55 SkTArray<SkCanvas::Lattice::Flags> fFlags;
55 56
56 int fCurrX; 57 int fCurrX;
57 int fCurrY; 58 int fCurrY;
58 bool fDone; 59 int fNumRectsInLattice;
59 int fNumRects; 60 int fNumRectsToDraw;
60 }; 61 };
61 62
62 #endif 63 #endif
OLDNEW
« no previous file with comments | « include/private/SkRecords.h ('k') | src/core/SkLatticeIter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698