aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp')
-rw-r--r--src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp26
1 files changed, 7 insertions, 19 deletions
diff --git a/src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp b/src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp
index 4358d21e24..eadd9a7d7c 100644
--- a/src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp
+++ b/src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp
@@ -178,21 +178,17 @@ void GrCoverageCountingPathRenderer::preFlush(GrOnFlushResourceProvider* onFlush
}
const GrCCRTPendingPaths& rtPendingPaths = iter->second;
- SkTInternalLList<GrCCDrawPathsOp>::Iter drawOpsIter;
- drawOpsIter.init(rtPendingPaths.fDrawOps,
- SkTInternalLList<GrCCDrawPathsOp>::Iter::kHead_IterStart);
- while (GrCCDrawPathsOp* op = drawOpsIter.get()) {
+ for (const GrCCDrawPathsOp* op : rtPendingPaths.fDrawOps) {
for (const GrCCDrawPathsOp::SingleDraw* draw = op->head(); draw; draw = draw->fNext) {
- ++numPathDraws;
flushingPathStats.statPath(draw->fPath);
+ ++numPathDraws;
}
- drawOpsIter.next();
}
- numClipPaths += rtPendingPaths.fClipPaths.size();
for (const auto& clipsIter : rtPendingPaths.fClipPaths) {
flushingPathStats.statPath(clipsIter.second.deviceSpacePath());
}
+ numClipPaths += rtPendingPaths.fClipPaths.size();
fFlushingRTPathIters.push_back(std::move(iter));
}
@@ -209,23 +205,15 @@ void GrCoverageCountingPathRenderer::preFlush(GrOnFlushResourceProvider* onFlush
// Layout atlas(es) and parse paths.
SkDEBUGCODE(int numSkippedPaths = 0);
- for (int i = 0; i < numOpListIDs; ++i) {
- auto it = fRTPendingPathsMap.find(opListIDs[i]);
- if (fRTPendingPathsMap.end() == it) {
- continue;
- }
- GrCCRTPendingPaths& rtPendingPaths = it->second;
+ for (const auto& iter : fFlushingRTPathIters) {
+ GrCCRTPendingPaths* rtPendingPaths = &iter->second;
- SkTInternalLList<GrCCDrawPathsOp>::Iter drawOpsIter;
- drawOpsIter.init(rtPendingPaths.fDrawOps,
- SkTInternalLList<GrCCDrawPathsOp>::Iter::kHead_IterStart);
- while (GrCCDrawPathsOp* op = drawOpsIter.get()) {
+ for (GrCCDrawPathsOp* op : rtPendingPaths->fDrawOps) {
op->setupResources(resources.get(), onFlushRP);
- drawOpsIter.next();
SkDEBUGCODE(numSkippedPaths += op->numSkippedInstances_debugOnly());
}
- for (auto& clipsIter : rtPendingPaths.fClipPaths) {
+ for (auto& clipsIter : rtPendingPaths->fClipPaths) {
clipsIter.second.placePathInAtlas(resources.get(), onFlushRP);
}
}