commit-bot@chromium.org | c3fe549 | 2014-01-30 18:15:51 +0000 | [diff] [blame] | 1 | |
| 2 | /* |
| 3 | * Copyright 2014 Google Inc. |
| 4 | * |
| 5 | * Use of this source code is governed by a BSD-style license that can be |
| 6 | * found in the LICENSE file. |
| 7 | */ |
| 8 | |
| 9 | // This test only works with the GPU backend. |
| 10 | |
| 11 | #include "gm.h" |
| 12 | |
| 13 | #if SK_SUPPORT_GPU |
| 14 | |
joshualitt | 95964c6 | 2015-02-11 13:45:50 -0800 | [diff] [blame] | 15 | #include "GrBatchTarget.h" |
commit-bot@chromium.org | c3fe549 | 2014-01-30 18:15:51 +0000 | [diff] [blame] | 16 | #include "GrContext.h" |
joshualitt | 5478d42 | 2014-11-14 16:00:38 -0800 | [diff] [blame] | 17 | #include "GrDefaultGeoProcFactory.h" |
commit-bot@chromium.org | c3fe549 | 2014-01-30 18:15:51 +0000 | [diff] [blame] | 18 | #include "GrPathUtils.h" |
| 19 | #include "GrTest.h" |
joshualitt | 95964c6 | 2015-02-11 13:45:50 -0800 | [diff] [blame] | 20 | #include "GrTestBatch.h" |
commit-bot@chromium.org | c3fe549 | 2014-01-30 18:15:51 +0000 | [diff] [blame] | 21 | #include "SkColorPriv.h" |
| 22 | #include "SkDevice.h" |
| 23 | #include "SkGeometry.h" |
| 24 | #include "SkTLList.h" |
| 25 | |
| 26 | #include "effects/GrConvexPolyEffect.h" |
| 27 | |
commit-bot@chromium.org | c3fe549 | 2014-01-30 18:15:51 +0000 | [diff] [blame] | 28 | namespace skiagm { |
joshualitt | 95964c6 | 2015-02-11 13:45:50 -0800 | [diff] [blame] | 29 | |
| 30 | class ConvexPolyTestBatch : public GrTestBatch { |
| 31 | public: |
| 32 | struct Geometry : public GrTestBatch::Geometry { |
| 33 | SkRect fBounds; |
| 34 | }; |
| 35 | |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 36 | const char* name() const override { return "ConvexPolyTestBatch"; } |
joshualitt | 95964c6 | 2015-02-11 13:45:50 -0800 | [diff] [blame] | 37 | |
| 38 | static GrBatch* Create(const GrGeometryProcessor* gp, const Geometry& geo) { |
| 39 | return SkNEW_ARGS(ConvexPolyTestBatch, (gp, geo)); |
| 40 | } |
| 41 | |
| 42 | private: |
| 43 | ConvexPolyTestBatch(const GrGeometryProcessor* gp, const Geometry& geo) |
joshualitt | 99c7c07 | 2015-05-01 13:43:30 -0700 | [diff] [blame] | 44 | : INHERITED(gp, geo.fBounds) |
joshualitt | 95964c6 | 2015-02-11 13:45:50 -0800 | [diff] [blame] | 45 | , fGeometry(geo) { |
joshualitt | dbe1e6f | 2015-07-16 08:12:45 -0700 | [diff] [blame] | 46 | this->initClassID<ConvexPolyTestBatch>(); |
joshualitt | 95964c6 | 2015-02-11 13:45:50 -0800 | [diff] [blame] | 47 | } |
| 48 | |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 49 | Geometry* geoData(int index) override { |
joshualitt | 95964c6 | 2015-02-11 13:45:50 -0800 | [diff] [blame] | 50 | SkASSERT(0 == index); |
| 51 | return &fGeometry; |
| 52 | } |
| 53 | |
joshualitt | 88c23fc | 2015-05-13 14:18:07 -0700 | [diff] [blame] | 54 | const Geometry* geoData(int index) const override { |
| 55 | SkASSERT(0 == index); |
| 56 | return &fGeometry; |
| 57 | } |
| 58 | |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 59 | void onGenerateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline) override { |
bsalomon | ed0bcad | 2015-05-04 10:36:42 -0700 | [diff] [blame] | 60 | size_t vertexStride = this->geometryProcessor()->getVertexStride(); |
bsalomon | b5238a7 | 2015-05-05 07:49:49 -0700 | [diff] [blame] | 61 | SkASSERT(vertexStride == sizeof(SkPoint)); |
| 62 | QuadHelper helper; |
| 63 | SkPoint* verts = reinterpret_cast<SkPoint*>(helper.init(batchTarget, vertexStride, 1)); |
| 64 | if (!verts) { |
joshualitt | 4b31de8 | 2015-03-05 14:33:41 -0800 | [diff] [blame] | 65 | return; |
| 66 | } |
| 67 | |
joshualitt | 95964c6 | 2015-02-11 13:45:50 -0800 | [diff] [blame] | 68 | // Make sure any artifacts around the exterior of path are visible by using overly |
| 69 | // conservative bounding geometry. |
| 70 | fGeometry.fBounds.outset(5.f, 5.f); |
| 71 | fGeometry.fBounds.toQuad(verts); |
| 72 | |
bsalomon | e64eb57 | 2015-05-07 11:35:55 -0700 | [diff] [blame] | 73 | helper.issueDraw(batchTarget); |
joshualitt | 95964c6 | 2015-02-11 13:45:50 -0800 | [diff] [blame] | 74 | } |
| 75 | |
| 76 | Geometry fGeometry; |
| 77 | |
joshualitt | 95964c6 | 2015-02-11 13:45:50 -0800 | [diff] [blame] | 78 | typedef GrTestBatch INHERITED; |
| 79 | }; |
| 80 | |
commit-bot@chromium.org | c3fe549 | 2014-01-30 18:15:51 +0000 | [diff] [blame] | 81 | /** |
joshualitt | b0a8a37 | 2014-09-23 09:50:21 -0700 | [diff] [blame] | 82 | * This GM directly exercises a GrProcessor that draws convex polygons. |
commit-bot@chromium.org | c3fe549 | 2014-01-30 18:15:51 +0000 | [diff] [blame] | 83 | */ |
| 84 | class ConvexPolyEffect : public GM { |
| 85 | public: |
| 86 | ConvexPolyEffect() { |
| 87 | this->setBGColor(0xFFFFFFFF); |
| 88 | } |
| 89 | |
| 90 | protected: |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 91 | SkString onShortName() override { |
commit-bot@chromium.org | c3fe549 | 2014-01-30 18:15:51 +0000 | [diff] [blame] | 92 | return SkString("convex_poly_effect"); |
| 93 | } |
| 94 | |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 95 | SkISize onISize() override { |
tfarina | f539318 | 2014-06-09 23:59:03 -0700 | [diff] [blame] | 96 | return SkISize::Make(720, 800); |
commit-bot@chromium.org | c3fe549 | 2014-01-30 18:15:51 +0000 | [diff] [blame] | 97 | } |
| 98 | |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 99 | void onOnceBeforeDraw() override { |
commit-bot@chromium.org | c3fe549 | 2014-01-30 18:15:51 +0000 | [diff] [blame] | 100 | SkPath tri; |
| 101 | tri.moveTo(5.f, 5.f); |
| 102 | tri.lineTo(100.f, 20.f); |
| 103 | tri.lineTo(15.f, 100.f); |
skia.committer@gmail.com | 4c18e9f | 2014-01-31 03:01:59 +0000 | [diff] [blame] | 104 | |
commit-bot@chromium.org | c3fe549 | 2014-01-30 18:15:51 +0000 | [diff] [blame] | 105 | fPaths.addToTail(tri); |
| 106 | fPaths.addToTail(SkPath())->reverseAddPath(tri); |
skia.committer@gmail.com | 4c18e9f | 2014-01-31 03:01:59 +0000 | [diff] [blame] | 107 | |
commit-bot@chromium.org | c3fe549 | 2014-01-30 18:15:51 +0000 | [diff] [blame] | 108 | tri.close(); |
| 109 | fPaths.addToTail(tri); |
skia.committer@gmail.com | 4c18e9f | 2014-01-31 03:01:59 +0000 | [diff] [blame] | 110 | |
commit-bot@chromium.org | c3fe549 | 2014-01-30 18:15:51 +0000 | [diff] [blame] | 111 | SkPath ngon; |
| 112 | static const SkScalar kRadius = 50.f; |
| 113 | const SkPoint center = { kRadius, kRadius }; |
| 114 | for (int i = 0; i < GrConvexPolyEffect::kMaxEdges; ++i) { |
| 115 | SkScalar angle = 2 * SK_ScalarPI * i / GrConvexPolyEffect::kMaxEdges; |
| 116 | SkPoint point; |
| 117 | point.fY = SkScalarSinCos(angle, &point.fX); |
| 118 | point.scale(kRadius); |
| 119 | point = center + point; |
| 120 | if (0 == i) { |
| 121 | ngon.moveTo(point); |
| 122 | } else { |
| 123 | ngon.lineTo(point); |
| 124 | } |
| 125 | } |
skia.committer@gmail.com | 4c18e9f | 2014-01-31 03:01:59 +0000 | [diff] [blame] | 126 | |
commit-bot@chromium.org | c3fe549 | 2014-01-30 18:15:51 +0000 | [diff] [blame] | 127 | fPaths.addToTail(ngon); |
| 128 | SkMatrix scaleM; |
| 129 | scaleM.setScale(1.1f, 0.4f); |
| 130 | ngon.transform(scaleM); |
| 131 | fPaths.addToTail(ngon); |
skia.committer@gmail.com | f0b0cda | 2014-02-09 03:02:01 +0000 | [diff] [blame] | 132 | |
commit-bot@chromium.org | f053980 | 2014-02-08 19:31:05 +0000 | [diff] [blame] | 133 | // integer edges |
| 134 | fRects.addToTail(SkRect::MakeLTRB(5.f, 1.f, 30.f, 25.f)); |
| 135 | // half-integer edges |
| 136 | fRects.addToTail(SkRect::MakeLTRB(5.5f, 0.5f, 29.5f, 24.5f)); |
| 137 | // vertically/horizontally thin rects that cover pixel centers |
| 138 | fRects.addToTail(SkRect::MakeLTRB(5.25f, 0.5f, 5.75f, 24.5f)); |
| 139 | fRects.addToTail(SkRect::MakeLTRB(5.5f, 0.5f, 29.5f, 0.75f)); |
| 140 | // vertically/horizontally thin rects that don't cover pixel centers |
| 141 | fRects.addToTail(SkRect::MakeLTRB(5.55f, 0.5f, 5.75f, 24.5f)); |
| 142 | fRects.addToTail(SkRect::MakeLTRB(5.5f, .05f, 29.5f, .25f)); |
| 143 | // small in x and y |
| 144 | fRects.addToTail(SkRect::MakeLTRB(5.05f, .55f, 5.45f, .85f)); |
| 145 | // inverted in x and y |
| 146 | fRects.addToTail(SkRect::MakeLTRB(100.f, 50.5f, 5.f, 0.5f)); |
commit-bot@chromium.org | c3fe549 | 2014-01-30 18:15:51 +0000 | [diff] [blame] | 147 | } |
| 148 | |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 149 | void onDraw(SkCanvas* canvas) override { |
joshualitt | df0c557 | 2015-08-03 11:35:28 -0700 | [diff] [blame^] | 150 | using namespace GrDefaultGeoProcFactory; |
reed@google.com | 9c135db | 2014-03-12 18:28:35 +0000 | [diff] [blame] | 151 | GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget(); |
commit-bot@chromium.org | c3fe549 | 2014-01-30 18:15:51 +0000 | [diff] [blame] | 152 | if (NULL == rt) { |
bsalomon | b62da80 | 2015-01-31 07:51:14 -0800 | [diff] [blame] | 153 | this->drawGpuOnlyMessage(canvas); |
commit-bot@chromium.org | c3fe549 | 2014-01-30 18:15:51 +0000 | [diff] [blame] | 154 | return; |
| 155 | } |
| 156 | GrContext* context = rt->getContext(); |
| 157 | if (NULL == context) { |
| 158 | return; |
| 159 | } |
| 160 | |
joshualitt | df0c557 | 2015-08-03 11:35:28 -0700 | [diff] [blame^] | 161 | Color color(0xff000000); |
| 162 | Coverage coverage(Coverage::kSolid_Type); |
| 163 | LocalCoords localCoords(LocalCoords::kUnused_Type); |
joshualitt | 95964c6 | 2015-02-11 13:45:50 -0800 | [diff] [blame] | 164 | SkAutoTUnref<const GrGeometryProcessor> gp( |
joshualitt | df0c557 | 2015-08-03 11:35:28 -0700 | [diff] [blame^] | 165 | GrDefaultGeoProcFactory::Create(color, coverage, localCoords, SkMatrix::I())); |
joshualitt | 95964c6 | 2015-02-11 13:45:50 -0800 | [diff] [blame] | 166 | |
commit-bot@chromium.org | c3fe549 | 2014-01-30 18:15:51 +0000 | [diff] [blame] | 167 | SkScalar y = 0; |
| 168 | for (SkTLList<SkPath>::Iter iter(fPaths, SkTLList<SkPath>::Iter::kHead_IterStart); |
bsalomon | 49f085d | 2014-09-05 13:34:00 -0700 | [diff] [blame] | 169 | iter.get(); |
commit-bot@chromium.org | c3fe549 | 2014-01-30 18:15:51 +0000 | [diff] [blame] | 170 | iter.next()) { |
commit-bot@chromium.org | f053980 | 2014-02-08 19:31:05 +0000 | [diff] [blame] | 171 | const SkPath* path = iter.get(); |
commit-bot@chromium.org | c3fe549 | 2014-01-30 18:15:51 +0000 | [diff] [blame] | 172 | SkScalar x = 0; |
| 173 | |
joshualitt | b0a8a37 | 2014-09-23 09:50:21 -0700 | [diff] [blame] | 174 | for (int et = 0; et < kGrProcessorEdgeTypeCnt; ++et) { |
commit-bot@chromium.org | c3fe549 | 2014-01-30 18:15:51 +0000 | [diff] [blame] | 175 | GrTestTarget tt; |
| 176 | context->getTestTarget(&tt); |
| 177 | if (NULL == tt.target()) { |
| 178 | SkDEBUGFAIL("Couldn't get Gr test target."); |
| 179 | return; |
| 180 | } |
robertphillips | 1d24b8d | 2015-03-26 19:57:08 -0700 | [diff] [blame] | 181 | const SkMatrix m = SkMatrix::MakeTrans(x, y); |
commit-bot@chromium.org | c3fe549 | 2014-01-30 18:15:51 +0000 | [diff] [blame] | 182 | SkPath p; |
commit-bot@chromium.org | c3fe549 | 2014-01-30 18:15:51 +0000 | [diff] [blame] | 183 | path->transform(m, &p); |
skia.committer@gmail.com | 4c18e9f | 2014-01-31 03:01:59 +0000 | [diff] [blame] | 184 | |
joshualitt | b0a8a37 | 2014-09-23 09:50:21 -0700 | [diff] [blame] | 185 | GrPrimitiveEdgeType edgeType = (GrPrimitiveEdgeType) et; |
| 186 | SkAutoTUnref<GrFragmentProcessor> fp(GrConvexPolyEffect::Create(edgeType, p)); |
| 187 | if (!fp) { |
commit-bot@chromium.org | cabf4b2 | 2014-03-05 18:27:43 +0000 | [diff] [blame] | 188 | continue; |
commit-bot@chromium.org | c3fe549 | 2014-01-30 18:15:51 +0000 | [diff] [blame] | 189 | } |
skia.committer@gmail.com | 4c18e9f | 2014-01-31 03:01:59 +0000 | [diff] [blame] | 190 | |
egdaniel | 8dd688b | 2015-01-22 10:16:09 -0800 | [diff] [blame] | 191 | GrPipelineBuilder pipelineBuilder; |
egdaniel | 8dd688b | 2015-01-22 10:16:09 -0800 | [diff] [blame] | 192 | pipelineBuilder.addCoverageProcessor(fp); |
| 193 | pipelineBuilder.setRenderTarget(rt); |
joshualitt | 9853cce | 2014-11-17 14:22:48 -0800 | [diff] [blame] | 194 | |
joshualitt | 95964c6 | 2015-02-11 13:45:50 -0800 | [diff] [blame] | 195 | ConvexPolyTestBatch::Geometry geometry; |
joshualitt | df0c557 | 2015-08-03 11:35:28 -0700 | [diff] [blame^] | 196 | geometry.fColor = color.fColor; |
joshualitt | 95964c6 | 2015-02-11 13:45:50 -0800 | [diff] [blame] | 197 | geometry.fBounds = p.getBounds(); |
joshualitt | 50408ad | 2014-11-03 12:31:14 -0800 | [diff] [blame] | 198 | |
joshualitt | 95964c6 | 2015-02-11 13:45:50 -0800 | [diff] [blame] | 199 | SkAutoTUnref<GrBatch> batch(ConvexPolyTestBatch::Create(gp, geometry)); |
commit-bot@chromium.org | c3fe549 | 2014-01-30 18:15:51 +0000 | [diff] [blame] | 200 | |
joshualitt | 1c73548 | 2015-07-13 08:08:25 -0700 | [diff] [blame] | 201 | tt.target()->drawBatch(pipelineBuilder, batch); |
skia.committer@gmail.com | 4c18e9f | 2014-01-31 03:01:59 +0000 | [diff] [blame] | 202 | |
commit-bot@chromium.org | f053980 | 2014-02-08 19:31:05 +0000 | [diff] [blame] | 203 | x += SkScalarCeilToScalar(path->getBounds().width() + 10.f); |
commit-bot@chromium.org | c3fe549 | 2014-01-30 18:15:51 +0000 | [diff] [blame] | 204 | } |
skia.committer@gmail.com | 4c18e9f | 2014-01-31 03:01:59 +0000 | [diff] [blame] | 205 | |
commit-bot@chromium.org | c3fe549 | 2014-01-30 18:15:51 +0000 | [diff] [blame] | 206 | // Draw AA and non AA paths using normal API for reference. |
| 207 | canvas->save(); |
| 208 | canvas->translate(x, y); |
| 209 | SkPaint paint; |
| 210 | canvas->drawPath(*path, paint); |
| 211 | canvas->translate(path->getBounds().width() + 10.f, 0); |
| 212 | paint.setAntiAlias(true); |
| 213 | canvas->drawPath(*path, paint); |
| 214 | canvas->restore(); |
skia.committer@gmail.com | 4c18e9f | 2014-01-31 03:01:59 +0000 | [diff] [blame] | 215 | |
commit-bot@chromium.org | f053980 | 2014-02-08 19:31:05 +0000 | [diff] [blame] | 216 | y += SkScalarCeilToScalar(path->getBounds().height() + 20.f); |
| 217 | } |
| 218 | |
commit-bot@chromium.org | f053980 | 2014-02-08 19:31:05 +0000 | [diff] [blame] | 219 | for (SkTLList<SkRect>::Iter iter(fRects, SkTLList<SkRect>::Iter::kHead_IterStart); |
bsalomon | 49f085d | 2014-09-05 13:34:00 -0700 | [diff] [blame] | 220 | iter.get(); |
commit-bot@chromium.org | f053980 | 2014-02-08 19:31:05 +0000 | [diff] [blame] | 221 | iter.next()) { |
| 222 | |
| 223 | SkScalar x = 0; |
| 224 | |
joshualitt | b0a8a37 | 2014-09-23 09:50:21 -0700 | [diff] [blame] | 225 | for (int et = 0; et < kGrProcessorEdgeTypeCnt; ++et) { |
commit-bot@chromium.org | d85f32c | 2014-02-28 14:43:26 +0000 | [diff] [blame] | 226 | GrTestTarget tt; |
| 227 | context->getTestTarget(&tt); |
| 228 | if (NULL == tt.target()) { |
| 229 | SkDEBUGFAIL("Couldn't get Gr test target."); |
| 230 | return; |
| 231 | } |
| 232 | SkRect rect = *iter.get(); |
| 233 | rect.offset(x, y); |
joshualitt | b0a8a37 | 2014-09-23 09:50:21 -0700 | [diff] [blame] | 234 | GrPrimitiveEdgeType edgeType = (GrPrimitiveEdgeType) et; |
| 235 | SkAutoTUnref<GrFragmentProcessor> fp(GrConvexPolyEffect::Create(edgeType, rect)); |
| 236 | if (!fp) { |
commit-bot@chromium.org | cabf4b2 | 2014-03-05 18:27:43 +0000 | [diff] [blame] | 237 | continue; |
commit-bot@chromium.org | d85f32c | 2014-02-28 14:43:26 +0000 | [diff] [blame] | 238 | } |
| 239 | |
egdaniel | 8dd688b | 2015-01-22 10:16:09 -0800 | [diff] [blame] | 240 | GrPipelineBuilder pipelineBuilder; |
egdaniel | 8dd688b | 2015-01-22 10:16:09 -0800 | [diff] [blame] | 241 | pipelineBuilder.addCoverageProcessor(fp); |
| 242 | pipelineBuilder.setRenderTarget(rt); |
commit-bot@chromium.org | d85f32c | 2014-02-28 14:43:26 +0000 | [diff] [blame] | 243 | |
joshualitt | 95964c6 | 2015-02-11 13:45:50 -0800 | [diff] [blame] | 244 | ConvexPolyTestBatch::Geometry geometry; |
joshualitt | df0c557 | 2015-08-03 11:35:28 -0700 | [diff] [blame^] | 245 | geometry.fColor = color.fColor; |
joshualitt | 95964c6 | 2015-02-11 13:45:50 -0800 | [diff] [blame] | 246 | geometry.fBounds = rect; |
joshualitt | 50408ad | 2014-11-03 12:31:14 -0800 | [diff] [blame] | 247 | |
joshualitt | 95964c6 | 2015-02-11 13:45:50 -0800 | [diff] [blame] | 248 | SkAutoTUnref<GrBatch> batch(ConvexPolyTestBatch::Create(gp, geometry)); |
commit-bot@chromium.org | d85f32c | 2014-02-28 14:43:26 +0000 | [diff] [blame] | 249 | |
joshualitt | 1c73548 | 2015-07-13 08:08:25 -0700 | [diff] [blame] | 250 | tt.target()->drawBatch(pipelineBuilder, batch); |
commit-bot@chromium.org | d85f32c | 2014-02-28 14:43:26 +0000 | [diff] [blame] | 251 | |
| 252 | x += SkScalarCeilToScalar(rect.width() + 10.f); |
commit-bot@chromium.org | f053980 | 2014-02-08 19:31:05 +0000 | [diff] [blame] | 253 | } |
| 254 | |
commit-bot@chromium.org | d85f32c | 2014-02-28 14:43:26 +0000 | [diff] [blame] | 255 | // Draw rect without and with AA using normal API for reference |
commit-bot@chromium.org | f053980 | 2014-02-08 19:31:05 +0000 | [diff] [blame] | 256 | canvas->save(); |
| 257 | canvas->translate(x, y); |
| 258 | SkPaint paint; |
commit-bot@chromium.org | d85f32c | 2014-02-28 14:43:26 +0000 | [diff] [blame] | 259 | canvas->drawRect(*iter.get(), paint); |
| 260 | x += SkScalarCeilToScalar(iter.get()->width() + 10.f); |
commit-bot@chromium.org | f053980 | 2014-02-08 19:31:05 +0000 | [diff] [blame] | 261 | paint.setAntiAlias(true); |
| 262 | canvas->drawRect(*iter.get(), paint); |
| 263 | canvas->restore(); |
| 264 | |
commit-bot@chromium.org | d85f32c | 2014-02-28 14:43:26 +0000 | [diff] [blame] | 265 | y += SkScalarCeilToScalar(iter.get()->height() + 20.f); |
commit-bot@chromium.org | c3fe549 | 2014-01-30 18:15:51 +0000 | [diff] [blame] | 266 | } |
| 267 | } |
| 268 | |
| 269 | private: |
| 270 | SkTLList<SkPath> fPaths; |
commit-bot@chromium.org | f053980 | 2014-02-08 19:31:05 +0000 | [diff] [blame] | 271 | SkTLList<SkRect> fRects; |
skia.committer@gmail.com | f0b0cda | 2014-02-09 03:02:01 +0000 | [diff] [blame] | 272 | |
commit-bot@chromium.org | c3fe549 | 2014-01-30 18:15:51 +0000 | [diff] [blame] | 273 | typedef GM INHERITED; |
| 274 | }; |
| 275 | |
| 276 | DEF_GM( return SkNEW(ConvexPolyEffect); ) |
commit-bot@chromium.org | c3fe549 | 2014-01-30 18:15:51 +0000 | [diff] [blame] | 277 | } |
| 278 | |
| 279 | #endif |