aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/ops
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-04-13 09:15:47 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-04-13 14:40:13 +0000
commit178ce3eddd326feee608af65cdeedb08e1af91c3 (patch)
tree7ba03f9dba2397da4193d40ed5f30e57220762ed /src/gpu/ops
parent2a5c66666e604a3e7910cac2c5cb4732d25c7bc5 (diff)
Make all GrRenderTargetOpList ops store a GrRenderTarget pointer
Change-Id: I39652b4b8b2ba96b5206304dfc51395283c3fe16 Reviewed-on: https://skia-review.googlesource.com/13332 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/ops')
-rw-r--r--src/gpu/ops/GrCopySurfaceOp.h11
-rw-r--r--src/gpu/ops/GrOp.h2
2 files changed, 6 insertions, 7 deletions
diff --git a/src/gpu/ops/GrCopySurfaceOp.h b/src/gpu/ops/GrCopySurfaceOp.h
index 05ee8d0a00..e455c3e7dc 100644
--- a/src/gpu/ops/GrCopySurfaceOp.h
+++ b/src/gpu/ops/GrCopySurfaceOp.h
@@ -35,6 +35,8 @@ public:
return string;
}
+ bool needsCommandBufferIsolation() const override { return true; }
+
private:
GrCopySurfaceOp(GrSurface* dst, GrSurface* src,
GrSurfaceProxy::UniqueID dstID, GrSurfaceProxy::UniqueID srcID,
@@ -57,13 +59,8 @@ private:
void onPrepare(GrOpFlushState*) override {}
void onExecute(GrOpFlushState* state) override {
- if (!state->commandBuffer()) {
- state->gpu()->copySurface(fDst.get(), fSrc.get(), fSrcRect, fDstPoint);
- } else {
- // Currently we are not sending copies through the GrGpuCommandBuffer. See comment in
- // renderTargetUniqueID().
- SkASSERT(false);
- }
+ SkASSERT(!state->commandBuffer());
+ state->gpu()->copySurface(fDst.get(), fSrc.get(), fSrcRect, fDstPoint);
}
// MDB TODO: remove the proxy IDs once the GrSurfaceProxy carries the ref since they will
diff --git a/src/gpu/ops/GrOp.h b/src/gpu/ops/GrOp.h
index ef752b5d0c..7f8f8e7f64 100644
--- a/src/gpu/ops/GrOp.h
+++ b/src/gpu/ops/GrOp.h
@@ -151,6 +151,8 @@ public:
return string;
}
+ virtual bool needsCommandBufferIsolation() const { return false; }
+
protected:
/**
* Indicates that the op will produce geometry that extends beyond its bounds for the