blob: 15baf8c3c79195d2ae15dc7942b1d188ebf99d7c [file] [log] [blame]
Michael Ludwig69858532018-11-28 15:34:34 -05001/*
2 * Copyright 2018 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 "GrFillRectOp.h"
9
10#include "GrGeometryProcessor.h"
11#include "GrMeshDrawOp.h"
12#include "GrPaint.h"
13#include "GrQuad.h"
14#include "GrQuadPerEdgeAA.h"
15#include "GrSimpleMeshDrawOpHelper.h"
16#include "SkMatrix.h"
17#include "SkRect.h"
18#include "glsl/GrGLSLColorSpaceXformHelper.h"
19#include "glsl/GrGLSLGeometryProcessor.h"
20#include "glsl/GrGLSLVarying.h"
21
22namespace {
23
24using VertexSpec = GrQuadPerEdgeAA::VertexSpec;
25using ColorType = GrQuadPerEdgeAA::ColorType;
26
27// NOTE: This info structure is intentionally modeled after GrTextureOps' Quad so that they can
28// more easily be integrated together in the future.
29class TransformedQuad {
30public:
31 TransformedQuad(const GrPerspQuad& deviceQuad, const GrPerspQuad& localQuad,
32 const SkPMColor4f& color, GrQuadAAFlags aaFlags)
33 : fDeviceQuad(deviceQuad)
34 , fLocalQuad(localQuad)
35 , fColor(color)
36 , fAAFlags(aaFlags) {}
37
38 const GrPerspQuad& deviceQuad() const { return fDeviceQuad; }
39 const GrPerspQuad& localQuad() const { return fLocalQuad; }
40 const SkPMColor4f& color() const { return fColor; }
41 GrQuadAAFlags aaFlags() const { return fAAFlags; }
42
43 void setColor(const SkPMColor4f& color) { fColor = color; }
44
45 SkString dumpInfo(int index) const {
46 SkString str;
47 str.appendf("%d: Color: [%.2f, %.2f, %.2f, %.2f], Edge AA: l%u_t%u_r%u_b%u, \n"
48 " device quad: [(%.2f, %2.f, %.2f), (%.2f, %.2f, %.2f), (%.2f, %.2f, %.2f), "
49 "(%.2f, %.2f, %.2f)],\n"
50 " local quad: [(%.2f, %2.f, %.2f), (%.2f, %.2f, %.2f), (%.2f, %.2f, %.2f), "
51 "(%.2f, %.2f, %.2f)]\n",
52 index, fColor.fR, fColor.fG, fColor.fB, fColor.fA,
53 (uint32_t) (fAAFlags & GrQuadAAFlags::kLeft),
54 (uint32_t) (fAAFlags & GrQuadAAFlags::kTop),
55 (uint32_t) (fAAFlags & GrQuadAAFlags::kRight),
56 (uint32_t) (fAAFlags & GrQuadAAFlags::kBottom),
57 fDeviceQuad.x(0), fDeviceQuad.y(0), fDeviceQuad.w(0),
58 fDeviceQuad.x(1), fDeviceQuad.y(1), fDeviceQuad.w(1),
59 fDeviceQuad.x(2), fDeviceQuad.y(2), fDeviceQuad.w(2),
60 fDeviceQuad.x(3), fDeviceQuad.y(3), fDeviceQuad.w(3),
61 fLocalQuad.x(0), fLocalQuad.y(0), fLocalQuad.w(0),
62 fLocalQuad.x(1), fLocalQuad.y(1), fLocalQuad.w(1),
63 fLocalQuad.x(2), fLocalQuad.y(2), fLocalQuad.w(2),
64 fLocalQuad.x(3), fLocalQuad.y(3), fLocalQuad.w(3));
65 return str;
66 }
67private:
68 // NOTE: The TransformedQuad does not store the types for device and local. The owning op tracks
69 // the most general type for device and local across all of its merged quads.
70 GrPerspQuad fDeviceQuad; // In device space, allowing rects to be combined across view matrices
71 GrPerspQuad fLocalQuad; // Original rect transformed by its local matrix
72 SkPMColor4f fColor;
73 GrQuadAAFlags fAAFlags;
74};
75
Michael Ludwig69858532018-11-28 15:34:34 -050076class FillRectOp final : public GrMeshDrawOp {
77private:
78 using Helper = GrSimpleMeshDrawOpHelperWithStencil;
79
80public:
81 static std::unique_ptr<GrDrawOp> Make(GrContext* context,
82 GrPaint&& paint,
83 GrAAType aaType,
84 GrQuadAAFlags edgeAA,
85 const GrUserStencilSettings* stencilSettings,
86 const GrPerspQuad& deviceQuad,
87 GrQuadType deviceQuadType,
88 const GrPerspQuad& localQuad,
89 GrQuadType localQuadType) {
90 // Clean up deviations between aaType and edgeAA
91 GrResolveAATypeForQuad(aaType, edgeAA, deviceQuad, deviceQuadType, &aaType, &edgeAA);
92
93 // Analyze the paint to see if it is compatible with scissor-clearing
94 SkPMColor4f color = paint.getColor4f();
95 // Only non-null if the paint can be turned into a clear, it can be a local pointer since
96 // the op ctor consumes the value right away if it's provided
97 SkPMColor4f* clearColor = nullptr;
98 if (paint.isTrivial() || paint.isConstantBlendedColor(&color)) {
99 clearColor = &color;
100 }
101
102 return Helper::FactoryHelper<FillRectOp>(context, std::move(paint), clearColor, aaType,
103 edgeAA, stencilSettings, deviceQuad, deviceQuadType, localQuad, localQuadType);
104 }
105
106 // Analysis of the GrPaint to determine the const blend color must be done before, passing
107 // nullptr for constBlendColor disables all scissor-clear optimizations (must keep the
108 // paintColor argument because it is assumed by the GrSimpleMeshDrawOpHelper). Similarly, aaType
109 // is passed to Helper in the initializer list, so incongruities between aaType and edgeFlags
110 // must be resolved prior to calling this constructor.
111 FillRectOp(Helper::MakeArgs args, SkPMColor4f paintColor, const SkPMColor4f* constBlendColor,
112 GrAAType aaType, GrQuadAAFlags edgeFlags, const GrUserStencilSettings* stencil,
113 const GrPerspQuad& deviceQuad, GrQuadType deviceQuadType,
114 const GrPerspQuad& localQuad, GrQuadType localQuadType)
115 : INHERITED(ClassID())
116 , fHelper(args, aaType, stencil)
117 , fDeviceQuadType(static_cast<unsigned>(deviceQuadType))
118 , fLocalQuadType(static_cast<unsigned>(localQuadType)) {
119 if (constBlendColor) {
120 // The GrPaint is compatible with clearing, and the constant blend color overrides the
121 // paint color (although in most cases they are probably the same)
122 paintColor = *constBlendColor;
123 // However, just because the paint is compatible, the device quad must also be a rect
124 // that is non-AA (AA aligned with pixel bounds should have already been turned into
125 // non-AA).
126 fClearCompatible = deviceQuadType == GrQuadType::kRect && aaType == GrAAType::kNone;
127 } else {
128 // Paint isn't clear compatible
129 fClearCompatible = false;
130 }
131
132 fWideColor = !SkPMColor4fFitsInBytes(paintColor);
133
134 // The color stored with the quad is the clear color if a scissor-clear is decided upon
135 // when executing the op.
136 fQuads.emplace_back(deviceQuad, localQuad, paintColor, edgeFlags);
137 this->setBounds(deviceQuad.bounds(), HasAABloat(aaType == GrAAType::kCoverage),
138 IsZeroArea::kNo);
139 }
140
141 const char* name() const override { return "FillRectOp"; }
142
143 void visitProxies(const VisitProxyFunc& func, VisitorType) const override {
144 return fHelper.visitProxies(func);
145 }
146
147#ifdef SK_DEBUG
148 SkString dumpInfo() const override {
149 SkString str;
150 str.appendf("# draws: %d\n", fQuads.count());
151 str.appendf("Clear compatible: %u\n", static_cast<bool>(fClearCompatible));
152 str.appendf("Device quad type: %u, local quad type: %u\n",
153 fDeviceQuadType, fLocalQuadType);
154 str += fHelper.dumpInfo();
155 for (int i = 0; i < fQuads.count(); i++) {
156 str += fQuads[i].dumpInfo(i);
157
158 }
159 str += INHERITED::dumpInfo();
160 return str;
161 }
162#endif
163
164 RequiresDstTexture finalize(const GrCaps& caps, const GrAppliedClip* clip) override {
165 // Initialize aggregate color analysis with the first quad's color (which always exists)
166 SkASSERT(fQuads.count() > 0);
167 GrProcessorAnalysisColor quadColors(fQuads[0].color());
168 // Then combine the colors of any additional quads (e.g. from MakeSet)
169 for (int i = 1; i < fQuads.count(); ++i) {
170 quadColors = GrProcessorAnalysisColor::Combine(quadColors, fQuads[i].color());
Michael Ludwigca91e1f2018-12-10 10:44:44 -0500171 if (quadColors.isUnknown()) {
172 // No point in accumulating additional starting colors, combining cannot make it
173 // less unknown.
174 break;
175 }
Michael Ludwig69858532018-11-28 15:34:34 -0500176 }
177 auto result = fHelper.xpRequiresDstTexture(
178 caps, clip, GrProcessorAnalysisCoverage::kSingleChannel, &quadColors);
179 // If there is a constant color after analysis, that means all of the quads should be set
180 // to the same color (even if they started out with different colors).
181 SkPMColor4f colorOverride;
182 if (quadColors.isConstant(&colorOverride)) {
183 for (int i = 0; i < fQuads.count(); ++i) {
184 fQuads[i].setColor(colorOverride);
185 }
186 }
187
188 return result;
189 }
190
191 FixedFunctionFlags fixedFunctionFlags() const override {
192 // Since the AA type of the whole primitive is kept consistent with the per edge AA flags
193 // the helper's fixed function flags are appropriate.
194 return fHelper.fixedFunctionFlags();
195 }
196
197 DEFINE_OP_CLASS_ID
198
199private:
200 // For GrFillRectOp::MakeSet's use of addQuad
201 // FIXME(reviewer): better to just make addQuad public?
202 friend std::unique_ptr<GrDrawOp> GrFillRectOp::MakeSet(GrContext* context, GrPaint&& paint,
203 GrAAType aaType, const SkMatrix& viewMatrix,
204 const GrRenderTargetContext::QuadSetEntry quads[], int quadCount,
205 const GrUserStencilSettings* stencilSettings);
206
207 void onPrepareDraws(Target* target) override {
208 TRACE_EVENT0("skia", TRACE_FUNC);
209
210 using Domain = GrQuadPerEdgeAA::Domain;
211 static constexpr SkRect kEmptyDomain = SkRect::MakeEmpty();
212
213 VertexSpec vertexSpec(this->deviceQuadType(),
214 fWideColor ? ColorType::kHalf : ColorType::kByte,
215 this->localQuadType(), fHelper.usesLocalCoords(), Domain::kNo,
216 fHelper.aaType());
217
Michael Ludwig467994d2018-12-03 14:58:31 +0000218 sk_sp<GrGeometryProcessor> gp = GrQuadPerEdgeAA::MakeProcessor(vertexSpec);
Michael Ludwig69858532018-11-28 15:34:34 -0500219 size_t vertexSize = gp->vertexStride();
220
221 const GrBuffer* vbuffer;
222 int vertexOffsetInBuffer = 0;
223
224 // Fill the allocated vertex data
225 void* vdata = target->makeVertexSpace(vertexSize, fQuads.count() * 4, &vbuffer,
226 &vertexOffsetInBuffer);
227 if (!vdata) {
228 SkDebugf("Could not allocate vertices\n");
229 return;
230 }
231
232 // vertices pointer advances through vdata based on Tessellate's return value
233 void* vertices = vdata;
234 for (int i = 0; i < fQuads.count(); ++i) {
235 const auto& q = fQuads[i];
236 vertices = GrQuadPerEdgeAA::Tessellate(vertices, vertexSpec, q.deviceQuad(), q.color(),
237 q.localQuad(), kEmptyDomain, q.aaFlags());
238 }
239
240 // Configure the mesh for the vertex data
241 GrMesh* mesh;
242 if (fQuads.count() > 1) {
243 mesh = target->allocMesh(GrPrimitiveType::kTriangles);
244 sk_sp<const GrBuffer> ibuffer = target->resourceProvider()->refQuadIndexBuffer();
245 if (!ibuffer) {
246 SkDebugf("Could not allocate quad indices\n");
247 return;
248 }
249 mesh->setIndexedPatterned(ibuffer.get(), 6, 4, fQuads.count(),
250 GrResourceProvider::QuadCountOfQuadBuffer());
251 } else {
252 mesh = target->allocMesh(GrPrimitiveType::kTriangleStrip);
253 mesh->setNonIndexedNonInstanced(4);
254 }
255 mesh->setVertexData(vbuffer, vertexOffsetInBuffer);
256
257 auto pipe = fHelper.makePipeline(target);
258 target->draw(std::move(gp), pipe.fPipeline, pipe.fFixedDynamicState, mesh);
259 }
260
261 CombineResult onCombineIfPossible(GrOp* t, const GrCaps& caps) override {
262 TRACE_EVENT0("skia", TRACE_FUNC);
263 const auto* that = t->cast<FillRectOp>();
264
265 // Unlike most users of the draw op helper, this op can merge none-aa and coverage-aa
266 // draw ops together, so pass true as the last argument.
267 if (!fHelper.isCompatible(that->fHelper, caps, this->bounds(), that->bounds(), true)) {
268 return CombineResult::kCannotCombine;
269 }
270
271 // If the processor sets are compatible, the two ops are always compatible; it just needs
272 // to adjust the state of the op to be the more general quad and aa types of the two ops.
273
274 // The GrQuadType enum is ordered such that higher values are more general quad types
275 if (that->fDeviceQuadType > fDeviceQuadType) {
276 fDeviceQuadType = that->fDeviceQuadType;
277 }
278 if (that->fLocalQuadType > fLocalQuadType) {
279 fLocalQuadType = that->fLocalQuadType;
280 }
281 fClearCompatible &= that->fClearCompatible;
282 fWideColor |= that->fWideColor;
283
284 // The helper stores the aa type, but isCompatible(with true arg) allows the two ops' aa
285 // types to be none and coverage, in which case this op's aa type must be lifted to coverage
286 // so that quads with no aa edges can be batched with quads that have some/all edges aa'ed.
287 if (fHelper.aaType() == GrAAType::kNone && that->fHelper.aaType() == GrAAType::kCoverage) {
288 fHelper.setAAType(GrAAType::kCoverage);
289 }
290
291 fQuads.push_back_n(that->fQuads.count(), that->fQuads.begin());
292 return CombineResult::kMerged;
293 }
294
295 // Similar to onCombineIfPossible, but adds a quad assuming its op would have been compatible.
296 // But since it's avoiding the op list management, it must update the op's bounds. This is only
297 // used with quad sets, which uses the same view matrix for each quad so this assumes that the
298 // device quad type of the new quad is the same as the op's.
299 void addQuad(TransformedQuad&& quad, GrQuadType localQuadType, GrAAType aaType) {
300 SkASSERT(quad.deviceQuad().quadType() <= this->deviceQuadType());
301
302 // The new quad's aa type should be the same as the first quad's or none, except when the
303 // first quad's aa type was already downgraded to none, in which case the stored type must
304 // be lifted to back to the requested type.
305 if (aaType != fHelper.aaType()) {
306 if (aaType != GrAAType::kNone) {
307 // Original quad was downgraded to non-aa, lift back up to this quad's required type
308 SkASSERT(fHelper.aaType() == GrAAType::kNone);
309 fHelper.setAAType(aaType);
310 }
311 // else the new quad could have been downgraded but the other quads can't be, so don't
312 // reset the op's accumulated aa type.
313 }
314
315 // The new quad's local coordinates could differ
316 if (localQuadType > this->localQuadType()) {
317 fLocalQuadType = static_cast<unsigned>(localQuadType);
318 }
319
320 // clear compatible won't need to be updated, since device quad type and paint is the same,
321 // but this quad has a new color, so maybe update wide color
322 fWideColor |= !SkPMColor4fFitsInBytes(quad.color());
323
324 // Update the bounds and add the quad to this op's storage
325 SkRect newBounds = this->bounds();
326 newBounds.joinPossiblyEmptyRect(quad.deviceQuad().bounds());
327 this->setBounds(newBounds, HasAABloat(fHelper.aaType() == GrAAType::kCoverage),
328 IsZeroArea::kNo);
329 fQuads.push_back(std::move(quad));
330 }
331
332 GrQuadType deviceQuadType() const { return static_cast<GrQuadType>(fDeviceQuadType); }
333 GrQuadType localQuadType() const { return static_cast<GrQuadType>(fLocalQuadType); }
334
335 Helper fHelper;
336 SkSTArray<1, TransformedQuad, true> fQuads;
337
338 // While we always store full GrPerspQuads in memory, if the type is known to be simpler we can
339 // optimize our geometry generation.
340 unsigned fDeviceQuadType: 2;
341 unsigned fLocalQuadType: 2;
342 unsigned fWideColor: 1;
343
344 // True if fQuad produced by a rectangle-preserving view matrix, is pixel aligned or non-AA,
345 // and its paint is a constant blended color.
346 unsigned fClearCompatible: 1;
347
348 typedef GrMeshDrawOp INHERITED;
349};
350
351} // anonymous namespace
352
353namespace GrFillRectOp {
354
355std::unique_ptr<GrDrawOp> Make(GrContext* context,
356 GrPaint&& paint,
357 GrAAType aaType,
358 GrQuadAAFlags edgeAA,
359 const SkMatrix& viewMatrix,
360 const SkRect& rect,
361 const GrUserStencilSettings* stencilSettings) {
362 return FillRectOp::Make(context, std::move(paint), aaType, edgeAA, stencilSettings,
363 GrPerspQuad(rect, viewMatrix), GrQuadTypeForTransformedRect(viewMatrix),
364 GrPerspQuad(rect, SkMatrix::I()), GrQuadType::kRect);
365}
366
367std::unique_ptr<GrDrawOp> MakeWithLocalMatrix(GrContext* context,
368 GrPaint&& paint,
369 GrAAType aaType,
370 GrQuadAAFlags edgeAA,
371 const SkMatrix& viewMatrix,
372 const SkMatrix& localMatrix,
373 const SkRect& rect,
374 const GrUserStencilSettings* stencilSettings) {
375 GrQuadType localQuadType = GrQuadTypeForTransformedRect(localMatrix);
376 return FillRectOp::Make(context, std::move(paint), aaType, edgeAA, stencilSettings,
377 GrPerspQuad(rect, viewMatrix), GrQuadTypeForTransformedRect(viewMatrix),
378 GrPerspQuad(rect, localMatrix), localQuadType);
379}
380
381std::unique_ptr<GrDrawOp> MakeWithLocalRect(GrContext* context,
382 GrPaint&& paint,
383 GrAAType aaType,
384 GrQuadAAFlags edgeAA,
385 const SkMatrix& viewMatrix,
386 const SkRect& rect,
387 const SkRect& localRect,
388 const GrUserStencilSettings* stencilSettings) {
389 return FillRectOp::Make(context, std::move(paint), aaType, edgeAA, stencilSettings,
390 GrPerspQuad(rect, viewMatrix), GrQuadTypeForTransformedRect(viewMatrix),
391 GrPerspQuad(localRect, SkMatrix::I()), GrQuadType::kRect);
392}
393
394std::unique_ptr<GrDrawOp> MakeSet(GrContext* context,
395 GrPaint&& paint,
396 GrAAType aaType,
397 const SkMatrix& viewMatrix,
398 const GrRenderTargetContext::QuadSetEntry quads[],
399 int cnt,
400 const GrUserStencilSettings* stencilSettings) {
401 // First make a draw op for the first quad in the set
402 SkASSERT(cnt > 0);
403 GrQuadType deviceQuadType = GrQuadTypeForTransformedRect(viewMatrix);
404
405 paint.setColor4f(quads[0].fColor);
406 std::unique_ptr<GrDrawOp> op = FillRectOp::Make(context, std::move(paint), aaType,
407 quads[0].fAAFlags, stencilSettings, GrPerspQuad(quads[0].fRect, viewMatrix),
408 deviceQuadType, GrPerspQuad(quads[0].fRect, quads[0].fLocalMatrix),
409 GrQuadTypeForTransformedRect(quads[0].fLocalMatrix));
410 auto* fillRects = op->cast<FillRectOp>();
411
412 // Accumulate remaining quads similar to onCombineIfPossible() without creating an op
413 for (int i = 1; i < cnt; ++i) {
414 GrPerspQuad deviceQuad(quads[i].fRect, viewMatrix);
415
416 GrAAType resolvedAA;
417 GrQuadAAFlags resolvedEdgeFlags;
418 GrResolveAATypeForQuad(aaType, quads[i].fAAFlags, deviceQuad, deviceQuadType,
419 &resolvedAA, &resolvedEdgeFlags);
420
421 fillRects->addQuad({ deviceQuad, GrPerspQuad(quads[i].fRect, quads[i].fLocalMatrix),
422 quads[i].fColor, resolvedEdgeFlags },
423 GrQuadTypeForTransformedRect(quads[i].fLocalMatrix), resolvedAA);
424 }
425
426 return op;
427}
428
429} // namespace GrFillRectOp
430
431#if GR_TEST_UTILS
432
433#include "GrDrawOpTest.h"
434#include "SkGr.h"
435
436GR_DRAW_OP_TEST_DEFINE(FillRectOp) {
437 SkMatrix viewMatrix = GrTest::TestMatrixInvertible(random);
438 SkRect rect = GrTest::TestRect(random);
439
440 GrAAType aaType = GrAAType::kNone;
441 if (random->nextBool()) {
442 aaType = (fsaaType == GrFSAAType::kUnifiedMSAA) ? GrAAType::kMSAA : GrAAType::kCoverage;
443 }
444 const GrUserStencilSettings* stencil = random->nextBool() ? nullptr
445 : GrGetRandomStencil(random, context);
446
447 GrQuadAAFlags aaFlags = GrQuadAAFlags::kNone;
448 aaFlags |= random->nextBool() ? GrQuadAAFlags::kLeft : GrQuadAAFlags::kNone;
449 aaFlags |= random->nextBool() ? GrQuadAAFlags::kTop : GrQuadAAFlags::kNone;
450 aaFlags |= random->nextBool() ? GrQuadAAFlags::kRight : GrQuadAAFlags::kNone;
451 aaFlags |= random->nextBool() ? GrQuadAAFlags::kBottom : GrQuadAAFlags::kNone;
452
453 if (random->nextBool()) {
454 if (random->nextBool()) {
455 if (random->nextBool()) {
456 // Local matrix with a set op
457 uint32_t extraQuadCt = random->nextRangeU(1, 4);
458 SkTArray<GrRenderTargetContext::QuadSetEntry> quads(extraQuadCt + 1);
459 quads.push_back(
460 {rect, SkPMColor4f::FromBytes_RGBA(SkColorToPremulGrColor(random->nextU())),
461 GrTest::TestMatrixInvertible(random), aaFlags});
462 for (uint32_t i = 0; i < extraQuadCt; ++i) {
463 GrQuadAAFlags aaFlags = GrQuadAAFlags::kNone;
464 aaFlags |= random->nextBool() ? GrQuadAAFlags::kLeft : GrQuadAAFlags::kNone;
465 aaFlags |= random->nextBool() ? GrQuadAAFlags::kTop : GrQuadAAFlags::kNone;
466 aaFlags |= random->nextBool() ? GrQuadAAFlags::kRight : GrQuadAAFlags::kNone;
467 aaFlags |= random->nextBool() ? GrQuadAAFlags::kBottom : GrQuadAAFlags::kNone;
468
469 quads.push_back(
470 {GrTest::TestRect(random),
471 SkPMColor4f::FromBytes_RGBA(SkColorToPremulGrColor(random->nextU())),
472 GrTest::TestMatrixInvertible(random), aaFlags});
473 }
474
475 return GrFillRectOp::MakeSet(context, std::move(paint), aaType, viewMatrix,
476 quads.begin(), quads.count(), stencil);
477 } else {
478 // Single local matrix
479 SkMatrix localMatrix = GrTest::TestMatrixInvertible(random);
480 return GrFillRectOp::MakeWithLocalMatrix(context, std::move(paint), aaType, aaFlags,
481 viewMatrix, localMatrix, rect, stencil);
482 }
483 } else {
484 // Pass local rect directly
485 SkRect localRect = GrTest::TestRect(random);
486 return GrFillRectOp::MakeWithLocalRect(context, std::move(paint), aaType, aaFlags,
487 viewMatrix, rect, localRect, stencil);
488 }
489 } else {
490 // The simplest constructor
491 return GrFillRectOp::Make(context, std::move(paint), aaType, aaFlags, viewMatrix, rect,
492 stencil);
493 }
494}
495
496#endif