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