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