diff options
author | Greg Daniel <egdaniel@google.com> | 2017-11-08 19:58:51 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-11-08 19:58:58 +0000 |
commit | 065b41dd90782e22b5708c8b43696db641d54f46 (patch) | |
tree | 218278f670fb63274f6fbbcf68a6f99ad431029b /src/gpu/GrRenderTargetOpList.cpp | |
parent | 0078ab22519313be727ace05306333910768f58e (diff) |
Revert "Prepare to enable explicit gpu resource allocation"
This reverts commit f290376736b42a19b87da78c6ba2558313896860.
Reason for revert: Changed generated effect instead of FP
Original change's description:
> Prepare to enable explicit gpu resource allocation
>
> Change-Id: I407e45711c61831febbac3d3d3a88e3fdde92c5f
> Reviewed-on: https://skia-review.googlesource.com/68212
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com,robertphillips@google.com
Change-Id: I949500d94c7461b7cf38d615117cfcdc9a791780
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/68900
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/gpu/GrRenderTargetOpList.cpp')
-rw-r--r-- | src/gpu/GrRenderTargetOpList.cpp | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/gpu/GrRenderTargetOpList.cpp b/src/gpu/GrRenderTargetOpList.cpp index e6b91ff9c6..09486c7c99 100644 --- a/src/gpu/GrRenderTargetOpList.cpp +++ b/src/gpu/GrRenderTargetOpList.cpp @@ -257,18 +257,14 @@ bool GrRenderTargetOpList::copySurface(const GrCaps& caps, } void GrRenderTargetOpList::gatherProxyIntervals(GrResourceAllocator* alloc) const { + if (!fRecordedOps.count()) { + return; + } + unsigned int cur = alloc->numOps(); // Add the interval for all the writes to this opList's target - if (fRecordedOps.count()) { - alloc->addInterval(fTarget.get(), cur, cur+fRecordedOps.count()-1); - } else { - // This can happen if there is a loadOp (e.g., a clear) but no other draws. In this case we - // still need to add an interval for the destination so we create a fake op# for - // the missing clear op. - alloc->addInterval(fTarget.get()); - alloc->incOps(); - } + alloc->addInterval(fTarget.get(), cur, cur+fRecordedOps.count()-1); auto gather = [ alloc ] (GrSurfaceProxy* p) { alloc->addInterval(p); @@ -277,11 +273,9 @@ void GrRenderTargetOpList::gatherProxyIntervals(GrResourceAllocator* alloc) cons const GrOp* op = fRecordedOps[i].fOp.get(); // only diff from the GrTextureOpList version if (op) { op->visitProxies(gather); - } - // Even though the op may have been moved we still need to increment the op count to - // keep all the math consistent. - alloc->incOps(); + alloc->incOps(); + } } } |