epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2011 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
reed@android.com | 1a2fec5 | 2009-06-22 02:17:34 +0000 | [diff] [blame] | 7 | #include "gm.h" |
| 8 | #include "SkPath.h" |
| 9 | #include "SkRegion.h" |
| 10 | #include "SkShader.h" |
| 11 | #include "SkUtils.h" |
reed@android.com | 1a2fec5 | 2009-06-22 02:17:34 +0000 | [diff] [blame] | 12 | #include "SkColorFilter.h" |
reed@android.com | 1a2fec5 | 2009-06-22 02:17:34 +0000 | [diff] [blame] | 13 | |
| 14 | // effects |
| 15 | #include "SkGradientShader.h" |
reed@android.com | 1a2fec5 | 2009-06-22 02:17:34 +0000 | [diff] [blame] | 16 | #include "SkBlurDrawLooper.h" |
| 17 | |
commit-bot@chromium.org | dac5225 | 2014-02-17 21:21:46 +0000 | [diff] [blame] | 18 | static void makebm(SkBitmap* bm, SkColorType ct, int w, int h) { |
| 19 | bm->allocPixels(SkImageInfo::Make(w, h, ct, kPremul_SkAlphaType)); |
junov@google.com | dbfac8a | 2012-12-06 21:47:40 +0000 | [diff] [blame] | 20 | bm->eraseColor(SK_ColorTRANSPARENT); |
rmistry@google.com | ae933ce | 2012-08-23 18:19:56 +0000 | [diff] [blame] | 21 | |
reed@android.com | 1a2fec5 | 2009-06-22 02:17:34 +0000 | [diff] [blame] | 22 | SkCanvas canvas(*bm); |
| 23 | SkPoint pts[] = { { 0, 0 }, { SkIntToScalar(w), SkIntToScalar(h)} }; |
| 24 | SkColor colors[] = { SK_ColorRED, SK_ColorGREEN, SK_ColorBLUE }; |
| 25 | SkScalar pos[] = { 0, SK_Scalar1/2, SK_Scalar1 }; |
| 26 | SkPaint paint; |
rmistry@google.com | ae933ce | 2012-08-23 18:19:56 +0000 | [diff] [blame] | 27 | |
reed@android.com | 1a2fec5 | 2009-06-22 02:17:34 +0000 | [diff] [blame] | 28 | paint.setDither(true); |
reed | 1a9b964 | 2016-03-13 14:13:58 -0700 | [diff] [blame] | 29 | paint.setShader(SkGradientShader::MakeLinear(pts, colors, pos, SK_ARRAY_COUNT(colors), |
| 30 | SkShader::kClamp_TileMode)); |
reed@android.com | 1a2fec5 | 2009-06-22 02:17:34 +0000 | [diff] [blame] | 31 | canvas.drawPaint(paint); |
| 32 | } |
| 33 | |
| 34 | static void setup(SkPaint* paint, const SkBitmap& bm, bool filter, |
| 35 | SkShader::TileMode tmx, SkShader::TileMode tmy) { |
reed | 1a9b964 | 2016-03-13 14:13:58 -0700 | [diff] [blame] | 36 | paint->setShader(SkShader::MakeBitmapShader(bm, tmx, tmy)); |
reed | 93a1215 | 2015-03-16 10:08:34 -0700 | [diff] [blame] | 37 | paint->setFilterQuality(filter ? kLow_SkFilterQuality : kNone_SkFilterQuality); |
reed@android.com | 1a2fec5 | 2009-06-22 02:17:34 +0000 | [diff] [blame] | 38 | } |
| 39 | |
commit-bot@chromium.org | dac5225 | 2014-02-17 21:21:46 +0000 | [diff] [blame] | 40 | static const SkColorType gColorTypes[] = { |
commit-bot@chromium.org | 28fcae2 | 2014-04-11 17:15:40 +0000 | [diff] [blame] | 41 | kN32_SkColorType, |
commit-bot@chromium.org | dac5225 | 2014-02-17 21:21:46 +0000 | [diff] [blame] | 42 | kRGB_565_SkColorType, |
reed@android.com | 1a2fec5 | 2009-06-22 02:17:34 +0000 | [diff] [blame] | 43 | }; |
reed@android.com | 1a2fec5 | 2009-06-22 02:17:34 +0000 | [diff] [blame] | 44 | |
mike@reedtribe.org | a059169 | 2012-10-18 02:01:59 +0000 | [diff] [blame] | 45 | class TilingGM : public skiagm::GM { |
reed@android.com | 1a2fec5 | 2009-06-22 02:17:34 +0000 | [diff] [blame] | 46 | public: |
commit-bot@chromium.org | 37799e1 | 2013-07-25 17:52:32 +0000 | [diff] [blame] | 47 | TilingGM(bool powerOfTwoSize) |
robertphillips@google.com | 6db2ae2 | 2013-08-30 12:41:42 +0000 | [diff] [blame] | 48 | : fPowerOfTwoSize(powerOfTwoSize) { |
reed@android.com | 1a2fec5 | 2009-06-22 02:17:34 +0000 | [diff] [blame] | 49 | } |
| 50 | |
commit-bot@chromium.org | dac5225 | 2014-02-17 21:21:46 +0000 | [diff] [blame] | 51 | SkBitmap fTexture[SK_ARRAY_COUNT(gColorTypes)]; |
rmistry@google.com | ae933ce | 2012-08-23 18:19:56 +0000 | [diff] [blame] | 52 | |
reed@android.com | 1a2fec5 | 2009-06-22 02:17:34 +0000 | [diff] [blame] | 53 | protected: |
commit-bot@chromium.org | 37799e1 | 2013-07-25 17:52:32 +0000 | [diff] [blame] | 54 | |
| 55 | enum { |
| 56 | kPOTSize = 32, |
| 57 | kNPOTSize = 21, |
| 58 | }; |
| 59 | |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 60 | SkString onShortName() override { |
commit-bot@chromium.org | 37799e1 | 2013-07-25 17:52:32 +0000 | [diff] [blame] | 61 | SkString name("tilemodes"); |
| 62 | if (!fPowerOfTwoSize) { |
| 63 | name.append("_npot"); |
| 64 | } |
| 65 | return name; |
reed@android.com | 1a2fec5 | 2009-06-22 02:17:34 +0000 | [diff] [blame] | 66 | } |
rmistry@google.com | ae933ce | 2012-08-23 18:19:56 +0000 | [diff] [blame] | 67 | |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 68 | SkISize onISize() override { return SkISize::Make(880, 560); } |
rmistry@google.com | ae933ce | 2012-08-23 18:19:56 +0000 | [diff] [blame] | 69 | |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 70 | void onOnceBeforeDraw() override { |
commit-bot@chromium.org | 37799e1 | 2013-07-25 17:52:32 +0000 | [diff] [blame] | 71 | int size = fPowerOfTwoSize ? kPOTSize : kNPOTSize; |
commit-bot@chromium.org | dac5225 | 2014-02-17 21:21:46 +0000 | [diff] [blame] | 72 | for (size_t i = 0; i < SK_ARRAY_COUNT(gColorTypes); i++) { |
| 73 | makebm(&fTexture[i], gColorTypes[i], size, size); |
reed@google.com | 7775d66 | 2012-11-27 15:15:58 +0000 | [diff] [blame] | 74 | } |
| 75 | } |
| 76 | |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 77 | void onDraw(SkCanvas* canvas) override { |
rmistry@google.com | ae933ce | 2012-08-23 18:19:56 +0000 | [diff] [blame] | 78 | |
commit-bot@chromium.org | 37799e1 | 2013-07-25 17:52:32 +0000 | [diff] [blame] | 79 | int size = fPowerOfTwoSize ? kPOTSize : kNPOTSize; |
| 80 | |
| 81 | SkRect r = { 0, 0, SkIntToScalar(size*2), SkIntToScalar(size*2) }; |
reed@android.com | 1a2fec5 | 2009-06-22 02:17:34 +0000 | [diff] [blame] | 82 | |
| 83 | static const char* gConfigNames[] = { "8888", "565", "4444" }; |
rmistry@google.com | ae933ce | 2012-08-23 18:19:56 +0000 | [diff] [blame] | 84 | |
reed@android.com | 1a2fec5 | 2009-06-22 02:17:34 +0000 | [diff] [blame] | 85 | static const bool gFilters[] = { false, true }; |
| 86 | static const char* gFilterNames[] = { "point", "bilinear" }; |
rmistry@google.com | ae933ce | 2012-08-23 18:19:56 +0000 | [diff] [blame] | 87 | |
reed@android.com | 1a2fec5 | 2009-06-22 02:17:34 +0000 | [diff] [blame] | 88 | static const SkShader::TileMode gModes[] = { SkShader::kClamp_TileMode, SkShader::kRepeat_TileMode, SkShader::kMirror_TileMode }; |
| 89 | static const char* gModeNames[] = { "C", "R", "M" }; |
| 90 | |
| 91 | SkScalar y = SkIntToScalar(24); |
| 92 | SkScalar x = SkIntToScalar(10); |
| 93 | |
| 94 | for (size_t kx = 0; kx < SK_ARRAY_COUNT(gModes); kx++) { |
| 95 | for (size_t ky = 0; ky < SK_ARRAY_COUNT(gModes); ky++) { |
| 96 | SkPaint p; |
| 97 | SkString str; |
| 98 | p.setAntiAlias(true); |
caryclark | 1818acb | 2015-07-24 12:09:25 -0700 | [diff] [blame] | 99 | sk_tool_utils::set_portable_typeface(&p); |
reed@android.com | 1a2fec5 | 2009-06-22 02:17:34 +0000 | [diff] [blame] | 100 | p.setDither(true); |
reed@android.com | 1a2fec5 | 2009-06-22 02:17:34 +0000 | [diff] [blame] | 101 | str.printf("[%s,%s]", gModeNames[kx], gModeNames[ky]); |
| 102 | |
| 103 | p.setTextAlign(SkPaint::kCenter_Align); |
| 104 | canvas->drawText(str.c_str(), str.size(), x + r.width()/2, y, p); |
rmistry@google.com | ae933ce | 2012-08-23 18:19:56 +0000 | [diff] [blame] | 105 | |
reed@android.com | 1a2fec5 | 2009-06-22 02:17:34 +0000 | [diff] [blame] | 106 | x += r.width() * 4 / 3; |
| 107 | } |
| 108 | } |
rmistry@google.com | ae933ce | 2012-08-23 18:19:56 +0000 | [diff] [blame] | 109 | |
reed@android.com | 1a2fec5 | 2009-06-22 02:17:34 +0000 | [diff] [blame] | 110 | y += SkIntToScalar(16); |
| 111 | |
commit-bot@chromium.org | dac5225 | 2014-02-17 21:21:46 +0000 | [diff] [blame] | 112 | for (size_t i = 0; i < SK_ARRAY_COUNT(gColorTypes); i++) { |
reed@android.com | 1a2fec5 | 2009-06-22 02:17:34 +0000 | [diff] [blame] | 113 | for (size_t j = 0; j < SK_ARRAY_COUNT(gFilters); j++) { |
| 114 | x = SkIntToScalar(10); |
| 115 | for (size_t kx = 0; kx < SK_ARRAY_COUNT(gModes); kx++) { |
| 116 | for (size_t ky = 0; ky < SK_ARRAY_COUNT(gModes); ky++) { |
| 117 | SkPaint paint; |
bsalomon@google.com | ab3c678 | 2013-08-06 20:47:52 +0000 | [diff] [blame] | 118 | #if 1 // Temporary change to regen bitmap before each draw. This may help tracking down an issue |
| 119 | // on SGX where resizing NPOT textures to POT textures exhibits a driver bug. |
| 120 | if (!fPowerOfTwoSize) { |
commit-bot@chromium.org | dac5225 | 2014-02-17 21:21:46 +0000 | [diff] [blame] | 121 | makebm(&fTexture[i], gColorTypes[i], size, size); |
bsalomon@google.com | ab3c678 | 2013-08-06 20:47:52 +0000 | [diff] [blame] | 122 | } |
| 123 | #endif |
reed@android.com | 1a2fec5 | 2009-06-22 02:17:34 +0000 | [diff] [blame] | 124 | setup(&paint, fTexture[i], gFilters[j], gModes[kx], gModes[ky]); |
| 125 | paint.setDither(true); |
rmistry@google.com | ae933ce | 2012-08-23 18:19:56 +0000 | [diff] [blame] | 126 | |
reed@android.com | 1a2fec5 | 2009-06-22 02:17:34 +0000 | [diff] [blame] | 127 | canvas->save(); |
| 128 | canvas->translate(x, y); |
| 129 | canvas->drawRect(r, paint); |
| 130 | canvas->restore(); |
rmistry@google.com | ae933ce | 2012-08-23 18:19:56 +0000 | [diff] [blame] | 131 | |
reed@android.com | 1a2fec5 | 2009-06-22 02:17:34 +0000 | [diff] [blame] | 132 | x += r.width() * 4 / 3; |
| 133 | } |
| 134 | } |
| 135 | { |
| 136 | SkPaint p; |
| 137 | SkString str; |
| 138 | p.setAntiAlias(true); |
caryclark | 1818acb | 2015-07-24 12:09:25 -0700 | [diff] [blame] | 139 | sk_tool_utils::set_portable_typeface(&p); |
reed@android.com | 1a2fec5 | 2009-06-22 02:17:34 +0000 | [diff] [blame] | 140 | str.printf("%s, %s", gConfigNames[i], gFilterNames[j]); |
| 141 | canvas->drawText(str.c_str(), str.size(), x, y + r.height() * 2 / 3, p); |
| 142 | } |
| 143 | |
| 144 | y += r.height() * 4 / 3; |
| 145 | } |
| 146 | } |
| 147 | } |
rmistry@google.com | ae933ce | 2012-08-23 18:19:56 +0000 | [diff] [blame] | 148 | |
reed@android.com | 1a2fec5 | 2009-06-22 02:17:34 +0000 | [diff] [blame] | 149 | private: |
commit-bot@chromium.org | 37799e1 | 2013-07-25 17:52:32 +0000 | [diff] [blame] | 150 | bool fPowerOfTwoSize; |
mike@reedtribe.org | a059169 | 2012-10-18 02:01:59 +0000 | [diff] [blame] | 151 | typedef skiagm::GM INHERITED; |
| 152 | }; |
| 153 | |
commit-bot@chromium.org | 37799e1 | 2013-07-25 17:52:32 +0000 | [diff] [blame] | 154 | static const int gWidth = 32; |
| 155 | static const int gHeight = 32; |
| 156 | |
reed | 1a9b964 | 2016-03-13 14:13:58 -0700 | [diff] [blame] | 157 | static sk_sp<SkShader> make_bm(SkShader::TileMode tx, SkShader::TileMode ty) { |
mike@reedtribe.org | a059169 | 2012-10-18 02:01:59 +0000 | [diff] [blame] | 158 | SkBitmap bm; |
commit-bot@chromium.org | 28fcae2 | 2014-04-11 17:15:40 +0000 | [diff] [blame] | 159 | makebm(&bm, kN32_SkColorType, gWidth, gHeight); |
reed | 1a9b964 | 2016-03-13 14:13:58 -0700 | [diff] [blame] | 160 | return SkShader::MakeBitmapShader(bm, tx, ty); |
mike@reedtribe.org | a059169 | 2012-10-18 02:01:59 +0000 | [diff] [blame] | 161 | } |
| 162 | |
reed | 1a9b964 | 2016-03-13 14:13:58 -0700 | [diff] [blame] | 163 | static sk_sp<SkShader> make_grad(SkShader::TileMode tx, SkShader::TileMode ty) { |
mike@reedtribe.org | a059169 | 2012-10-18 02:01:59 +0000 | [diff] [blame] | 164 | SkPoint pts[] = { { 0, 0 }, { SkIntToScalar(gWidth), SkIntToScalar(gHeight)} }; |
| 165 | SkPoint center = { SkIntToScalar(gWidth)/2, SkIntToScalar(gHeight)/2 }; |
| 166 | SkScalar rad = SkIntToScalar(gWidth)/2; |
caryclark | 1e545b6 | 2015-07-13 08:19:58 -0700 | [diff] [blame] | 167 | SkColor colors[] = { 0xFFFF0000, sk_tool_utils::color_to_565(0xFF0044FF) }; |
mike@reedtribe.org | a059169 | 2012-10-18 02:01:59 +0000 | [diff] [blame] | 168 | |
| 169 | int index = (int)ty; |
| 170 | switch (index % 3) { |
| 171 | case 0: |
reed | 1a9b964 | 2016-03-13 14:13:58 -0700 | [diff] [blame] | 172 | return SkGradientShader::MakeLinear(pts, colors, nullptr, SK_ARRAY_COUNT(colors), tx); |
mike@reedtribe.org | a059169 | 2012-10-18 02:01:59 +0000 | [diff] [blame] | 173 | case 1: |
reed | 1a9b964 | 2016-03-13 14:13:58 -0700 | [diff] [blame] | 174 | return SkGradientShader::MakeRadial(center, rad, colors, nullptr, SK_ARRAY_COUNT(colors), tx); |
mike@reedtribe.org | a059169 | 2012-10-18 02:01:59 +0000 | [diff] [blame] | 175 | case 2: |
reed | 1a9b964 | 2016-03-13 14:13:58 -0700 | [diff] [blame] | 176 | return SkGradientShader::MakeSweep(center.fX, center.fY, colors, nullptr, SK_ARRAY_COUNT(colors)); |
mike@reedtribe.org | a059169 | 2012-10-18 02:01:59 +0000 | [diff] [blame] | 177 | } |
halcanary | 96fcdcc | 2015-08-27 07:41:13 -0700 | [diff] [blame] | 178 | return nullptr; |
mike@reedtribe.org | a059169 | 2012-10-18 02:01:59 +0000 | [diff] [blame] | 179 | } |
| 180 | |
reed | 1a9b964 | 2016-03-13 14:13:58 -0700 | [diff] [blame] | 181 | typedef sk_sp<SkShader> (*ShaderProc)(SkShader::TileMode, SkShader::TileMode); |
mike@reedtribe.org | a059169 | 2012-10-18 02:01:59 +0000 | [diff] [blame] | 182 | |
| 183 | class Tiling2GM : public skiagm::GM { |
| 184 | ShaderProc fProc; |
| 185 | SkString fName; |
| 186 | public: |
| 187 | Tiling2GM(ShaderProc proc, const char name[]) : fProc(proc) { |
| 188 | fName.printf("tilemode_%s", name); |
| 189 | } |
skia.committer@gmail.com | 6a748ad | 2012-10-19 02:01:19 +0000 | [diff] [blame] | 190 | |
mike@reedtribe.org | a059169 | 2012-10-18 02:01:59 +0000 | [diff] [blame] | 191 | protected: |
commit-bot@chromium.org | a90c680 | 2014-04-30 13:20:45 +0000 | [diff] [blame] | 192 | |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 193 | SkString onShortName() override { |
mike@reedtribe.org | a059169 | 2012-10-18 02:01:59 +0000 | [diff] [blame] | 194 | return fName; |
| 195 | } |
skia.committer@gmail.com | 6a748ad | 2012-10-19 02:01:19 +0000 | [diff] [blame] | 196 | |
reed | 6dc14aa | 2016-04-11 07:46:38 -0700 | [diff] [blame] | 197 | SkISize onISize() override { return SkISize::Make(650, 610); } |
skia.committer@gmail.com | 6a748ad | 2012-10-19 02:01:19 +0000 | [diff] [blame] | 198 | |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 199 | void onDraw(SkCanvas* canvas) override { |
mike@reedtribe.org | a059169 | 2012-10-18 02:01:59 +0000 | [diff] [blame] | 200 | canvas->scale(SkIntToScalar(3)/2, SkIntToScalar(3)/2); |
| 201 | |
| 202 | const SkScalar w = SkIntToScalar(gWidth); |
| 203 | const SkScalar h = SkIntToScalar(gHeight); |
| 204 | SkRect r = { -w, -h, w*2, h*2 }; |
| 205 | |
| 206 | static const SkShader::TileMode gModes[] = { |
| 207 | SkShader::kClamp_TileMode, SkShader::kRepeat_TileMode, SkShader::kMirror_TileMode |
| 208 | }; |
| 209 | static const char* gModeNames[] = { |
| 210 | "Clamp", "Repeat", "Mirror" |
| 211 | }; |
skia.committer@gmail.com | 6a748ad | 2012-10-19 02:01:19 +0000 | [diff] [blame] | 212 | |
mike@reedtribe.org | a059169 | 2012-10-18 02:01:59 +0000 | [diff] [blame] | 213 | SkScalar y = SkIntToScalar(24); |
| 214 | SkScalar x = SkIntToScalar(66); |
skia.committer@gmail.com | 6a748ad | 2012-10-19 02:01:19 +0000 | [diff] [blame] | 215 | |
mike@reedtribe.org | a059169 | 2012-10-18 02:01:59 +0000 | [diff] [blame] | 216 | SkPaint p; |
| 217 | p.setAntiAlias(true); |
caryclark | 1818acb | 2015-07-24 12:09:25 -0700 | [diff] [blame] | 218 | sk_tool_utils::set_portable_typeface(&p); |
mike@reedtribe.org | a059169 | 2012-10-18 02:01:59 +0000 | [diff] [blame] | 219 | p.setTextAlign(SkPaint::kCenter_Align); |
| 220 | |
| 221 | for (size_t kx = 0; kx < SK_ARRAY_COUNT(gModes); kx++) { |
| 222 | SkString str(gModeNames[kx]); |
| 223 | canvas->drawText(str.c_str(), str.size(), x + r.width()/2, y, p); |
| 224 | x += r.width() * 4 / 3; |
| 225 | } |
skia.committer@gmail.com | 6a748ad | 2012-10-19 02:01:19 +0000 | [diff] [blame] | 226 | |
mike@reedtribe.org | a059169 | 2012-10-18 02:01:59 +0000 | [diff] [blame] | 227 | y += SkIntToScalar(16) + h; |
| 228 | p.setTextAlign(SkPaint::kRight_Align); |
| 229 | |
| 230 | for (size_t ky = 0; ky < SK_ARRAY_COUNT(gModes); ky++) { |
| 231 | x = SkIntToScalar(16) + w; |
| 232 | |
| 233 | SkString str(gModeNames[ky]); |
| 234 | canvas->drawText(str.c_str(), str.size(), x, y + h/2, p); |
| 235 | |
| 236 | x += SkIntToScalar(50); |
| 237 | for (size_t kx = 0; kx < SK_ARRAY_COUNT(gModes); kx++) { |
| 238 | SkPaint paint; |
reed | 1a9b964 | 2016-03-13 14:13:58 -0700 | [diff] [blame] | 239 | paint.setShader(fProc(gModes[kx], gModes[ky])); |
skia.committer@gmail.com | 6a748ad | 2012-10-19 02:01:19 +0000 | [diff] [blame] | 240 | |
mike@reedtribe.org | a059169 | 2012-10-18 02:01:59 +0000 | [diff] [blame] | 241 | canvas->save(); |
| 242 | canvas->translate(x, y); |
| 243 | canvas->drawRect(r, paint); |
| 244 | canvas->restore(); |
skia.committer@gmail.com | 6a748ad | 2012-10-19 02:01:19 +0000 | [diff] [blame] | 245 | |
mike@reedtribe.org | a059169 | 2012-10-18 02:01:59 +0000 | [diff] [blame] | 246 | x += r.width() * 4 / 3; |
| 247 | } |
| 248 | y += r.height() * 4 / 3; |
| 249 | } |
| 250 | } |
skia.committer@gmail.com | 6a748ad | 2012-10-19 02:01:19 +0000 | [diff] [blame] | 251 | |
mike@reedtribe.org | a059169 | 2012-10-18 02:01:59 +0000 | [diff] [blame] | 252 | private: |
| 253 | typedef skiagm::GM INHERITED; |
reed@android.com | 1a2fec5 | 2009-06-22 02:17:34 +0000 | [diff] [blame] | 254 | }; |
| 255 | |
| 256 | ////////////////////////////////////////////////////////////////////////////// |
| 257 | |
commit-bot@chromium.org | 37799e1 | 2013-07-25 17:52:32 +0000 | [diff] [blame] | 258 | DEF_GM( return new TilingGM(true); ) |
| 259 | DEF_GM( return new TilingGM(false); ) |
reed@google.com | 3934200 | 2013-02-22 17:28:16 +0000 | [diff] [blame] | 260 | DEF_GM( return new Tiling2GM(make_bm, "bitmap"); ) |
| 261 | DEF_GM( return new Tiling2GM(make_grad, "gradient"); ) |