blob: f783259457a2aafae06894d6b72391861087ff52 [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 "GrCoverageCountingPathRenderer.h"
9
10#include "GrCaps.h"
11#include "GrClip.h"
Robert Phillips777707b2018-01-17 11:40:14 -050012#include "GrProxyProvider.h"
Chris Dalton1a325d22017-07-14 15:17:41 -060013#include "SkMakeUnique.h"
Chris Daltona039d3b2017-09-28 11:16:36 -060014#include "SkPathOps.h"
Chris Dalton383a2ef2018-01-08 17:21:41 -050015#include "ccpr/GrCCClipProcessor.h"
Chris Daltond7e22272018-05-23 10:17:17 -060016#include "ccpr/GrCCDrawPathsOp.h"
Chris Daltona2b5b642018-06-24 13:08:57 -060017#include "ccpr/GrCCPathCache.h"
Chris Dalton1a325d22017-07-14 15:17:41 -060018
Chris Dalton5ba36ba2018-05-09 01:08:38 -060019using PathInstance = GrCCPathProcessor::Instance;
Chris Daltona32a3c32017-12-05 10:05:21 -070020
21// If a path spans more pixels than this, we need to crop it or else analytic AA can run out of fp32
22// precision.
23static constexpr float kPathCropThreshold = 1 << 16;
24
25static void crop_path(const SkPath& path, const SkIRect& cropbox, SkPath* out) {
Chris Dalton5ba36ba2018-05-09 01:08:38 -060026 SkPath cropboxPath;
27 cropboxPath.addRect(SkRect::Make(cropbox));
28 if (!Op(cropboxPath, path, kIntersect_SkPathOp, out)) {
Chris Daltona32a3c32017-12-05 10:05:21 -070029 // This can fail if the PathOps encounter NaN or infinities.
30 out->reset();
31 }
Chris Dalton5ba36ba2018-05-09 01:08:38 -060032 out->setIsVolatile(true);
Chris Daltona32a3c32017-12-05 10:05:21 -070033}
Chris Dalton1a325d22017-07-14 15:17:41 -060034
Robert Phillips774168e2018-05-31 12:43:27 -040035
36GrCCPerOpListPaths::~GrCCPerOpListPaths() {
37 // Ensure there are no surviving DrawPathsOps with a dangling pointer into this class.
38 if (!fDrawOps.isEmpty()) {
39 SK_ABORT("GrCCDrawPathsOp(s) not deleted during flush");
40 }
41 // Clip lazy proxies also reference this class from their callbacks, but those callbacks
42 // are only invoked at flush time while we are still alive. (Unlike DrawPathsOps, that
43 // unregister themselves upon destruction.) So it shouldn't matter if any clip proxies
44 // are still around.
45}
46
Chris Dalton1a325d22017-07-14 15:17:41 -060047bool GrCoverageCountingPathRenderer::IsSupported(const GrCaps& caps) {
48 const GrShaderCaps& shaderCaps = *caps.shaderCaps();
Chris Dalton383a2ef2018-01-08 17:21:41 -050049 return shaderCaps.integerSupport() && shaderCaps.flatInterpolationSupport() &&
50 caps.instanceAttribSupport() && GrCaps::kNone_MapFlags != caps.mapBufferFlags() &&
Chris Dalton1a325d22017-07-14 15:17:41 -060051 caps.isConfigTexturable(kAlpha_half_GrPixelConfig) &&
Brian Salomonbdecacf2018-02-02 20:32:49 -050052 caps.isConfigRenderable(kAlpha_half_GrPixelConfig) &&
Chris Dalton4da70192018-06-18 09:51:36 -060053 caps.isConfigTexturable(kAlpha_8_GrPixelConfig) &&
54 caps.isConfigRenderable(kAlpha_8_GrPixelConfig) &&
Chris Daltone4679fa2017-09-29 13:58:26 -060055 !caps.blacklistCoverageCounting();
Chris Dalton1a325d22017-07-14 15:17:41 -060056}
57
Chris Dalton383a2ef2018-01-08 17:21:41 -050058sk_sp<GrCoverageCountingPathRenderer> GrCoverageCountingPathRenderer::CreateIfSupported(
Chris Daltona2b5b642018-06-24 13:08:57 -060059 const GrCaps& caps, AllowCaching allowCaching) {
60 return sk_sp<GrCoverageCountingPathRenderer>(
61 IsSupported(caps) ? new GrCoverageCountingPathRenderer(allowCaching) : nullptr);
62}
63
64GrCoverageCountingPathRenderer::GrCoverageCountingPathRenderer(AllowCaching allowCaching) {
65 if (AllowCaching::kYes == allowCaching) {
66 fPathCache = skstd::make_unique<GrCCPathCache>();
67 }
68}
69
70GrCoverageCountingPathRenderer::~GrCoverageCountingPathRenderer() {
71 // Ensure callers are actually flushing paths they record, not causing us to leak memory.
72 SkASSERT(fPendingPaths.empty());
73 SkASSERT(!fFlushing);
Chris Dalton1a325d22017-07-14 15:17:41 -060074}
75
Chris Daltond7e22272018-05-23 10:17:17 -060076GrCCPerOpListPaths* GrCoverageCountingPathRenderer::lookupPendingPaths(uint32_t opListID) {
77 auto it = fPendingPaths.find(opListID);
78 if (fPendingPaths.end() == it) {
Robert Phillips774168e2018-05-31 12:43:27 -040079 sk_sp<GrCCPerOpListPaths> paths = sk_make_sp<GrCCPerOpListPaths>();
Chris Daltond7e22272018-05-23 10:17:17 -060080 it = fPendingPaths.insert(std::make_pair(opListID, std::move(paths))).first;
81 }
82 return it->second.get();
Chris Dalton5ba36ba2018-05-09 01:08:38 -060083}
84
Chris Dalton383a2ef2018-01-08 17:21:41 -050085GrPathRenderer::CanDrawPath GrCoverageCountingPathRenderer::onCanDrawPath(
86 const CanDrawPathArgs& args) const {
Chris Dalton383a2ef2018-01-08 17:21:41 -050087 if (!args.fShape->style().isSimpleFill() || args.fShape->inverseFilled() ||
88 args.fViewMatrix->hasPerspective() || GrAAType::kCoverage != args.fAAType) {
Chris Dalton5ed44232017-09-07 13:22:46 -060089 return CanDrawPath::kNo;
Chris Dalton1a325d22017-07-14 15:17:41 -060090 }
91
92 SkPath path;
93 args.fShape->asPath(&path);
Chris Daltona2b5b642018-06-24 13:08:57 -060094
Chris Daltondb91c6e2017-09-08 16:25:08 -060095 SkRect devBounds;
Chris Daltondb91c6e2017-09-08 16:25:08 -060096 args.fViewMatrix->mapRect(&devBounds, path.getBounds());
Chris Daltona2b5b642018-06-24 13:08:57 -060097
98 SkIRect clippedIBounds;
99 devBounds.roundOut(&clippedIBounds);
100 if (!clippedIBounds.intersect(*args.fClipConservativeBounds)) {
Chris Daltondb91c6e2017-09-08 16:25:08 -0600101 // Path is completely clipped away. Our code will eventually notice this before doing any
102 // real work.
103 return CanDrawPath::kYes;
104 }
105
Chris Daltona2b5b642018-06-24 13:08:57 -0600106 int64_t numPixels = sk_64_mul(clippedIBounds.height(), clippedIBounds.width());
107 if (path.countVerbs() > 1000 && path.countPoints() > numPixels) {
108 // This is a complicated path that has more vertices than pixels! Let's let the SW renderer
109 // have this one: It will probably be faster and a bitmap will require less total memory on
110 // the GPU than CCPR instance buffers would for the raw path data.
111 return CanDrawPath::kNo;
112 }
113
114 if (numPixels > 256 * 256) {
Chris Daltondb91c6e2017-09-08 16:25:08 -0600115 // Large paths can blow up the atlas fast. And they are not ideal for a two-pass rendering
116 // algorithm. Give the simpler direct renderers a chance before we commit to drawing it.
117 return CanDrawPath::kAsBackup;
118 }
119
120 if (args.fShape->hasUnstyledKey() && path.countVerbs() > 50) {
121 // Complex paths do better cached in an SDF, if the renderer will accept them.
122 return CanDrawPath::kAsBackup;
123 }
124
Chris Dalton5ed44232017-09-07 13:22:46 -0600125 return CanDrawPath::kYes;
Chris Dalton1a325d22017-07-14 15:17:41 -0600126}
127
128bool GrCoverageCountingPathRenderer::onDrawPath(const DrawPathArgs& args) {
129 SkASSERT(!fFlushing);
Chris Dalton1a325d22017-07-14 15:17:41 -0600130
Chris Dalton5ba36ba2018-05-09 01:08:38 -0600131 SkIRect clipIBounds;
132 GrRenderTargetContext* rtc = args.fRenderTargetContext;
133 args.fClip->getConservativeBounds(rtc->width(), rtc->height(), &clipIBounds, nullptr);
134
Chris Dalton1a325d22017-07-14 15:17:41 -0600135 SkRect devBounds;
Chris Dalton4da70192018-06-18 09:51:36 -0600136 args.fViewMatrix->mapRect(&devBounds, args.fShape->bounds());
Chris Dalton5ba36ba2018-05-09 01:08:38 -0600137
Chris Dalton42c21152018-06-13 15:28:19 -0600138 std::unique_ptr<GrCCDrawPathsOp> op;
Chris Daltona32a3c32017-12-05 10:05:21 -0700139 if (SkTMax(devBounds.height(), devBounds.width()) > kPathCropThreshold) {
Chris Dalton5ba36ba2018-05-09 01:08:38 -0600140 // The path is too large. Crop it or analytic AA can run out of fp32 precision.
141 SkPath croppedPath;
Chris Dalton4da70192018-06-18 09:51:36 -0600142 args.fShape->asPath(&croppedPath);
143 croppedPath.transform(*args.fViewMatrix, &croppedPath);
Chris Dalton5ba36ba2018-05-09 01:08:38 -0600144 crop_path(croppedPath, clipIBounds, &croppedPath);
Chris Dalton42c21152018-06-13 15:28:19 -0600145 // FIXME: This breaks local coords: http://skbug.com/8003
Chris Dalton4da70192018-06-18 09:51:36 -0600146 op = GrCCDrawPathsOp::Make(args.fContext, clipIBounds, SkMatrix::I(), GrShape(croppedPath),
Chris Dalton42c21152018-06-13 15:28:19 -0600147 croppedPath.getBounds(), std::move(args.fPaint));
Robert Phillips88a32ef2018-06-07 11:05:56 -0400148 } else {
Chris Dalton4da70192018-06-18 09:51:36 -0600149 op = GrCCDrawPathsOp::Make(args.fContext, clipIBounds, *args.fViewMatrix, *args.fShape,
150 devBounds, std::move(args.fPaint));
Chris Dalton1a325d22017-07-14 15:17:41 -0600151 }
152
Chris Dalton42c21152018-06-13 15:28:19 -0600153 this->recordOp(std::move(op), args);
Chris Dalton1a325d22017-07-14 15:17:41 -0600154 return true;
155}
156
Chris Dalton42c21152018-06-13 15:28:19 -0600157void GrCoverageCountingPathRenderer::recordOp(std::unique_ptr<GrCCDrawPathsOp> opHolder,
158 const DrawPathArgs& args) {
159 if (GrCCDrawPathsOp* op = opHolder.get()) {
160 GrRenderTargetContext* rtc = args.fRenderTargetContext;
161 if (uint32_t opListID = rtc->addDrawOp(*args.fClip, std::move(opHolder))) {
162 op->wasRecorded(this->lookupPendingPaths(opListID));
163 }
164 }
165}
166
Chris Dalton383a2ef2018-01-08 17:21:41 -0500167std::unique_ptr<GrFragmentProcessor> GrCoverageCountingPathRenderer::makeClipProcessor(
Chris Dalton4c458b12018-06-16 17:22:59 -0600168 uint32_t opListID, const SkPath& deviceSpacePath, const SkIRect& accessRect, int rtWidth,
169 int rtHeight, const GrCaps& caps) {
Chris Dalton383a2ef2018-01-08 17:21:41 -0500170 using MustCheckBounds = GrCCClipProcessor::MustCheckBounds;
Chris Daltona32a3c32017-12-05 10:05:21 -0700171
172 SkASSERT(!fFlushing);
Chris Daltona32a3c32017-12-05 10:05:21 -0700173
Chris Dalton5ba36ba2018-05-09 01:08:38 -0600174 GrCCClipPath& clipPath =
Chris Daltond7e22272018-05-23 10:17:17 -0600175 this->lookupPendingPaths(opListID)->fClipPaths[deviceSpacePath.getGenerationID()];
Chris Dalton5ba36ba2018-05-09 01:08:38 -0600176 if (!clipPath.isInitialized()) {
Chris Daltona32a3c32017-12-05 10:05:21 -0700177 // This ClipPath was just created during lookup. Initialize it.
Chris Dalton5ba36ba2018-05-09 01:08:38 -0600178 const SkRect& pathDevBounds = deviceSpacePath.getBounds();
179 if (SkTMax(pathDevBounds.height(), pathDevBounds.width()) > kPathCropThreshold) {
180 // The path is too large. Crop it or analytic AA can run out of fp32 precision.
181 SkPath croppedPath;
Chris Dalton4c458b12018-06-16 17:22:59 -0600182 int maxRTSize = caps.maxRenderTargetSize();
Chris Dalton5ba36ba2018-05-09 01:08:38 -0600183 crop_path(deviceSpacePath, SkIRect::MakeWH(maxRTSize, maxRTSize), &croppedPath);
Chris Dalton4c458b12018-06-16 17:22:59 -0600184 clipPath.init(croppedPath, accessRect, rtWidth, rtHeight, caps);
Chris Dalton5ba36ba2018-05-09 01:08:38 -0600185 } else {
Chris Dalton4c458b12018-06-16 17:22:59 -0600186 clipPath.init(deviceSpacePath, accessRect, rtWidth, rtHeight, caps);
Chris Dalton5ba36ba2018-05-09 01:08:38 -0600187 }
Chris Daltona32a3c32017-12-05 10:05:21 -0700188 } else {
189 clipPath.addAccess(accessRect);
190 }
191
192 bool mustCheckBounds = !clipPath.pathDevIBounds().contains(accessRect);
Chris Dalton383a2ef2018-01-08 17:21:41 -0500193 return skstd::make_unique<GrCCClipProcessor>(&clipPath, MustCheckBounds(mustCheckBounds),
194 deviceSpacePath.getFillType());
Chris Daltona32a3c32017-12-05 10:05:21 -0700195}
196
Chris Dalton1a325d22017-07-14 15:17:41 -0600197void GrCoverageCountingPathRenderer::preFlush(GrOnFlushResourceProvider* onFlushRP,
198 const uint32_t* opListIDs, int numOpListIDs,
Chris Dalton9414c962018-06-14 10:14:50 -0600199 SkTArray<sk_sp<GrRenderTargetContext>>* out) {
Chris Dalton4da70192018-06-18 09:51:36 -0600200 using DoCopiesToCache = GrCCDrawPathsOp::DoCopiesToCache;
Chris Daltona32a3c32017-12-05 10:05:21 -0700201 SkASSERT(!fFlushing);
Chris Daltond7e22272018-05-23 10:17:17 -0600202 SkASSERT(fFlushingPaths.empty());
Chris Dalton383a2ef2018-01-08 17:21:41 -0500203 SkDEBUGCODE(fFlushing = true);
Chris Daltona32a3c32017-12-05 10:05:21 -0700204
Chris Dalton4da70192018-06-18 09:51:36 -0600205 // Dig up the stashed atlas from the previous flush (if any) so we can attempt to copy any
206 // reusable paths out of it and into the resource cache. We also need to clear its unique key.
207 sk_sp<GrTextureProxy> stashedAtlasProxy;
208 if (fStashedAtlasKey.isValid()) {
209 stashedAtlasProxy = onFlushRP->findOrCreateProxyByUniqueKey(fStashedAtlasKey,
210 GrCCAtlas::kTextureOrigin);
211 if (stashedAtlasProxy) {
212 // Instantiate the proxy so we can clear the underlying texture's unique key.
213 onFlushRP->instatiateProxy(stashedAtlasProxy.get());
214 onFlushRP->removeUniqueKeyFromProxy(fStashedAtlasKey, stashedAtlasProxy.get());
215 } else {
216 fStashedAtlasKey.reset(); // Indicate there is no stashed atlas to copy from.
217 }
218 }
219
Chris Daltond7e22272018-05-23 10:17:17 -0600220 if (fPendingPaths.empty()) {
Chris Dalton4da70192018-06-18 09:51:36 -0600221 fStashedAtlasKey.reset();
Chris Dalton383a2ef2018-01-08 17:21:41 -0500222 return; // Nothing to draw.
Chris Daltona32a3c32017-12-05 10:05:21 -0700223 }
Chris Daltonc1e59632017-09-05 00:30:07 -0600224
Chris Dalton4da70192018-06-18 09:51:36 -0600225 GrCCPerFlushResourceSpecs specs;
Chris Dalton42c21152018-06-13 15:28:19 -0600226 int maxPreferredRTSize = onFlushRP->caps()->maxPreferredRenderTargetSize();
Chris Dalton4da70192018-06-18 09:51:36 -0600227 specs.fCopyAtlasSpecs.fMaxPreferredTextureSize = SkTMin(2048, maxPreferredRTSize);
228 SkASSERT(0 == specs.fCopyAtlasSpecs.fMinTextureSize);
229 specs.fRenderedAtlasSpecs.fMaxPreferredTextureSize = maxPreferredRTSize;
Chris Daltona2b5b642018-06-24 13:08:57 -0600230 specs.fRenderedAtlasSpecs.fMinTextureSize = SkTMin(512, maxPreferredRTSize);
Chris Dalton42c21152018-06-13 15:28:19 -0600231
Chris Daltond7e22272018-05-23 10:17:17 -0600232 // Move the per-opList paths that are about to be flushed from fPendingPaths to fFlushingPaths,
Chris Dalton42c21152018-06-13 15:28:19 -0600233 // and count them up so we can preallocate buffers.
Chris Daltond7e22272018-05-23 10:17:17 -0600234 fFlushingPaths.reserve(numOpListIDs);
Chris Dalton1a325d22017-07-14 15:17:41 -0600235 for (int i = 0; i < numOpListIDs; ++i) {
Chris Daltond7e22272018-05-23 10:17:17 -0600236 auto iter = fPendingPaths.find(opListIDs[i]);
237 if (fPendingPaths.end() == iter) {
238 continue; // No paths on this opList.
Chris Dalton1a325d22017-07-14 15:17:41 -0600239 }
Chris Daltona32a3c32017-12-05 10:05:21 -0700240
tzikbdb49562018-05-28 14:58:00 +0900241 fFlushingPaths.push_back(std::move(iter->second));
Chris Daltond7e22272018-05-23 10:17:17 -0600242 fPendingPaths.erase(iter);
243
Chris Dalton4da70192018-06-18 09:51:36 -0600244 for (GrCCDrawPathsOp* op : fFlushingPaths.back()->fDrawOps) {
Chris Daltona2b5b642018-06-24 13:08:57 -0600245 op->accountForOwnPaths(fPathCache.get(), onFlushRP, fStashedAtlasKey, &specs);
Chris Dalton080baa42017-11-06 14:19:19 -0700246 }
Chris Daltond7e22272018-05-23 10:17:17 -0600247 for (const auto& clipsIter : fFlushingPaths.back()->fClipPaths) {
Chris Dalton4da70192018-06-18 09:51:36 -0600248 clipsIter.second.accountForOwnPath(&specs);
Chris Daltona32a3c32017-12-05 10:05:21 -0700249 }
Chris Dalton1a325d22017-07-14 15:17:41 -0600250 }
Chris Dalton4da70192018-06-18 09:51:36 -0600251 fStashedAtlasKey.reset();
Chris Dalton1a325d22017-07-14 15:17:41 -0600252
Chris Dalton4da70192018-06-18 09:51:36 -0600253 if (specs.isEmpty()) {
Chris Dalton383a2ef2018-01-08 17:21:41 -0500254 return; // Nothing to draw.
Chris Dalton1a325d22017-07-14 15:17:41 -0600255 }
256
Chris Dalton4da70192018-06-18 09:51:36 -0600257 // Determine if there are enough reusable paths from last flush for it to be worth our time to
258 // copy them to cached atlas(es).
259 DoCopiesToCache doCopies = DoCopiesToCache(specs.fNumCopiedPaths > 100 ||
Chris Daltona2b5b642018-06-24 13:08:57 -0600260 specs.fCopyAtlasSpecs.fApproxNumPixels > 256 * 256);
Chris Dalton4da70192018-06-18 09:51:36 -0600261 if (specs.fNumCopiedPaths && DoCopiesToCache::kNo == doCopies) {
262 specs.convertCopiesToRenders();
263 SkASSERT(!specs.fNumCopiedPaths);
264 }
265
266 auto resources = sk_make_sp<GrCCPerFlushResources>(onFlushRP, specs);
Chris Dalton5ba36ba2018-05-09 01:08:38 -0600267 if (!resources->isMapped()) {
268 return; // Some allocation failed.
Chris Dalton1a325d22017-07-14 15:17:41 -0600269 }
270
Chris Dalton4da70192018-06-18 09:51:36 -0600271 // Layout the atlas(es) and parse paths.
Chris Daltond7e22272018-05-23 10:17:17 -0600272 for (const auto& flushingPaths : fFlushingPaths) {
273 for (GrCCDrawPathsOp* op : flushingPaths->fDrawOps) {
Chris Dalton4da70192018-06-18 09:51:36 -0600274 op->setupResources(onFlushRP, resources.get(), doCopies);
Chris Dalton1a325d22017-07-14 15:17:41 -0600275 }
Chris Daltond7e22272018-05-23 10:17:17 -0600276 for (auto& clipsIter : flushingPaths->fClipPaths) {
Chris Daltondaef06a2018-05-23 17:11:09 -0600277 clipsIter.second.renderPathInAtlas(resources.get(), onFlushRP);
Chris Daltonc1e59632017-09-05 00:30:07 -0600278 }
Chris Dalton1a325d22017-07-14 15:17:41 -0600279 }
280
Chris Dalton4da70192018-06-18 09:51:36 -0600281 // Allocate resources and then render the atlas(es).
282 if (!resources->finalize(onFlushRP, std::move(stashedAtlasProxy), out)) {
Chris Daltonc1e59632017-09-05 00:30:07 -0600283 return;
Chris Dalton1a325d22017-07-14 15:17:41 -0600284 }
Chris Dalton4da70192018-06-18 09:51:36 -0600285 // Verify the stashed atlas got released so its texture could be recycled.
286 SkASSERT(!stashedAtlasProxy);
Chris Dalton1a325d22017-07-14 15:17:41 -0600287
Chris Daltond7e22272018-05-23 10:17:17 -0600288 // Commit flushing paths to the resources once they are successfully completed.
289 for (auto& flushingPaths : fFlushingPaths) {
Robert Phillips774168e2018-05-31 12:43:27 -0400290 SkASSERT(!flushingPaths->fFlushResources);
Chris Daltond7e22272018-05-23 10:17:17 -0600291 flushingPaths->fFlushResources = resources;
292 }
Chris Dalton1a325d22017-07-14 15:17:41 -0600293}
294
Chris Dalton3968ff92017-11-27 12:26:31 -0700295void GrCoverageCountingPathRenderer::postFlush(GrDeferredUploadToken, const uint32_t* opListIDs,
296 int numOpListIDs) {
Chris Dalton1a325d22017-07-14 15:17:41 -0600297 SkASSERT(fFlushing);
Chris Dalton4da70192018-06-18 09:51:36 -0600298 SkASSERT(!fStashedAtlasKey.isValid()); // Should have been cleared in preFlush().
Robert Phillips774168e2018-05-31 12:43:27 -0400299
Chris Dalton4da70192018-06-18 09:51:36 -0600300 if (!fFlushingPaths.empty()) {
301 // Note the stashed atlas's key for next flush, if any.
302 auto resources = fFlushingPaths.front()->fFlushResources.get();
303 if (resources && resources->hasStashedAtlas()) {
304 fStashedAtlasKey = resources->stashedAtlasKey();
305 }
306
307 // In DDL mode these aren't guaranteed to be deleted so we must clear out the perFlush
308 // resources manually.
309 for (auto& flushingPaths : fFlushingPaths) {
310 flushingPaths->fFlushResources = nullptr;
311 }
312
313 // We wait to erase these until after flush, once Ops and FPs are done accessing their data.
314 fFlushingPaths.reset();
Robert Phillips774168e2018-05-31 12:43:27 -0400315 }
316
Chris Dalton383a2ef2018-01-08 17:21:41 -0500317 SkDEBUGCODE(fFlushing = false);
Chris Dalton1a325d22017-07-14 15:17:41 -0600318}