aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/lattice.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gm/lattice.cpp')
-rw-r--r--gm/lattice.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/gm/lattice.cpp b/gm/lattice.cpp
index 63de2a66b4..919fb3588e 100644
--- a/gm/lattice.cpp
+++ b/gm/lattice.cpp
@@ -113,6 +113,7 @@ protected:
lattice.fXDivs = xDivs + 1;
lattice.fYCount = 4;
lattice.fYDivs = yDivs + 1;
+ lattice.fFlags = nullptr;
for (int iy = 0; iy < 2; ++iy) {
for (int ix = 0; ix < 2; ++ix) {
@@ -130,6 +131,15 @@ protected:
lattice.fYCount = 5;
lattice.fYDivs = yDivs;
+ // Let's skip a few rects.
+ SkCanvas::Lattice::Flags flags[36];
+ sk_bzero(flags, 36 * sizeof(SkCanvas::Lattice::Flags));
+ flags[4] = SkCanvas::Lattice::kTransparent_Flags;
+ flags[9] = SkCanvas::Lattice::kTransparent_Flags;
+ flags[12] = SkCanvas::Lattice::kTransparent_Flags;
+ flags[19] = SkCanvas::Lattice::kTransparent_Flags;
+ lattice.fFlags = flags;
+
canvas->translate(400, 0);
for (int iy = 0; iy < 2; ++iy) {
for (int ix = 0; ix < 2; ++ix) {