blob: d192ff7430a0bd6d265386f9d527d67a55364a36 [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 "GrCCPRCoverageProcessor.h"
9
Robert Phillips2890fbf2017-07-26 15:48:41 -040010#include "GrRenderTargetProxy.h"
Chris Dalton1a325d22017-07-14 15:17:41 -060011#include "ccpr/GrCCPRTriangleProcessor.h"
12#include "ccpr/GrCCPRQuadraticProcessor.h"
13#include "ccpr/GrCCPRCubicProcessor.h"
14#include "glsl/GrGLSLFragmentShaderBuilder.h"
15#include "glsl/GrGLSLGeometryShaderBuilder.h"
16#include "glsl/GrGLSLProgramBuilder.h"
17#include "glsl/GrGLSLVertexShaderBuilder.h"
18
19const char* GrCCPRCoverageProcessor::GetProcessorName(Mode mode) {
20 switch (mode) {
21 case Mode::kTriangleHulls:
22 return "GrCCPRTriangleHullAndEdgeProcessor (hulls)";
23 case Mode::kTriangleEdges:
24 return "GrCCPRTriangleHullAndEdgeProcessor (edges)";
25 case Mode::kCombinedTriangleHullsAndEdges:
26 return "GrCCPRTriangleHullAndEdgeProcessor (combined hulls & edges)";
27 case Mode::kTriangleCorners:
28 return "GrCCPRTriangleCornerProcessor";
29 case Mode::kQuadraticHulls:
30 return "GrCCPRQuadraticHullProcessor";
Chris Daltonb072bb62017-08-07 09:00:46 -060031 case Mode::kQuadraticCorners:
32 return "GrCCPRQuadraticCornerProcessor";
Chris Dalton1a325d22017-07-14 15:17:41 -060033 case Mode::kSerpentineInsets:
34 return "GrCCPRCubicInsetProcessor (serpentine)";
35 case Mode::kSerpentineBorders:
36 return "GrCCPRCubicBorderProcessor (serpentine)";
37 case Mode::kLoopInsets:
38 return "GrCCPRCubicInsetProcessor (loop)";
39 case Mode::kLoopBorders:
40 return "GrCCPRCubicBorderProcessor (loop)";
41 }
Ben Wagnerb4aab9a2017-08-16 10:53:04 -040042 SK_ABORT("Unexpected ccpr coverage processor mode.");
Chris Dalton1a325d22017-07-14 15:17:41 -060043 return nullptr;
44}
45
46GrCCPRCoverageProcessor::GrCCPRCoverageProcessor(Mode mode, GrBuffer* pointsBuffer)
47 : fMode(mode)
48 , fInstanceAttrib(this->addInstanceAttrib("instance", kVec4i_GrVertexAttribType,
49 kHigh_GrSLPrecision)) {
50 fPointsBufferAccess.reset(kRG_float_GrPixelConfig, pointsBuffer, kVertex_GrShaderFlag);
51 this->addBufferAccess(&fPointsBufferAccess);
52
53 this->setWillUseGeoShader();
54
55 this->initClassID<GrCCPRCoverageProcessor>();
56}
57
58void GrCCPRCoverageProcessor::getGLSLProcessorKey(const GrShaderCaps&,
59 GrProcessorKeyBuilder* b) const {
60 b->add32(int(fMode));
61}
62
63GrGLSLPrimitiveProcessor* GrCCPRCoverageProcessor::createGLSLInstance(const GrShaderCaps&) const {
64 switch (fMode) {
65 using GeometryType = GrCCPRTriangleHullAndEdgeProcessor::GeometryType;
66
67 case Mode::kTriangleHulls:
68 return new GrCCPRTriangleHullAndEdgeProcessor(GeometryType::kHulls);
69 case Mode::kTriangleEdges:
70 return new GrCCPRTriangleHullAndEdgeProcessor(GeometryType::kEdges);
71 case Mode::kCombinedTriangleHullsAndEdges:
72 return new GrCCPRTriangleHullAndEdgeProcessor(GeometryType::kHullsAndEdges);
73 case Mode::kTriangleCorners:
74 return new GrCCPRTriangleCornerProcessor();
75 case Mode::kQuadraticHulls:
76 return new GrCCPRQuadraticHullProcessor();
Chris Daltonb072bb62017-08-07 09:00:46 -060077 case Mode::kQuadraticCorners:
78 return new GrCCPRQuadraticCornerProcessor();
Chris Dalton1a325d22017-07-14 15:17:41 -060079 case Mode::kSerpentineInsets:
80 return new GrCCPRCubicInsetProcessor(GrCCPRCubicProcessor::Type::kSerpentine);
81 case Mode::kSerpentineBorders:
82 return new GrCCPRCubicBorderProcessor(GrCCPRCubicProcessor::Type::kSerpentine);
83 case Mode::kLoopInsets:
84 return new GrCCPRCubicInsetProcessor(GrCCPRCubicProcessor::Type::kLoop);
85 case Mode::kLoopBorders:
86 return new GrCCPRCubicBorderProcessor(GrCCPRCubicProcessor::Type::kLoop);
87 }
Ben Wagnerb4aab9a2017-08-16 10:53:04 -040088 SK_ABORT("Unexpected ccpr coverage processor mode.");
Chris Dalton1a325d22017-07-14 15:17:41 -060089 return nullptr;
90}
91
92using PrimitiveProcessor = GrCCPRCoverageProcessor::PrimitiveProcessor;
93
94void PrimitiveProcessor::onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) {
95 const GrCCPRCoverageProcessor& proc = args.fGP.cast<GrCCPRCoverageProcessor>();
96
97 GrGLSLVaryingHandler* varyingHandler = args.fVaryingHandler;
98 switch (fCoverageType) {
99 case CoverageType::kOne:
100 case CoverageType::kShader:
101 varyingHandler->addFlatVarying("wind", &fFragWind, kLow_GrSLPrecision);
102 break;
103 case CoverageType::kInterpolated:
104 varyingHandler->addVarying("coverage_times_wind", &fFragCoverageTimesWind,
105 kMedium_GrSLPrecision);
106 break;
107 }
108 this->resetVaryings(varyingHandler);
109
110 varyingHandler->emitAttributes(proc);
111
112 this->emitVertexShader(proc, args.fVertBuilder, args.fTexelBuffers[0], args.fRTAdjustName,
113 gpArgs);
114 this->emitGeometryShader(proc, args.fGeomBuilder, args.fRTAdjustName);
115 this->emitCoverage(proc, args.fFragBuilder, args.fOutputColor, args.fOutputCoverage);
116
117 SkASSERT(!args.fFPCoordTransformHandler->nextCoordTransform());
118}
119
120void PrimitiveProcessor::emitVertexShader(const GrCCPRCoverageProcessor& proc,
121 GrGLSLVertexBuilder* v,
122 const TexelBufferHandle& pointsBuffer,
123 const char* rtAdjust, GrGPArgs* gpArgs) const {
124 v->codeAppendf("int packedoffset = %s.w;", proc.instanceAttrib());
Ethan Nicholas88d99c62017-08-16 16:41:30 -0400125 v->codeAppend ("highfloat2 atlasoffset = highfloat2((packedoffset<<16) >> 16, "
126 "packedoffset >> 16);");
Chris Dalton1a325d22017-07-14 15:17:41 -0600127
128 this->onEmitVertexShader(proc, v, pointsBuffer, "atlasoffset", rtAdjust, gpArgs);
129}
130
131void PrimitiveProcessor::emitGeometryShader(const GrCCPRCoverageProcessor& proc,
132 GrGLSLGeometryBuilder* g, const char* rtAdjust) const {
133 g->declareGlobal(fGeomWind);
134 this->emitWind(g, rtAdjust, fGeomWind.c_str());
135
136 SkString emitVertexFn;
137 SkSTArray<2, GrShaderVar> emitArgs;
Ethan Nicholas88d99c62017-08-16 16:41:30 -0400138 const char* position = emitArgs.emplace_back("position", kHighFloat2_GrSLType,
139 GrShaderVar::kNonArray).c_str();
140 const char* coverage = emitArgs.emplace_back("coverage", kHighFloat_GrSLType,
141 GrShaderVar::kNonArray).c_str();
Chris Dalton1a325d22017-07-14 15:17:41 -0600142 g->emitFunction(kVoid_GrSLType, "emitVertex", emitArgs.count(), emitArgs.begin(), [&]() {
143 SkString fnBody;
144 this->emitPerVertexGeometryCode(&fnBody, position, coverage, fGeomWind.c_str());
145 if (fFragWind.gsOut()) {
146 fnBody.appendf("%s = %s;", fFragWind.gsOut(), fGeomWind.c_str());
147 }
148 if (fFragCoverageTimesWind.gsOut()) {
149 fnBody.appendf("%s = %s * %s;",
150 fFragCoverageTimesWind.gsOut(), coverage, fGeomWind.c_str());
151 }
Ethan Nicholas88d99c62017-08-16 16:41:30 -0400152 fnBody.append ("gl_Position = highfloat4(position, 0, 1);");
Chris Dalton1a325d22017-07-14 15:17:41 -0600153 fnBody.append ("EmitVertex();");
154 return fnBody;
155 }().c_str(), &emitVertexFn);
156
Ethan Nicholas88d99c62017-08-16 16:41:30 -0400157 g->codeAppendf("highfloat2 bloat = %f * abs(%s.xz);", kAABloatRadius, rtAdjust);
Chris Dalton1a325d22017-07-14 15:17:41 -0600158
159#ifdef SK_DEBUG
160 if (proc.debugVisualizations()) {
161 g->codeAppendf("bloat *= %f;", GrCCPRCoverageProcessor::kDebugBloat);
162 }
163#endif
164
165 return this->onEmitGeometryShader(g, emitVertexFn.c_str(), fGeomWind.c_str(), rtAdjust);
166}
167
168int PrimitiveProcessor::emitHullGeometry(GrGLSLGeometryBuilder* g, const char* emitVertexFn,
169 const char* polygonPts, int numSides,
170 const char* wedgeIdx, const char* insetPts) const {
171 SkASSERT(numSides >= 3);
172
173 if (!insetPts) {
Ethan Nicholas88d99c62017-08-16 16:41:30 -0400174 g->codeAppendf("highfloat2 centroidpt = %s * highfloat%i(%f);",
Chris Dalton1a325d22017-07-14 15:17:41 -0600175 polygonPts, numSides, 1.0 / numSides);
176 }
177
178 g->codeAppendf("int previdx = (%s + %i) %% %i, "
179 "nextidx = (%s + 1) %% %i;",
180 wedgeIdx, numSides - 1, numSides, wedgeIdx, numSides);
181
Ethan Nicholas88d99c62017-08-16 16:41:30 -0400182 g->codeAppendf("highfloat2 self = %s[%s];"
183 "int leftidx = %s > 0 ? previdx : nextidx;"
184 "int rightidx = %s > 0 ? nextidx : previdx;",
Chris Dalton1a325d22017-07-14 15:17:41 -0600185 polygonPts, wedgeIdx, fGeomWind.c_str(), fGeomWind.c_str());
186
187 // Which quadrant does the vector from self -> right fall into?
Ethan Nicholas88d99c62017-08-16 16:41:30 -0400188 g->codeAppendf("highfloat2 right = %s[rightidx];", polygonPts);
Chris Dalton1a325d22017-07-14 15:17:41 -0600189 if (3 == numSides) {
190 // TODO: evaluate perf gains.
Ethan Nicholas88d99c62017-08-16 16:41:30 -0400191 g->codeAppend ("highfloat2 qsr = sign(right - self);");
Chris Dalton1a325d22017-07-14 15:17:41 -0600192 } else {
193 SkASSERT(4 == numSides);
Ethan Nicholas88d99c62017-08-16 16:41:30 -0400194 g->codeAppendf("highfloat2 diag = %s[(%s + 2) %% 4];", polygonPts, wedgeIdx);
195 g->codeAppend ("highfloat2 qsr = sign((right != self ? right : diag) - self);");
Chris Dalton1a325d22017-07-14 15:17:41 -0600196 }
197
198 // Which quadrant does the vector from left -> self fall into?
Ethan Nicholas88d99c62017-08-16 16:41:30 -0400199 g->codeAppendf("highfloat2 qls = sign(self - %s[leftidx]);", polygonPts);
Chris Dalton1a325d22017-07-14 15:17:41 -0600200
201 // d2 just helps us reduce triangle counts with orthogonal, axis-aligned lines.
202 // TODO: evaluate perf gains.
203 const char* dr2 = "dr";
204 if (3 == numSides) {
205 // TODO: evaluate perf gains.
Ethan Nicholas88d99c62017-08-16 16:41:30 -0400206 g->codeAppend ("highfloat2 dr = highfloat2(qsr.y != 0 ? +qsr.y : +qsr.x, "
207 "qsr.x != 0 ? -qsr.x : +qsr.y);");
208 g->codeAppend ("highfloat2 dr2 = highfloat2(qsr.y != 0 ? +qsr.y : -qsr.x, "
209 "qsr.x != 0 ? -qsr.x : -qsr.y);");
210 g->codeAppend ("highfloat2 dl = highfloat2(qls.y != 0 ? +qls.y : +qls.x, "
211 "qls.x != 0 ? -qls.x : +qls.y);");
Chris Dalton1a325d22017-07-14 15:17:41 -0600212 dr2 = "dr2";
213 } else {
Ethan Nicholas88d99c62017-08-16 16:41:30 -0400214 g->codeAppend ("highfloat2 dr = highfloat2(qsr.y != 0 ? +qsr.y : 1, "
215 "qsr.x != 0 ? -qsr.x : 1);");
216 g->codeAppend ("highfloat2 dl = (qls == highfloat2(0)) ? dr : "
217 "highfloat2(qls.y != 0 ? +qls.y : 1, qls.x != 0 ? -qls.x : 1);");
Chris Dalton1a325d22017-07-14 15:17:41 -0600218 }
Ethan Nicholas5af9ea32017-07-28 15:19:46 -0400219 g->codeAppendf("bool2 dnotequal = notEqual(%s, dl);", dr2);
Chris Dalton1a325d22017-07-14 15:17:41 -0600220
221 // Emit one third of what is the convex hull of pixel-size boxes centered on the vertices.
222 // Each invocation emits a different third.
223 if (insetPts) {
224 g->codeAppendf("%s(%s[rightidx], 1);", emitVertexFn, insetPts);
225 }
226 g->codeAppendf("%s(right + bloat * dr, 1);", emitVertexFn);
227 if (insetPts) {
228 g->codeAppendf("%s(%s[%s], 1);", emitVertexFn, insetPts, wedgeIdx);
229 } else {
230 g->codeAppendf("%s(centroidpt, 1);", emitVertexFn);
231 }
232 g->codeAppendf("%s(self + bloat * %s, 1);", emitVertexFn, dr2);
233 g->codeAppend ("if (any(dnotequal)) {");
234 g->codeAppendf( "%s(self + bloat * dl, 1);", emitVertexFn);
235 g->codeAppend ("}");
236 g->codeAppend ("if (all(dnotequal)) {");
Ethan Nicholas88d99c62017-08-16 16:41:30 -0400237 g->codeAppendf( "%s(self + bloat * highfloat2(-dl.y, dl.x), 1);", emitVertexFn);
Chris Dalton1a325d22017-07-14 15:17:41 -0600238 g->codeAppend ("}");
239 g->codeAppend ("EndPrimitive();");
240
241 return insetPts ? 6 : 5;
242}
243
244int PrimitiveProcessor::emitEdgeGeometry(GrGLSLGeometryBuilder* g, const char* emitVertexFn,
245 const char* leftPt, const char* rightPt,
246 const char* distanceEquation) const {
247 if (!distanceEquation) {
Ethan Nicholas88d99c62017-08-16 16:41:30 -0400248 this->emitEdgeDistanceEquation(g, leftPt, rightPt, "highfloat3 edge_distance_equation");
Chris Dalton1a325d22017-07-14 15:17:41 -0600249 distanceEquation = "edge_distance_equation";
250 }
251
252 // qlr is defined in emitEdgeDistanceEquation.
Ethan Nicholas88d99c62017-08-16 16:41:30 -0400253 g->codeAppendf("highfloat2x2 endpts = highfloat2x2(%s - bloat * qlr, %s + bloat * qlr);",
Chris Dalton1a325d22017-07-14 15:17:41 -0600254 leftPt, rightPt);
Ethan Nicholas88d99c62017-08-16 16:41:30 -0400255 g->codeAppendf("half2 endpts_coverage = %s.xy * endpts + %s.z;",
Chris Dalton1a325d22017-07-14 15:17:41 -0600256 distanceEquation, distanceEquation);
257
258 // d1 is defined in emitEdgeDistanceEquation.
Ethan Nicholas88d99c62017-08-16 16:41:30 -0400259 g->codeAppend ("highfloat2 d2 = d1;");
Chris Dalton1a325d22017-07-14 15:17:41 -0600260 g->codeAppend ("bool aligned = qlr.x == 0 || qlr.y == 0;");
261 g->codeAppend ("if (aligned) {");
262 g->codeAppend ( "d1 -= qlr;");
263 g->codeAppend ( "d2 += qlr;");
264 g->codeAppend ("}");
265
266 // Emit the convex hull of 2 pixel-size boxes centered on the endpoints of the edge. Each
267 // invocation emits a different edge. Emit negative coverage that subtracts the appropiate
268 // amount back out from the hull we drew above.
269 g->codeAppend ("if (!aligned) {");
270 g->codeAppendf( "%s(endpts[0], endpts_coverage[0]);", emitVertexFn);
271 g->codeAppend ("}");
272 g->codeAppendf("%s(%s + bloat * d1, -1);", emitVertexFn, leftPt);
273 g->codeAppendf("%s(%s - bloat * d2, 0);", emitVertexFn, leftPt);
274 g->codeAppendf("%s(%s + bloat * d2, -1);", emitVertexFn, rightPt);
275 g->codeAppendf("%s(%s - bloat * d1, 0);", emitVertexFn, rightPt);
276 g->codeAppend ("if (!aligned) {");
277 g->codeAppendf( "%s(endpts[1], endpts_coverage[1]);", emitVertexFn);
278 g->codeAppend ("}");
279 g->codeAppend ("EndPrimitive();");
280
281 return 6;
282}
283
284void PrimitiveProcessor::emitEdgeDistanceEquation(GrGLSLGeometryBuilder* g,
285 const char* leftPt, const char* rightPt,
286 const char* outputDistanceEquation) const {
287 // Which quadrant does the vector from left -> right fall into?
Ethan Nicholas88d99c62017-08-16 16:41:30 -0400288 g->codeAppendf("highfloat2 qlr = sign(%s - %s);", rightPt, leftPt);
289 g->codeAppend ("highfloat2 d1 = highfloat2(qlr.y, -qlr.x);");
Chris Dalton1a325d22017-07-14 15:17:41 -0600290
Ethan Nicholas88d99c62017-08-16 16:41:30 -0400291 g->codeAppendf("highfloat2 n = highfloat2(%s.y - %s.y, %s.x - %s.x);",
Chris Dalton1a325d22017-07-14 15:17:41 -0600292 rightPt, leftPt, leftPt, rightPt);
Ethan Nicholas88d99c62017-08-16 16:41:30 -0400293 g->codeAppendf("highfloat2 kk = n * highfloat2x2(%s + bloat * d1, %s - bloat * d1);",
Ethan Nicholas5af9ea32017-07-28 15:19:46 -0400294 leftPt, leftPt);
Chris Dalton1a325d22017-07-14 15:17:41 -0600295 // Clamp for when n=0. wind=0 when n=0 so as long as we don't get Inf or NaN we are fine.
Ethan Nicholas88d99c62017-08-16 16:41:30 -0400296 g->codeAppendf("highfloat scale = 1 / max(kk[0] - kk[1], 1e-30);");
Chris Dalton1a325d22017-07-14 15:17:41 -0600297
Ethan Nicholas88d99c62017-08-16 16:41:30 -0400298 g->codeAppendf("%s = half3(-n, kk[1]) * scale;", outputDistanceEquation);
Chris Dalton1a325d22017-07-14 15:17:41 -0600299}
300
Chris Daltonb072bb62017-08-07 09:00:46 -0600301int PrimitiveProcessor::emitCornerGeometry(GrGLSLGeometryBuilder* g, const char* emitVertexFn,
302 const char* pt) const {
Ethan Nicholas88d99c62017-08-16 16:41:30 -0400303 g->codeAppendf("%s(%s + highfloat2(-bloat.x, -bloat.y), 1);", emitVertexFn, pt);
304 g->codeAppendf("%s(%s + highfloat2(-bloat.x, +bloat.y), 1);", emitVertexFn, pt);
305 g->codeAppendf("%s(%s + highfloat2(+bloat.x, -bloat.y), 1);", emitVertexFn, pt);
306 g->codeAppendf("%s(%s + highfloat2(+bloat.x, +bloat.y), 1);", emitVertexFn, pt);
Chris Daltonb072bb62017-08-07 09:00:46 -0600307 g->codeAppend ("EndPrimitive();");
308
309 return 4;
310}
311
Chris Dalton1a325d22017-07-14 15:17:41 -0600312void PrimitiveProcessor::emitCoverage(const GrCCPRCoverageProcessor& proc, GrGLSLFragmentBuilder* f,
313 const char* outputColor, const char* outputCoverage) const {
314 switch (fCoverageType) {
315 case CoverageType::kOne:
316 f->codeAppendf("%s.a = %s;", outputColor, fFragWind.fsIn());
317 break;
318 case CoverageType::kInterpolated:
319 f->codeAppendf("%s.a = %s;", outputColor, fFragCoverageTimesWind.fsIn());
320 break;
321 case CoverageType::kShader:
Ethan Nicholas88d99c62017-08-16 16:41:30 -0400322 f->codeAppendf("half coverage = 0;");
Chris Dalton1a325d22017-07-14 15:17:41 -0600323 this->emitShaderCoverage(f, "coverage");
324 f->codeAppendf("%s.a = coverage * %s;", outputColor, fFragWind.fsIn());
325 break;
326 }
327
Ethan Nicholas88d99c62017-08-16 16:41:30 -0400328 f->codeAppendf("%s = half4(1);", outputCoverage);
Chris Dalton1a325d22017-07-14 15:17:41 -0600329
330#ifdef SK_DEBUG
331 if (proc.debugVisualizations()) {
Ethan Nicholas88d99c62017-08-16 16:41:30 -0400332 f->codeAppendf("%s = half4(-%s.a, %s.a, 0, 1);", outputColor, outputColor, outputColor);
Chris Dalton1a325d22017-07-14 15:17:41 -0600333 }
334#endif
335}
336
337int PrimitiveProcessor::defineSoftSampleLocations(GrGLSLFragmentBuilder* f,
338 const char* samplesName) const {
339 // Standard DX11 sample locations.
340#if defined(SK_BUILD_FOR_ANDROID) || defined(SK_BUILD_FOR_IOS)
Ethan Nicholas88d99c62017-08-16 16:41:30 -0400341 f->defineConstant("highfloat2[8]", samplesName, "highfloat2[8]("
342 "highfloat2(+1, -3)/16, highfloat2(-1, +3)/16, highfloat2(+5, +1)/16, highfloat2(-3, -5)/16, "
343 "highfloat2(-5, +5)/16, highfloat2(-7, -1)/16, highfloat2(+3, +7)/16, highfloat2(+7, -7)/16."
Chris Dalton1a325d22017-07-14 15:17:41 -0600344 ")");
345 return 8;
346#else
Ethan Nicholas88d99c62017-08-16 16:41:30 -0400347 f->defineConstant("highfloat2[16]", samplesName, "highfloat2[16]("
348 "highfloat2(+1, +1)/16, highfloat2(-1, -3)/16, highfloat2(-3, +2)/16, highfloat2(+4, -1)/16, "
349 "highfloat2(-5, -2)/16, highfloat2(+2, +5)/16, highfloat2(+5, +3)/16, highfloat2(+3, -5)/16, "
350 "highfloat2(-2, +6)/16, highfloat2( 0, -7)/16, highfloat2(-4, -6)/16, highfloat2(-6, +4)/16, "
351 "highfloat2(-8, 0)/16, highfloat2(+7, -4)/16, highfloat2(+6, +7)/16, highfloat2(-7, -8)/16."
Chris Dalton1a325d22017-07-14 15:17:41 -0600352 ")");
353 return 16;
354#endif
355}
356
357#ifdef SK_DEBUG
358
359#include "GrRenderTarget.h"
360
Robert Phillips2890fbf2017-07-26 15:48:41 -0400361void GrCCPRCoverageProcessor::Validate(GrRenderTargetProxy* atlasProxy) {
362 SkASSERT(kAtlasOrigin == atlasProxy->origin());
363 SkASSERT(GrPixelConfigIsAlphaOnly(atlasProxy->config()));
364 SkASSERT(GrPixelConfigIsFloatingPoint(atlasProxy->config()));
Chris Dalton1a325d22017-07-14 15:17:41 -0600365}
366
367#endif