blob: 2a7d6640a6bb232151ec3918589c16b23085cdd8 [file] [log] [blame]
Chris Dalton1a325d22017-07-14 15:17:41 -06001/*
2 * Copyright 2017 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 */
7
8#include "SkTypes.h"
9
10#if SK_SUPPORT_GPU
11
12#include "GrContextPriv.h"
Chris Dalton7f578bf2017-09-05 16:46:48 -060013#include "GrPathUtils.h"
Chris Dalton1a325d22017-07-14 15:17:41 -060014#include "GrRenderTargetContext.h"
15#include "GrRenderTargetContextPriv.h"
16#include "GrResourceProvider.h"
17#include "SampleCode.h"
18#include "SkCanvas.h"
Chris Dalton1a325d22017-07-14 15:17:41 -060019#include "SkMakeUnique.h"
20#include "SkPaint.h"
21#include "SkPath.h"
Mike Reed274218e2018-01-08 15:05:02 -050022#include "SkRectPriv.h"
Chris Dalton1a325d22017-07-14 15:17:41 -060023#include "SkView.h"
Chris Dalton383a2ef2018-01-08 17:21:41 -050024#include "ccpr/GrCCCoverageProcessor.h"
25#include "ccpr/GrCCGeometry.h"
Chris Dalton1a325d22017-07-14 15:17:41 -060026#include "gl/GrGLGpu.cpp"
27#include "ops/GrDrawOp.h"
28
Chris Dalton84403d72018-02-13 21:46:17 -050029using TriPointInstance = GrCCCoverageProcessor::TriPointInstance;
30using QuadPointInstance = GrCCCoverageProcessor::QuadPointInstance;
Chris Dalton383a2ef2018-01-08 17:21:41 -050031using RenderPass = GrCCCoverageProcessor::RenderPass;
Chris Dalton1a325d22017-07-14 15:17:41 -060032
Chris Daltona640c492017-09-11 22:04:03 -070033static constexpr float kDebugBloat = 40;
34
Chris Dalton1a325d22017-07-14 15:17:41 -060035/**
36 * This sample visualizes the AA bloat geometry generated by the ccpr geometry shaders. It
37 * increases the AA bloat by 50x and outputs color instead of coverage (coverage=+1 -> green,
38 * coverage=0 -> black, coverage=-1 -> red). Use the keys 1-7 to cycle through the different
39 * geometry processors.
40 */
41class CCPRGeometryView : public SampleView {
42public:
43 CCPRGeometryView() { this->updateGpuData(); }
44 void onDrawContent(SkCanvas*) override;
45
46 SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned) override;
47 bool onClick(SampleView::Click*) override;
48 bool onQuery(SkEvent* evt) override;
49
50private:
51 class Click;
52 class Op;
53
Chris Dalton383a2ef2018-01-08 17:21:41 -050054 void updateAndInval() { this->updateGpuData(); }
Chris Dalton1a325d22017-07-14 15:17:41 -060055
56 void updateGpuData();
57
Chris Dalton5183e642018-03-07 12:53:01 -070058 RenderPass fRenderPass = RenderPass::kTriangles;
Chris Daltonbe4ffab2017-12-08 10:59:58 -070059 SkCubicType fCubicType;
Chris Dalton7f578bf2017-09-05 16:46:48 -060060 SkMatrix fCubicKLM;
Chris Dalton1a325d22017-07-14 15:17:41 -060061
62 SkPoint fPoints[4] = {
Chris Dalton383a2ef2018-01-08 17:21:41 -050063 {100.05f, 100.05f}, {400.75f, 100.05f}, {400.75f, 300.95f}, {100.05f, 300.95f}};
Chris Dalton1a325d22017-07-14 15:17:41 -060064
Chris Dalton84403d72018-02-13 21:46:17 -050065 SkTArray<TriPointInstance> fTriPointInstances;
66 SkTArray<QuadPointInstance> fQuadPointInstances;
Chris Dalton1a325d22017-07-14 15:17:41 -060067
68 typedef SampleView INHERITED;
69};
70
71class CCPRGeometryView::Op : public GrDrawOp {
72 DEFINE_OP_CLASS_ID
73
74public:
Chris Dalton383a2ef2018-01-08 17:21:41 -050075 Op(CCPRGeometryView* view) : INHERITED(ClassID()), fView(view) {
Mike Reed274218e2018-01-08 15:05:02 -050076 this->setBounds(SkRectPriv::MakeLargest(), GrOp::HasAABloat::kNo, GrOp::IsZeroArea::kNo);
Chris Dalton1a325d22017-07-14 15:17:41 -060077 }
78
79 const char* name() const override { return "[Testing/Sample code] CCPRGeometryView::Op"; }
80
81private:
82 FixedFunctionFlags fixedFunctionFlags() const override { return FixedFunctionFlags::kNone; }
Brian Osman9a725dd2017-09-20 09:53:22 -040083 RequiresDstTexture finalize(const GrCaps&, const GrAppliedClip*,
84 GrPixelConfigIsClamped) override {
Chris Dalton1a325d22017-07-14 15:17:41 -060085 return RequiresDstTexture::kNo;
86 }
87 bool onCombineIfPossible(GrOp* other, const GrCaps& caps) override { return false; }
88 void onPrepare(GrOpFlushState*) override {}
89 void onExecute(GrOpFlushState*) override;
90
91 CCPRGeometryView* fView;
92
93 typedef GrDrawOp INHERITED;
94};
95
Chris Dalton7f578bf2017-09-05 16:46:48 -060096static void draw_klm_line(int w, int h, SkCanvas* canvas, const SkScalar line[3], SkColor color) {
97 SkPoint p1, p2;
98 if (SkScalarAbs(line[1]) > SkScalarAbs(line[0])) {
99 // Draw from vertical edge to vertical edge.
100 p1 = {0, -line[2] / line[1]};
Chris Dalton383a2ef2018-01-08 17:21:41 -0500101 p2 = {(SkScalar)w, (-line[2] - w * line[0]) / line[1]};
Chris Dalton7f578bf2017-09-05 16:46:48 -0600102 } else {
103 // Draw from horizontal edge to horizontal edge.
104 p1 = {-line[2] / line[0], 0};
Chris Dalton383a2ef2018-01-08 17:21:41 -0500105 p2 = {(-line[2] - h * line[1]) / line[0], (SkScalar)h};
Chris Dalton7f578bf2017-09-05 16:46:48 -0600106 }
107
108 SkPaint linePaint;
109 linePaint.setColor(color);
110 linePaint.setAlpha(128);
111 linePaint.setStyle(SkPaint::kStroke_Style);
112 linePaint.setStrokeWidth(0);
113 linePaint.setAntiAlias(true);
114 canvas->drawLine(p1, p2, linePaint);
115}
116
Chris Dalton1a325d22017-07-14 15:17:41 -0600117void CCPRGeometryView::onDrawContent(SkCanvas* canvas) {
Chris Daltondf04ce22018-03-07 17:28:07 -0700118 canvas->clear(SK_ColorBLACK);
Chris Dalton1a325d22017-07-14 15:17:41 -0600119
120 SkPath outline;
121 outline.moveTo(fPoints[0]);
Chris Daltondf04ce22018-03-07 17:28:07 -0700122 if (RenderPass::kCubics == fRenderPass) {
Chris Dalton1a325d22017-07-14 15:17:41 -0600123 outline.cubicTo(fPoints[1], fPoints[2], fPoints[3]);
Chris Daltondf04ce22018-03-07 17:28:07 -0700124 } else if (RenderPass::kQuadratics == fRenderPass) {
Chris Dalton1a325d22017-07-14 15:17:41 -0600125 outline.quadTo(fPoints[1], fPoints[3]);
126 } else {
127 outline.lineTo(fPoints[1]);
128 outline.lineTo(fPoints[3]);
Chris Dalton7f578bf2017-09-05 16:46:48 -0600129 outline.close();
Chris Dalton1a325d22017-07-14 15:17:41 -0600130 }
Chris Dalton1a325d22017-07-14 15:17:41 -0600131
132 SkPaint outlinePaint;
Chris Daltondf04ce22018-03-07 17:28:07 -0700133 outlinePaint.setColor(0x80ffffff);
Chris Dalton1a325d22017-07-14 15:17:41 -0600134 outlinePaint.setStyle(SkPaint::kStroke_Style);
135 outlinePaint.setStrokeWidth(0);
136 outlinePaint.setAntiAlias(true);
Chris Dalton1a325d22017-07-14 15:17:41 -0600137 canvas->drawPath(outline, outlinePaint);
138
Chris Dalton7f578bf2017-09-05 16:46:48 -0600139#if 0
140 SkPaint gridPaint;
141 gridPaint.setColor(0x10000000);
142 gridPaint.setStyle(SkPaint::kStroke_Style);
143 gridPaint.setStrokeWidth(0);
144 gridPaint.setAntiAlias(true);
Chris Daltona640c492017-09-11 22:04:03 -0700145 for (int y = 0; y < this->height(); y += kDebugBloat) {
Chris Dalton7f578bf2017-09-05 16:46:48 -0600146 canvas->drawLine(0, y, this->width(), y, gridPaint);
147 }
Chris Daltona640c492017-09-11 22:04:03 -0700148 for (int x = 0; x < this->width(); x += kDebugBloat) {
Chris Dalton7f578bf2017-09-05 16:46:48 -0600149 canvas->drawLine(x, 0, x, this->height(), outlinePaint);
150 }
151#endif
152
Chris Daltonbe4ffab2017-12-08 10:59:58 -0700153 SkString caption;
Chris Dalton383a2ef2018-01-08 17:21:41 -0500154 if (GrRenderTargetContext* rtc = canvas->internal_private_accessTopLayerRenderTargetContext()) {
Chris Dalton1a325d22017-07-14 15:17:41 -0600155 rtc->priv().testingOnly_addDrawOp(skstd::make_unique<Op>(this));
Chris Dalton383a2ef2018-01-08 17:21:41 -0500156 caption.appendf("RenderPass_%s", GrCCCoverageProcessor::RenderPassName(fRenderPass));
Chris Daltondf04ce22018-03-07 17:28:07 -0700157 if (RenderPass::kCubics == fRenderPass) {
Chris Daltonbe4ffab2017-12-08 10:59:58 -0700158 caption.appendf(" (%s)", SkCubicTypeName(fCubicType));
159 }
160 } else {
161 caption = "Use GPU backend to visualize geometry.";
Chris Dalton1a325d22017-07-14 15:17:41 -0600162 }
163
164 SkPaint pointsPaint;
165 pointsPaint.setColor(SK_ColorBLUE);
166 pointsPaint.setStrokeWidth(8);
167 pointsPaint.setAntiAlias(true);
168
Chris Daltondf04ce22018-03-07 17:28:07 -0700169 if (RenderPass::kCubics == fRenderPass) {
Chris Dalton7f578bf2017-09-05 16:46:48 -0600170 int w = this->width(), h = this->height();
Chris Dalton1a325d22017-07-14 15:17:41 -0600171 canvas->drawPoints(SkCanvas::kPoints_PointMode, 4, fPoints, pointsPaint);
Chris Dalton7f578bf2017-09-05 16:46:48 -0600172 draw_klm_line(w, h, canvas, &fCubicKLM[0], SK_ColorYELLOW);
173 draw_klm_line(w, h, canvas, &fCubicKLM[3], SK_ColorBLUE);
174 draw_klm_line(w, h, canvas, &fCubicKLM[6], SK_ColorRED);
Chris Dalton1a325d22017-07-14 15:17:41 -0600175 } else {
176 canvas->drawPoints(SkCanvas::kPoints_PointMode, 2, fPoints, pointsPaint);
177 canvas->drawPoints(SkCanvas::kPoints_PointMode, 1, fPoints + 3, pointsPaint);
178 }
179
180 SkPaint captionPaint;
181 captionPaint.setTextSize(20);
Chris Daltondf04ce22018-03-07 17:28:07 -0700182 captionPaint.setColor(SK_ColorWHITE);
Chris Dalton1a325d22017-07-14 15:17:41 -0600183 captionPaint.setAntiAlias(true);
Chris Daltonbe4ffab2017-12-08 10:59:58 -0700184 canvas->drawText(caption.c_str(), caption.size(), 10, 30, captionPaint);
Chris Dalton1a325d22017-07-14 15:17:41 -0600185}
186
187void CCPRGeometryView::updateGpuData() {
Chris Dalton84403d72018-02-13 21:46:17 -0500188 fTriPointInstances.reset();
189 fQuadPointInstances.reset();
Chris Dalton1a325d22017-07-14 15:17:41 -0600190
Chris Daltondf04ce22018-03-07 17:28:07 -0700191 if (RenderPass::kCubics == fRenderPass) {
Chris Dalton1a325d22017-07-14 15:17:41 -0600192 double t[2], s[2];
Chris Daltonbe4ffab2017-12-08 10:59:58 -0700193 fCubicType = GrPathUtils::getCubicKLM(fPoints, &fCubicKLM, t, s);
Chris Dalton383a2ef2018-01-08 17:21:41 -0500194 GrCCGeometry geometry;
Chris Dalton7f578bf2017-09-05 16:46:48 -0600195 geometry.beginContour(fPoints[0]);
Chris Dalton383a2ef2018-01-08 17:21:41 -0500196 geometry.cubicTo(fPoints[1], fPoints[2], fPoints[3], kDebugBloat / 2, kDebugBloat / 2);
Chris Dalton7f578bf2017-09-05 16:46:48 -0600197 geometry.endContour();
Chris Dalton7f578bf2017-09-05 16:46:48 -0600198 int ptsIdx = 0;
Chris Dalton383a2ef2018-01-08 17:21:41 -0500199 for (GrCCGeometry::Verb verb : geometry.verbs()) {
Chris Dalton7f578bf2017-09-05 16:46:48 -0600200 switch (verb) {
Chris Dalton383a2ef2018-01-08 17:21:41 -0500201 case GrCCGeometry::Verb::kLineTo:
Chris Dalton7f578bf2017-09-05 16:46:48 -0600202 ++ptsIdx;
203 continue;
Chris Dalton383a2ef2018-01-08 17:21:41 -0500204 case GrCCGeometry::Verb::kMonotonicQuadraticTo:
Chris Dalton7f578bf2017-09-05 16:46:48 -0600205 ptsIdx += 2;
206 continue;
Chris Dalton383a2ef2018-01-08 17:21:41 -0500207 case GrCCGeometry::Verb::kMonotonicCubicTo:
Chris Dalton84403d72018-02-13 21:46:17 -0500208 fQuadPointInstances.push_back().set(&geometry.points()[ptsIdx], 0, 0);
Chris Dalton7f578bf2017-09-05 16:46:48 -0600209 ptsIdx += 3;
Chris Dalton7f578bf2017-09-05 16:46:48 -0600210 continue;
Chris Dalton383a2ef2018-01-08 17:21:41 -0500211 default:
212 continue;
Chris Dalton1a325d22017-07-14 15:17:41 -0600213 }
214 }
Chris Daltondf04ce22018-03-07 17:28:07 -0700215 } else if (RenderPass::kQuadratics == fRenderPass) {
Chris Dalton383a2ef2018-01-08 17:21:41 -0500216 GrCCGeometry geometry;
Chris Daltonc1e59632017-09-05 00:30:07 -0600217 geometry.beginContour(fPoints[0]);
218 geometry.quadraticTo(fPoints[1], fPoints[3]);
219 geometry.endContour();
Chris Daltona3e92712017-12-04 11:45:51 -0700220 int ptsIdx = 0;
Chris Dalton383a2ef2018-01-08 17:21:41 -0500221 for (GrCCGeometry::Verb verb : geometry.verbs()) {
222 if (GrCCGeometry::Verb::kBeginContour == verb ||
223 GrCCGeometry::Verb::kEndOpenContour == verb ||
224 GrCCGeometry::Verb::kEndClosedContour == verb) {
Chris Daltonc1e59632017-09-05 00:30:07 -0600225 continue;
226 }
Chris Dalton383a2ef2018-01-08 17:21:41 -0500227 if (GrCCGeometry::Verb::kLineTo == verb) {
Chris Dalton90e8fb12017-12-22 02:24:53 -0700228 ++ptsIdx;
229 continue;
230 }
Chris Dalton383a2ef2018-01-08 17:21:41 -0500231 SkASSERT(GrCCGeometry::Verb::kMonotonicQuadraticTo == verb);
Chris Dalton84403d72018-02-13 21:46:17 -0500232 fTriPointInstances.push_back().set(&geometry.points()[ptsIdx], Sk2f(0, 0));
Chris Daltona3e92712017-12-04 11:45:51 -0700233 ptsIdx += 2;
Chris Daltonb072bb62017-08-07 09:00:46 -0600234 }
Chris Dalton1a325d22017-07-14 15:17:41 -0600235 } else {
Chris Dalton84403d72018-02-13 21:46:17 -0500236 fTriPointInstances.push_back().set(fPoints[0], fPoints[1], fPoints[3], Sk2f(0, 0));
Chris Dalton1a325d22017-07-14 15:17:41 -0600237 }
238}
239
240void CCPRGeometryView::Op::onExecute(GrOpFlushState* state) {
241 GrResourceProvider* rp = state->resourceProvider();
242 GrContext* context = state->gpu()->getContext();
Chris Dalton383a2ef2018-01-08 17:21:41 -0500243 GrGLGpu* glGpu = kOpenGL_GrBackend == context->contextPriv().getBackend()
244 ? static_cast<GrGLGpu*>(state->gpu())
245 : nullptr;
Chris Dalton1a325d22017-07-14 15:17:41 -0600246
Chris Dalton84403d72018-02-13 21:46:17 -0500247 GrCCCoverageProcessor proc(rp, fView->fRenderPass,
248 GrCCCoverageProcessor::WindMethod::kCrossProduct);
Chris Dalton27059d32018-01-23 14:06:50 -0700249 SkDEBUGCODE(proc.enableDebugVisualizations(kDebugBloat));
Chris Dalton23261772017-12-10 16:41:45 -0700250
Chris Dalton27059d32018-01-23 14:06:50 -0700251 SkSTArray<1, GrMesh> mesh;
Chris Daltondf04ce22018-03-07 17:28:07 -0700252 if (RenderPass::kCubics == fView->fRenderPass) {
Chris Dalton383a2ef2018-01-08 17:21:41 -0500253 sk_sp<GrBuffer> instBuff(rp->createBuffer(
Chris Dalton84403d72018-02-13 21:46:17 -0500254 fView->fQuadPointInstances.count() * sizeof(QuadPointInstance),
255 kVertex_GrBufferType, kDynamic_GrAccessPattern,
Chris Dalton383a2ef2018-01-08 17:21:41 -0500256 GrResourceProvider::kNoPendingIO_Flag | GrResourceProvider::kRequireGpuMemory_Flag,
Chris Dalton84403d72018-02-13 21:46:17 -0500257 fView->fQuadPointInstances.begin()));
258 if (!fView->fQuadPointInstances.empty() && instBuff) {
259 proc.appendMesh(instBuff.get(), fView->fQuadPointInstances.count(), 0, &mesh);
Chris Daltona3e92712017-12-04 11:45:51 -0700260 }
Chris Daltona3e92712017-12-04 11:45:51 -0700261 } else {
Chris Dalton383a2ef2018-01-08 17:21:41 -0500262 sk_sp<GrBuffer> instBuff(rp->createBuffer(
Chris Dalton84403d72018-02-13 21:46:17 -0500263 fView->fTriPointInstances.count() * sizeof(TriPointInstance), kVertex_GrBufferType,
Chris Dalton383a2ef2018-01-08 17:21:41 -0500264 kDynamic_GrAccessPattern,
265 GrResourceProvider::kNoPendingIO_Flag | GrResourceProvider::kRequireGpuMemory_Flag,
Chris Dalton84403d72018-02-13 21:46:17 -0500266 fView->fTriPointInstances.begin()));
267 if (!fView->fTriPointInstances.empty() && instBuff) {
268 proc.appendMesh(instBuff.get(), fView->fTriPointInstances.count(), 0, &mesh);
Chris Daltona3e92712017-12-04 11:45:51 -0700269 }
Chris Dalton1a325d22017-07-14 15:17:41 -0600270 }
271
Robert Phillips2890fbf2017-07-26 15:48:41 -0400272 GrPipeline pipeline(state->drawOpArgs().fProxy, GrPipeline::ScissorState::kDisabled,
Chris Daltondf04ce22018-03-07 17:28:07 -0700273 SkBlendMode::kPlus);
Chris Dalton1a325d22017-07-14 15:17:41 -0600274
Chris Dalton1a325d22017-07-14 15:17:41 -0600275 if (glGpu) {
276 glGpu->handleDirtyContext();
Chris Daltondf04ce22018-03-07 17:28:07 -0700277 // GR_GL_CALL(glGpu->glInterface(), PolygonMode(GR_GL_FRONT_AND_BACK, GR_GL_LINE));
Chris Dalton1a325d22017-07-14 15:17:41 -0600278 GR_GL_CALL(glGpu->glInterface(), Enable(GR_GL_LINE_SMOOTH));
279 }
280
Chris Dalton23261772017-12-10 16:41:45 -0700281 if (!mesh.empty()) {
282 SkASSERT(1 == mesh.count());
283 state->rtCommandBuffer()->draw(pipeline, proc, mesh.begin(), nullptr, 1, this->bounds());
284 }
Chris Dalton1a325d22017-07-14 15:17:41 -0600285
286 if (glGpu) {
287 context->resetContext(kMisc_GrGLBackendState);
288 }
289}
290
291class CCPRGeometryView::Click : public SampleView::Click {
292public:
293 Click(SkView* target, int ptIdx) : SampleView::Click(target), fPtIdx(ptIdx) {}
294
295 void doClick(SkPoint points[]) {
296 if (fPtIdx >= 0) {
297 this->dragPoint(points, fPtIdx);
298 } else {
299 for (int i = 0; i < 4; ++i) {
300 this->dragPoint(points, i);
301 }
302 }
303 }
304
305private:
Chris Dalton383a2ef2018-01-08 17:21:41 -0500306 void dragPoint(SkPoint points[], int idx) {
Chris Dalton1a325d22017-07-14 15:17:41 -0600307 SkIPoint delta = fICurr - fIPrev;
308 points[idx] += SkPoint::Make(delta.x(), delta.y());
309 }
310
311 int fPtIdx;
312};
313
314SkView::Click* CCPRGeometryView::onFindClickHandler(SkScalar x, SkScalar y, unsigned) {
315 for (int i = 0; i < 4; ++i) {
Chris Daltondf04ce22018-03-07 17:28:07 -0700316 if (RenderPass::kCubics != fRenderPass && 2 == i) {
Chris Dalton1a325d22017-07-14 15:17:41 -0600317 continue;
318 }
319 if (fabs(x - fPoints[i].x()) < 20 && fabsf(y - fPoints[i].y()) < 20) {
320 return new Click(this, i);
321 }
322 }
323 return new Click(this, -1);
324}
325
326bool CCPRGeometryView::onClick(SampleView::Click* click) {
Chris Dalton383a2ef2018-01-08 17:21:41 -0500327 Click* myClick = (Click*)click;
Chris Dalton1a325d22017-07-14 15:17:41 -0600328 myClick->doClick(fPoints);
329 this->updateAndInval();
330 return true;
331}
332
333bool CCPRGeometryView::onQuery(SkEvent* evt) {
334 if (SampleCode::TitleQ(*evt)) {
335 SampleCode::TitleR(evt, "CCPRGeometry");
336 return true;
337 }
338 SkUnichar unichar;
339 if (SampleCode::CharQ(*evt, &unichar)) {
Chris Daltondf04ce22018-03-07 17:28:07 -0700340 if (unichar >= '1' && unichar <= '4') {
Chris Dalton6a3dbee2017-10-16 10:44:41 -0600341 fRenderPass = RenderPass(unichar - '1');
Chris Dalton1a325d22017-07-14 15:17:41 -0600342 this->updateAndInval();
343 return true;
344 }
345 if (unichar == 'D') {
346 SkDebugf(" SkPoint fPoints[4] = {\n");
Chris Dalton7f578bf2017-09-05 16:46:48 -0600347 SkDebugf(" {%ff, %ff},\n", fPoints[0].x(), fPoints[0].y());
348 SkDebugf(" {%ff, %ff},\n", fPoints[1].x(), fPoints[1].y());
349 SkDebugf(" {%ff, %ff},\n", fPoints[2].x(), fPoints[2].y());
350 SkDebugf(" {%ff, %ff}\n", fPoints[3].x(), fPoints[3].y());
Chris Dalton1a325d22017-07-14 15:17:41 -0600351 SkDebugf(" };\n");
352 return true;
353 }
354 }
355 return this->INHERITED::onQuery(evt);
356}
357
Chris Dalton383a2ef2018-01-08 17:21:41 -0500358DEF_SAMPLE(return new CCPRGeometryView;)
Chris Dalton1a325d22017-07-14 15:17:41 -0600359
Chris Dalton383a2ef2018-01-08 17:21:41 -0500360#endif // SK_SUPPORT_GPU