Chris Dalton | 1a325d2 | 2017-07-14 15:17:41 -0600 | [diff] [blame] | 1 | /* |
| 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 Phillips | 777707b | 2018-01-17 11:40:14 -0500 | [diff] [blame] | 12 | #include "GrProxyProvider.h" |
Chris Dalton | 1a325d2 | 2017-07-14 15:17:41 -0600 | [diff] [blame] | 13 | #include "SkMakeUnique.h" |
Chris Dalton | a039d3b | 2017-09-28 11:16:36 -0600 | [diff] [blame] | 14 | #include "SkPathOps.h" |
Chris Dalton | 383a2ef | 2018-01-08 17:21:41 -0500 | [diff] [blame] | 15 | #include "ccpr/GrCCClipProcessor.h" |
Chris Dalton | d7e2227 | 2018-05-23 10:17:17 -0600 | [diff] [blame^] | 16 | #include "ccpr/GrCCDrawPathsOp.h" |
Chris Dalton | 5ba36ba | 2018-05-09 01:08:38 -0600 | [diff] [blame] | 17 | #include "ccpr/GrCCPathParser.h" |
Chris Dalton | 1a325d2 | 2017-07-14 15:17:41 -0600 | [diff] [blame] | 18 | |
Chris Dalton | 5ba36ba | 2018-05-09 01:08:38 -0600 | [diff] [blame] | 19 | using PathInstance = GrCCPathProcessor::Instance; |
Chris Dalton | a32a3c3 | 2017-12-05 10:05:21 -0700 | [diff] [blame] | 20 | |
| 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. |
| 23 | static constexpr float kPathCropThreshold = 1 << 16; |
| 24 | |
| 25 | static void crop_path(const SkPath& path, const SkIRect& cropbox, SkPath* out) { |
Chris Dalton | 5ba36ba | 2018-05-09 01:08:38 -0600 | [diff] [blame] | 26 | SkPath cropboxPath; |
| 27 | cropboxPath.addRect(SkRect::Make(cropbox)); |
| 28 | if (!Op(cropboxPath, path, kIntersect_SkPathOp, out)) { |
Chris Dalton | a32a3c3 | 2017-12-05 10:05:21 -0700 | [diff] [blame] | 29 | // This can fail if the PathOps encounter NaN or infinities. |
| 30 | out->reset(); |
| 31 | } |
Chris Dalton | 5ba36ba | 2018-05-09 01:08:38 -0600 | [diff] [blame] | 32 | out->setIsVolatile(true); |
Chris Dalton | a32a3c3 | 2017-12-05 10:05:21 -0700 | [diff] [blame] | 33 | } |
Chris Dalton | 1a325d2 | 2017-07-14 15:17:41 -0600 | [diff] [blame] | 34 | |
| 35 | bool GrCoverageCountingPathRenderer::IsSupported(const GrCaps& caps) { |
| 36 | const GrShaderCaps& shaderCaps = *caps.shaderCaps(); |
Chris Dalton | 383a2ef | 2018-01-08 17:21:41 -0500 | [diff] [blame] | 37 | return shaderCaps.integerSupport() && shaderCaps.flatInterpolationSupport() && |
| 38 | caps.instanceAttribSupport() && GrCaps::kNone_MapFlags != caps.mapBufferFlags() && |
Chris Dalton | 1a325d2 | 2017-07-14 15:17:41 -0600 | [diff] [blame] | 39 | caps.isConfigTexturable(kAlpha_half_GrPixelConfig) && |
Brian Salomon | bdecacf | 2018-02-02 20:32:49 -0500 | [diff] [blame] | 40 | caps.isConfigRenderable(kAlpha_half_GrPixelConfig) && |
Chris Dalton | e4679fa | 2017-09-29 13:58:26 -0600 | [diff] [blame] | 41 | !caps.blacklistCoverageCounting(); |
Chris Dalton | 1a325d2 | 2017-07-14 15:17:41 -0600 | [diff] [blame] | 42 | } |
| 43 | |
Chris Dalton | 383a2ef | 2018-01-08 17:21:41 -0500 | [diff] [blame] | 44 | sk_sp<GrCoverageCountingPathRenderer> GrCoverageCountingPathRenderer::CreateIfSupported( |
| 45 | const GrCaps& caps, bool drawCachablePaths) { |
Chris Dalton | a2ac30d | 2017-10-17 10:40:01 -0600 | [diff] [blame] | 46 | auto ccpr = IsSupported(caps) ? new GrCoverageCountingPathRenderer(drawCachablePaths) : nullptr; |
| 47 | return sk_sp<GrCoverageCountingPathRenderer>(ccpr); |
Chris Dalton | 1a325d2 | 2017-07-14 15:17:41 -0600 | [diff] [blame] | 48 | } |
| 49 | |
Chris Dalton | d7e2227 | 2018-05-23 10:17:17 -0600 | [diff] [blame^] | 50 | GrCCPerOpListPaths* GrCoverageCountingPathRenderer::lookupPendingPaths(uint32_t opListID) { |
| 51 | auto it = fPendingPaths.find(opListID); |
| 52 | if (fPendingPaths.end() == it) { |
| 53 | auto paths = skstd::make_unique<GrCCPerOpListPaths>(); |
| 54 | it = fPendingPaths.insert(std::make_pair(opListID, std::move(paths))).first; |
| 55 | } |
| 56 | return it->second.get(); |
Chris Dalton | 5ba36ba | 2018-05-09 01:08:38 -0600 | [diff] [blame] | 57 | } |
| 58 | |
Chris Dalton | d7e2227 | 2018-05-23 10:17:17 -0600 | [diff] [blame^] | 59 | void GrCoverageCountingPathRenderer::adoptAndRecordOp(GrCCDrawPathsOp* op, |
| 60 | const DrawPathArgs& args) { |
| 61 | GrRenderTargetContext* rtc = args.fRenderTargetContext; |
| 62 | if (uint32_t opListID = rtc->addDrawOp(*args.fClip, std::unique_ptr<GrDrawOp>(op))) { |
| 63 | // If the Op wasn't dropped or combined, give it a pointer to its owning GrCCPerOpListPaths. |
| 64 | op->wasRecorded(this->lookupPendingPaths(opListID)); |
| 65 | } |
Chris Dalton | 5ba36ba | 2018-05-09 01:08:38 -0600 | [diff] [blame] | 66 | } |
| 67 | |
Chris Dalton | 383a2ef | 2018-01-08 17:21:41 -0500 | [diff] [blame] | 68 | GrPathRenderer::CanDrawPath GrCoverageCountingPathRenderer::onCanDrawPath( |
| 69 | const CanDrawPathArgs& args) const { |
Chris Dalton | a2ac30d | 2017-10-17 10:40:01 -0600 | [diff] [blame] | 70 | if (args.fShape->hasUnstyledKey() && !fDrawCachablePaths) { |
| 71 | return CanDrawPath::kNo; |
| 72 | } |
| 73 | |
Chris Dalton | 383a2ef | 2018-01-08 17:21:41 -0500 | [diff] [blame] | 74 | if (!args.fShape->style().isSimpleFill() || args.fShape->inverseFilled() || |
| 75 | args.fViewMatrix->hasPerspective() || GrAAType::kCoverage != args.fAAType) { |
Chris Dalton | 5ed4423 | 2017-09-07 13:22:46 -0600 | [diff] [blame] | 76 | return CanDrawPath::kNo; |
Chris Dalton | 1a325d2 | 2017-07-14 15:17:41 -0600 | [diff] [blame] | 77 | } |
| 78 | |
| 79 | SkPath path; |
| 80 | args.fShape->asPath(&path); |
Chris Dalton | db91c6e | 2017-09-08 16:25:08 -0600 | [diff] [blame] | 81 | SkRect devBounds; |
| 82 | SkIRect devIBounds; |
| 83 | args.fViewMatrix->mapRect(&devBounds, path.getBounds()); |
| 84 | devBounds.roundOut(&devIBounds); |
| 85 | if (!devIBounds.intersect(*args.fClipConservativeBounds)) { |
| 86 | // Path is completely clipped away. Our code will eventually notice this before doing any |
| 87 | // real work. |
| 88 | return CanDrawPath::kYes; |
| 89 | } |
| 90 | |
| 91 | if (devIBounds.height() * devIBounds.width() > 256 * 256) { |
| 92 | // Large paths can blow up the atlas fast. And they are not ideal for a two-pass rendering |
| 93 | // algorithm. Give the simpler direct renderers a chance before we commit to drawing it. |
| 94 | return CanDrawPath::kAsBackup; |
| 95 | } |
| 96 | |
| 97 | if (args.fShape->hasUnstyledKey() && path.countVerbs() > 50) { |
| 98 | // Complex paths do better cached in an SDF, if the renderer will accept them. |
| 99 | return CanDrawPath::kAsBackup; |
| 100 | } |
| 101 | |
Chris Dalton | 5ed4423 | 2017-09-07 13:22:46 -0600 | [diff] [blame] | 102 | return CanDrawPath::kYes; |
Chris Dalton | 1a325d2 | 2017-07-14 15:17:41 -0600 | [diff] [blame] | 103 | } |
| 104 | |
| 105 | bool GrCoverageCountingPathRenderer::onDrawPath(const DrawPathArgs& args) { |
| 106 | SkASSERT(!fFlushing); |
Chris Dalton | 1a325d2 | 2017-07-14 15:17:41 -0600 | [diff] [blame] | 107 | |
Chris Dalton | 5ba36ba | 2018-05-09 01:08:38 -0600 | [diff] [blame] | 108 | SkIRect clipIBounds; |
| 109 | GrRenderTargetContext* rtc = args.fRenderTargetContext; |
| 110 | args.fClip->getConservativeBounds(rtc->width(), rtc->height(), &clipIBounds, nullptr); |
| 111 | |
| 112 | SkPath path; |
| 113 | args.fShape->asPath(&path); |
Chris Dalton | 1a325d2 | 2017-07-14 15:17:41 -0600 | [diff] [blame] | 114 | |
| 115 | SkRect devBounds; |
Chris Dalton | 5ba36ba | 2018-05-09 01:08:38 -0600 | [diff] [blame] | 116 | args.fViewMatrix->mapRect(&devBounds, path.getBounds()); |
| 117 | |
Chris Dalton | a32a3c3 | 2017-12-05 10:05:21 -0700 | [diff] [blame] | 118 | if (SkTMax(devBounds.height(), devBounds.width()) > kPathCropThreshold) { |
Chris Dalton | 5ba36ba | 2018-05-09 01:08:38 -0600 | [diff] [blame] | 119 | // The path is too large. Crop it or analytic AA can run out of fp32 precision. |
| 120 | SkPath croppedPath; |
| 121 | path.transform(*args.fViewMatrix, &croppedPath); |
| 122 | crop_path(croppedPath, clipIBounds, &croppedPath); |
Chris Dalton | d7e2227 | 2018-05-23 10:17:17 -0600 | [diff] [blame^] | 123 | this->adoptAndRecordOp(new GrCCDrawPathsOp(std::move(args.fPaint), clipIBounds, |
Chris Dalton | f104fec | 2018-05-22 16:17:48 -0600 | [diff] [blame] | 124 | SkMatrix::I(), croppedPath, |
| 125 | croppedPath.getBounds()), args); |
Chris Dalton | 5ba36ba | 2018-05-09 01:08:38 -0600 | [diff] [blame] | 126 | return true; |
Chris Dalton | 1a325d2 | 2017-07-14 15:17:41 -0600 | [diff] [blame] | 127 | } |
| 128 | |
Chris Dalton | d7e2227 | 2018-05-23 10:17:17 -0600 | [diff] [blame^] | 129 | this->adoptAndRecordOp(new GrCCDrawPathsOp(std::move(args.fPaint), clipIBounds, |
Chris Dalton | f104fec | 2018-05-22 16:17:48 -0600 | [diff] [blame] | 130 | *args.fViewMatrix, path, devBounds), args); |
Chris Dalton | 1a325d2 | 2017-07-14 15:17:41 -0600 | [diff] [blame] | 131 | return true; |
| 132 | } |
| 133 | |
Chris Dalton | 383a2ef | 2018-01-08 17:21:41 -0500 | [diff] [blame] | 134 | std::unique_ptr<GrFragmentProcessor> GrCoverageCountingPathRenderer::makeClipProcessor( |
Robert Phillips | 777707b | 2018-01-17 11:40:14 -0500 | [diff] [blame] | 135 | GrProxyProvider* proxyProvider, |
| 136 | uint32_t opListID, const SkPath& deviceSpacePath, const SkIRect& accessRect, |
| 137 | int rtWidth, int rtHeight) { |
Chris Dalton | 383a2ef | 2018-01-08 17:21:41 -0500 | [diff] [blame] | 138 | using MustCheckBounds = GrCCClipProcessor::MustCheckBounds; |
Chris Dalton | a32a3c3 | 2017-12-05 10:05:21 -0700 | [diff] [blame] | 139 | |
| 140 | SkASSERT(!fFlushing); |
Chris Dalton | a32a3c3 | 2017-12-05 10:05:21 -0700 | [diff] [blame] | 141 | |
Chris Dalton | 5ba36ba | 2018-05-09 01:08:38 -0600 | [diff] [blame] | 142 | GrCCClipPath& clipPath = |
Chris Dalton | d7e2227 | 2018-05-23 10:17:17 -0600 | [diff] [blame^] | 143 | this->lookupPendingPaths(opListID)->fClipPaths[deviceSpacePath.getGenerationID()]; |
Chris Dalton | 5ba36ba | 2018-05-09 01:08:38 -0600 | [diff] [blame] | 144 | if (!clipPath.isInitialized()) { |
Chris Dalton | a32a3c3 | 2017-12-05 10:05:21 -0700 | [diff] [blame] | 145 | // This ClipPath was just created during lookup. Initialize it. |
Chris Dalton | 5ba36ba | 2018-05-09 01:08:38 -0600 | [diff] [blame] | 146 | const SkRect& pathDevBounds = deviceSpacePath.getBounds(); |
| 147 | if (SkTMax(pathDevBounds.height(), pathDevBounds.width()) > kPathCropThreshold) { |
| 148 | // The path is too large. Crop it or analytic AA can run out of fp32 precision. |
| 149 | SkPath croppedPath; |
| 150 | int maxRTSize = proxyProvider->caps()->maxRenderTargetSize(); |
| 151 | crop_path(deviceSpacePath, SkIRect::MakeWH(maxRTSize, maxRTSize), &croppedPath); |
| 152 | clipPath.init(proxyProvider, croppedPath, accessRect, rtWidth, rtHeight); |
| 153 | } else { |
| 154 | clipPath.init(proxyProvider, deviceSpacePath, accessRect, rtWidth, rtHeight); |
| 155 | } |
Chris Dalton | a32a3c3 | 2017-12-05 10:05:21 -0700 | [diff] [blame] | 156 | } else { |
| 157 | clipPath.addAccess(accessRect); |
| 158 | } |
| 159 | |
| 160 | bool mustCheckBounds = !clipPath.pathDevIBounds().contains(accessRect); |
Chris Dalton | 383a2ef | 2018-01-08 17:21:41 -0500 | [diff] [blame] | 161 | return skstd::make_unique<GrCCClipProcessor>(&clipPath, MustCheckBounds(mustCheckBounds), |
| 162 | deviceSpacePath.getFillType()); |
Chris Dalton | a32a3c3 | 2017-12-05 10:05:21 -0700 | [diff] [blame] | 163 | } |
| 164 | |
Chris Dalton | 1a325d2 | 2017-07-14 15:17:41 -0600 | [diff] [blame] | 165 | void GrCoverageCountingPathRenderer::preFlush(GrOnFlushResourceProvider* onFlushRP, |
| 166 | const uint32_t* opListIDs, int numOpListIDs, |
Chris Dalton | 5ba36ba | 2018-05-09 01:08:38 -0600 | [diff] [blame] | 167 | SkTArray<sk_sp<GrRenderTargetContext>>* atlasDraws) { |
Chris Dalton | a32a3c3 | 2017-12-05 10:05:21 -0700 | [diff] [blame] | 168 | SkASSERT(!fFlushing); |
Chris Dalton | d7e2227 | 2018-05-23 10:17:17 -0600 | [diff] [blame^] | 169 | SkASSERT(fFlushingPaths.empty()); |
Chris Dalton | 383a2ef | 2018-01-08 17:21:41 -0500 | [diff] [blame] | 170 | SkDEBUGCODE(fFlushing = true); |
Chris Dalton | a32a3c3 | 2017-12-05 10:05:21 -0700 | [diff] [blame] | 171 | |
Chris Dalton | d7e2227 | 2018-05-23 10:17:17 -0600 | [diff] [blame^] | 172 | if (fPendingPaths.empty()) { |
Chris Dalton | 383a2ef | 2018-01-08 17:21:41 -0500 | [diff] [blame] | 173 | return; // Nothing to draw. |
Chris Dalton | a32a3c3 | 2017-12-05 10:05:21 -0700 | [diff] [blame] | 174 | } |
Chris Dalton | c1e5963 | 2017-09-05 00:30:07 -0600 | [diff] [blame] | 175 | |
Chris Dalton | d7e2227 | 2018-05-23 10:17:17 -0600 | [diff] [blame^] | 176 | // Move the per-opList paths that are about to be flushed from fPendingPaths to fFlushingPaths, |
| 177 | // and count up the paths about to be flushed so we can preallocate buffers. |
Chris Dalton | 3917b1e | 2018-05-09 00:40:52 -0600 | [diff] [blame] | 178 | int numPathDraws = 0; |
| 179 | int numClipPaths = 0; |
| 180 | GrCCPathParser::PathStats flushingPathStats; |
Chris Dalton | d7e2227 | 2018-05-23 10:17:17 -0600 | [diff] [blame^] | 181 | fFlushingPaths.reserve(numOpListIDs); |
Chris Dalton | 1a325d2 | 2017-07-14 15:17:41 -0600 | [diff] [blame] | 182 | for (int i = 0; i < numOpListIDs; ++i) { |
Chris Dalton | d7e2227 | 2018-05-23 10:17:17 -0600 | [diff] [blame^] | 183 | auto iter = fPendingPaths.find(opListIDs[i]); |
| 184 | if (fPendingPaths.end() == iter) { |
| 185 | continue; // No paths on this opList. |
Chris Dalton | 1a325d2 | 2017-07-14 15:17:41 -0600 | [diff] [blame] | 186 | } |
Chris Dalton | a32a3c3 | 2017-12-05 10:05:21 -0700 | [diff] [blame] | 187 | |
Chris Dalton | d7e2227 | 2018-05-23 10:17:17 -0600 | [diff] [blame^] | 188 | fFlushingPaths.push_back(std::move(iter->second)).get(); |
| 189 | fPendingPaths.erase(iter); |
| 190 | |
| 191 | for (const GrCCDrawPathsOp* op : fFlushingPaths.back()->fDrawOps) { |
Chris Dalton | 4bfb50b | 2018-05-21 09:10:53 -0600 | [diff] [blame] | 192 | numPathDraws += op->countPaths(&flushingPathStats); |
Chris Dalton | 080baa4 | 2017-11-06 14:19:19 -0700 | [diff] [blame] | 193 | } |
Chris Dalton | d7e2227 | 2018-05-23 10:17:17 -0600 | [diff] [blame^] | 194 | for (const auto& clipsIter : fFlushingPaths.back()->fClipPaths) { |
Chris Dalton | 3917b1e | 2018-05-09 00:40:52 -0600 | [diff] [blame] | 195 | flushingPathStats.statPath(clipsIter.second.deviceSpacePath()); |
Chris Dalton | a32a3c3 | 2017-12-05 10:05:21 -0700 | [diff] [blame] | 196 | } |
Chris Dalton | d7e2227 | 2018-05-23 10:17:17 -0600 | [diff] [blame^] | 197 | numClipPaths += fFlushingPaths.back()->fClipPaths.size(); |
Chris Dalton | 1a325d2 | 2017-07-14 15:17:41 -0600 | [diff] [blame] | 198 | } |
| 199 | |
Chris Dalton | 3917b1e | 2018-05-09 00:40:52 -0600 | [diff] [blame] | 200 | if (0 == numPathDraws + numClipPaths) { |
Chris Dalton | 383a2ef | 2018-01-08 17:21:41 -0500 | [diff] [blame] | 201 | return; // Nothing to draw. |
Chris Dalton | 1a325d2 | 2017-07-14 15:17:41 -0600 | [diff] [blame] | 202 | } |
| 203 | |
Chris Dalton | d7e2227 | 2018-05-23 10:17:17 -0600 | [diff] [blame^] | 204 | auto resources = sk_make_sp<GrCCPerFlushResources>(onFlushRP, numPathDraws, numClipPaths, |
| 205 | flushingPathStats); |
Chris Dalton | 5ba36ba | 2018-05-09 01:08:38 -0600 | [diff] [blame] | 206 | if (!resources->isMapped()) { |
| 207 | return; // Some allocation failed. |
Chris Dalton | 1a325d2 | 2017-07-14 15:17:41 -0600 | [diff] [blame] | 208 | } |
| 209 | |
Chris Dalton | 5ba36ba | 2018-05-09 01:08:38 -0600 | [diff] [blame] | 210 | // Layout atlas(es) and parse paths. |
Chris Dalton | 3917b1e | 2018-05-09 00:40:52 -0600 | [diff] [blame] | 211 | SkDEBUGCODE(int numSkippedPaths = 0); |
Chris Dalton | d7e2227 | 2018-05-23 10:17:17 -0600 | [diff] [blame^] | 212 | for (const auto& flushingPaths : fFlushingPaths) { |
| 213 | for (GrCCDrawPathsOp* op : flushingPaths->fDrawOps) { |
Chris Dalton | 5ba36ba | 2018-05-09 01:08:38 -0600 | [diff] [blame] | 214 | op->setupResources(resources.get(), onFlushRP); |
Chris Dalton | 3917b1e | 2018-05-09 00:40:52 -0600 | [diff] [blame] | 215 | SkDEBUGCODE(numSkippedPaths += op->numSkippedInstances_debugOnly()); |
Chris Dalton | 1a325d2 | 2017-07-14 15:17:41 -0600 | [diff] [blame] | 216 | } |
Chris Dalton | d7e2227 | 2018-05-23 10:17:17 -0600 | [diff] [blame^] | 217 | for (auto& clipsIter : flushingPaths->fClipPaths) { |
Chris Dalton | 5ba36ba | 2018-05-09 01:08:38 -0600 | [diff] [blame] | 218 | clipsIter.second.placePathInAtlas(resources.get(), onFlushRP); |
Chris Dalton | c1e5963 | 2017-09-05 00:30:07 -0600 | [diff] [blame] | 219 | } |
Chris Dalton | 1a325d2 | 2017-07-14 15:17:41 -0600 | [diff] [blame] | 220 | } |
Chris Dalton | 5ba36ba | 2018-05-09 01:08:38 -0600 | [diff] [blame] | 221 | SkASSERT(resources->pathInstanceCount() == numPathDraws - numSkippedPaths); |
Chris Dalton | 1a325d2 | 2017-07-14 15:17:41 -0600 | [diff] [blame] | 222 | |
Chris Dalton | 5ba36ba | 2018-05-09 01:08:38 -0600 | [diff] [blame] | 223 | // Allocate the atlases and create instance buffers to draw them. |
| 224 | if (!resources->finalize(onFlushRP, atlasDraws)) { |
Chris Dalton | c1e5963 | 2017-09-05 00:30:07 -0600 | [diff] [blame] | 225 | return; |
Chris Dalton | 1a325d2 | 2017-07-14 15:17:41 -0600 | [diff] [blame] | 226 | } |
| 227 | |
Chris Dalton | d7e2227 | 2018-05-23 10:17:17 -0600 | [diff] [blame^] | 228 | // Commit flushing paths to the resources once they are successfully completed. |
| 229 | for (auto& flushingPaths : fFlushingPaths) { |
| 230 | flushingPaths->fFlushResources = resources; |
| 231 | } |
Chris Dalton | 1a325d2 | 2017-07-14 15:17:41 -0600 | [diff] [blame] | 232 | } |
| 233 | |
Chris Dalton | 3968ff9 | 2017-11-27 12:26:31 -0700 | [diff] [blame] | 234 | void GrCoverageCountingPathRenderer::postFlush(GrDeferredUploadToken, const uint32_t* opListIDs, |
| 235 | int numOpListIDs) { |
Chris Dalton | 1a325d2 | 2017-07-14 15:17:41 -0600 | [diff] [blame] | 236 | SkASSERT(fFlushing); |
Chris Dalton | a32a3c3 | 2017-12-05 10:05:21 -0700 | [diff] [blame] | 237 | // We wait to erase these until after flush, once Ops and FPs are done accessing their data. |
Chris Dalton | d7e2227 | 2018-05-23 10:17:17 -0600 | [diff] [blame^] | 238 | fFlushingPaths.reset(); |
Chris Dalton | 383a2ef | 2018-01-08 17:21:41 -0500 | [diff] [blame] | 239 | SkDEBUGCODE(fFlushing = false); |
Chris Dalton | 1a325d2 | 2017-07-14 15:17:41 -0600 | [diff] [blame] | 240 | } |