Reland "Merge GrOpList and GrRTOpList and rename to GrOpsTask."
This reverts commit f21bf9e50bb175eb151e90a01d7f8351da0802f8.
Reason for revert: relanding with infra fix
Original change's description:
> Revert "Merge GrOpList and GrRTOpList and rename to GrOpsTask."
>
> This reverts commit 2a5954140b49d18e5161a30a4ae2c7ac28bc1993.
>
> Reason for revert: breaking everything
>
> Original change's description:
> > Merge GrOpList and GrRTOpList and rename to GrOpsTask.
> >
> > Change-Id: I8f4f2218a30fd0541a8f79f7bb9850f9500cd243
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236343
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
>
> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com
>
> Change-Id: I27840ea0343e8e6b388556afb7bd2e76386d611d
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236349
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com
Change-Id: Ibd3a06e4a91dbb1f225dcc8d17d0db3967b6f85f
No-Presubmit: true
No-Tree-Checks: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236350
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp b/src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp
index a9e080b..4798b6f 100644
--- a/src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp
+++ b/src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp
@@ -71,11 +71,11 @@
}
}
-GrCCPerOpListPaths* GrCoverageCountingPathRenderer::lookupPendingPaths(uint32_t opListID) {
- auto it = fPendingPaths.find(opListID);
+GrCCPerOpsTaskPaths* GrCoverageCountingPathRenderer::lookupPendingPaths(uint32_t opsTaskID) {
+ auto it = fPendingPaths.find(opsTaskID);
if (fPendingPaths.end() == it) {
- sk_sp<GrCCPerOpListPaths> paths = sk_make_sp<GrCCPerOpListPaths>();
- it = fPendingPaths.insert(std::make_pair(opListID, std::move(paths))).first;
+ sk_sp<GrCCPerOpsTaskPaths> paths = sk_make_sp<GrCCPerOpsTaskPaths>();
+ it = fPendingPaths.insert(std::make_pair(opsTaskID, std::move(paths))).first;
}
return it->second.get();
}
@@ -182,16 +182,17 @@
void GrCoverageCountingPathRenderer::recordOp(std::unique_ptr<GrCCDrawPathsOp> op,
const DrawPathArgs& args) {
if (op) {
- auto addToOwningPerOpListPaths = [this](GrOp* op, uint32_t opListID) {
- op->cast<GrCCDrawPathsOp>()->addToOwningPerOpListPaths(
- sk_ref_sp(this->lookupPendingPaths(opListID)));
+ auto addToOwningPerOpsTaskPaths = [this](GrOp* op, uint32_t opsTaskID) {
+ op->cast<GrCCDrawPathsOp>()->addToOwningPerOpsTaskPaths(
+ sk_ref_sp(this->lookupPendingPaths(opsTaskID)));
};
- args.fRenderTargetContext->addDrawOp(*args.fClip, std::move(op), addToOwningPerOpListPaths);
+ args.fRenderTargetContext->addDrawOp(*args.fClip, std::move(op),
+ addToOwningPerOpsTaskPaths);
}
}
std::unique_ptr<GrFragmentProcessor> GrCoverageCountingPathRenderer::makeClipProcessor(
- uint32_t opListID, const SkPath& deviceSpacePath, const SkIRect& accessRect,
+ uint32_t opsTaskID, const SkPath& deviceSpacePath, const SkIRect& accessRect,
const GrCaps& caps) {
SkASSERT(!fFlushing);
@@ -202,7 +203,7 @@
key = (key << 1) | (uint32_t)GrFillRuleForSkPath(deviceSpacePath);
}
GrCCClipPath& clipPath =
- this->lookupPendingPaths(opListID)->fClipPaths[key];
+ this->lookupPendingPaths(opsTaskID)->fClipPaths[key];
if (!clipPath.isInitialized()) {
// This ClipPath was just created during lookup. Initialize it.
const SkRect& pathDevBounds = deviceSpacePath.getBounds();
@@ -228,8 +229,8 @@
void GrCoverageCountingPathRenderer::preFlush(
GrOnFlushResourceProvider* onFlushRP,
- const uint32_t* opListIDs,
- int numOpListIDs,
+ const uint32_t* opsTaskIDs,
+ int numOpsTaskIDs,
SkTArray<std::unique_ptr<GrRenderTargetContext>>* out) {
using DoCopiesToA8Coverage = GrCCDrawPathsOp::DoCopiesToA8Coverage;
SkASSERT(!fFlushing);
@@ -251,13 +252,13 @@
specs.fRenderedAtlasSpecs.fMaxPreferredTextureSize = maxPreferredRTSize;
specs.fRenderedAtlasSpecs.fMinTextureSize = SkTMin(512, maxPreferredRTSize);
- // Move the per-opList paths that are about to be flushed from fPendingPaths to fFlushingPaths,
+ // Move the per-opsTask paths that are about to be flushed from fPendingPaths to fFlushingPaths,
// and count them up so we can preallocate buffers.
- fFlushingPaths.reserve(numOpListIDs);
- for (int i = 0; i < numOpListIDs; ++i) {
- auto iter = fPendingPaths.find(opListIDs[i]);
+ fFlushingPaths.reserve(numOpsTaskIDs);
+ for (int i = 0; i < numOpsTaskIDs; ++i) {
+ auto iter = fPendingPaths.find(opsTaskIDs[i]);
if (fPendingPaths.end() == iter) {
- continue; // No paths on this opList.
+ continue; // No paths on this opsTask.
}
fFlushingPaths.push_back(std::move(iter->second));
@@ -318,8 +319,8 @@
}
}
-void GrCoverageCountingPathRenderer::postFlush(GrDeferredUploadToken, const uint32_t* opListIDs,
- int numOpListIDs) {
+void GrCoverageCountingPathRenderer::postFlush(GrDeferredUploadToken, const uint32_t* opsTaskIDs,
+ int numOpsTaskIDs) {
SkASSERT(fFlushing);
if (!fFlushingPaths.empty()) {