diff options
author | Brian Salomon <bsalomon@google.com> | 2016-12-22 15:42:51 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-12-22 21:10:48 +0000 |
commit | 69868af68403bd12aee040187347426affe41acc (patch) | |
tree | 5f8d998b6c1de3fb00c7dac89b16158988eb9bae /src/gpu/GrTextureOpList.cpp | |
parent | 578f52c6cf6372b88a88a05dee0efc5b67aa9a9c (diff) |
Remove render target unique ID virtual from GrOp.
GrRenderTargetOpList now stores the IDs along side each op.
This should put us closer to using proxy IDs and not forcing early render target instantiation as many comments point towards.
Change-Id: I1ee82b01a0818a80d2bcac39fdf3a4ee7dccecc9
Reviewed-on: https://skia-review.googlesource.com/6403
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/gpu/GrTextureOpList.cpp')
-rw-r--r-- | src/gpu/GrTextureOpList.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gpu/GrTextureOpList.cpp b/src/gpu/GrTextureOpList.cpp index b17de3f07f..2aaa8ca200 100644 --- a/src/gpu/GrTextureOpList.cpp +++ b/src/gpu/GrTextureOpList.cpp @@ -10,7 +10,7 @@ #include "GrAuditTrail.h" #include "GrGpu.h" #include "GrTextureProxy.h" - +#include "SkStringUtils.h" #include "ops/GrCopySurfaceOp.h" //////////////////////////////////////////////////////////////////////////////// @@ -90,15 +90,16 @@ bool GrTextureOpList::copySurface(GrSurface* dst, this->addDependency(src); #endif - this->recordOp(std::move(op)); + // See the comment in GrRenderTargetOpList about why we pass the invalid ID here. + this->recordOp(std::move(op), GrGpuResource::UniqueID::InvalidID()); return true; } -void GrTextureOpList::recordOp(sk_sp<GrOp> op) { +void GrTextureOpList::recordOp(sk_sp<GrOp> op, GrGpuResource::UniqueID renderTargetID) { // A closed GrOpList should never receive new/more ops SkASSERT(!this->isClosed()); - GR_AUDIT_TRAIL_ADD_OP(fAuditTrail, op.get()); + GR_AUDIT_TRAIL_ADD_OP(fAuditTrail, op.get(), renderTargetID); GrOP_INFO("Re-Recording (%s, B%u)\n" "\tBounds LRTB (%f, %f, %f, %f)\n", op->name(), |