Index: include/core/SkCanvas.h |
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h |
index acf0ad2a54febf4cb6bbdd14a9112e81a3c8573f..e1a1026c52ee7bf21863cf968f0f53e63c1f7a59 100644 |
--- a/include/core/SkCanvas.h |
+++ b/include/core/SkCanvas.h |
@@ -934,21 +934,37 @@ public: |
* Specifies coordinates to divide a bitmap into (xCount*yCount) rects. |
*/ |
struct Lattice { |
+ enum Flags : uint8_t { |
+ // If set, indicates that we should not draw corresponding rect. |
+ kSkip_Flags = 1 << 0, |
+ }; |
+ |
// An array of x-coordinates that divide the bitmap vertically. |
// These must be unique, increasing, and in the set [0, width]. |
// Does not have ownership. |
- const int* fXDivs; |
+ const int* fXDivs; |
// The number of fXDivs. |
- int fXCount; |
+ int fXCount; |
// An array of y-coordinates that divide the bitmap horizontally. |
// These must be unique, increasing, and in the set [0, height]. |
// Does not have ownership. |
- const int* fYDivs; |
+ const int* fYDivs; |
// The number of fYDivs. |
- int fYCount; |
+ int fYCount; |
+ |
+ // If non-null, the length of this array must be equal to the total |
+ // number of rects specified in the lattice. The flags correspond |
+ // to the rects in the lattice, first moving left to right and then |
+ // top to bottom. |
+ const Flags* fFlags; |
+ |
+ // The number of fFlags. Must be equal to the total number of rects |
+ // specified in the lattice, or flags will be ignored. If fFlags is |
+ // null, this should be set to zero. |
+ int fFlagCount; |
reed1
2016/09/01 14:15:23
Lets try not having this, and just documenting tha
msarett
2016/09/01 16:27:24
SGTM
|
}; |
/** |