aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/ops
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2016-12-22 15:42:51 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-12-22 21:10:48 +0000
commit69868af68403bd12aee040187347426affe41acc (patch)
tree5f8d998b6c1de3fb00c7dac89b16158988eb9bae /src/gpu/ops
parent578f52c6cf6372b88a88a05dee0efc5b67aa9a9c (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/ops')
-rw-r--r--src/gpu/ops/GrClearOp.h5
-rw-r--r--src/gpu/ops/GrClearStencilClipOp.h5
-rw-r--r--src/gpu/ops/GrCopySurfaceOp.h8
-rw-r--r--src/gpu/ops/GrDiscardOp.h7
-rw-r--r--src/gpu/ops/GrDrawOp.h6
-rw-r--r--src/gpu/ops/GrOp.h5
-rw-r--r--src/gpu/ops/GrStencilPathOp.h5
7 files changed, 1 insertions, 40 deletions
diff --git a/src/gpu/ops/GrClearOp.h b/src/gpu/ops/GrClearOp.h
index 1a4b33a766..81371884d8 100644
--- a/src/gpu/ops/GrClearOp.h
+++ b/src/gpu/ops/GrClearOp.h
@@ -34,11 +34,6 @@ public:
const char* name() const override { return "Clear"; }
- // TODO: this needs to be updated to return GrSurfaceProxy::UniqueID
- GrGpuResource::UniqueID renderTargetUniqueID() const override {
- return fRenderTarget.get()->uniqueID();
- }
-
SkString dumpInfo() const override {
SkString string("Scissor [");
if (fClip.scissorEnabled()) {
diff --git a/src/gpu/ops/GrClearStencilClipOp.h b/src/gpu/ops/GrClearStencilClipOp.h
index a5d6a03bb3..7f3f68a70b 100644
--- a/src/gpu/ops/GrClearStencilClipOp.h
+++ b/src/gpu/ops/GrClearStencilClipOp.h
@@ -25,11 +25,6 @@ public:
const char* name() const override { return "ClearStencilClip"; }
- // TODO: this needs to be updated to return GrSurfaceProxy::UniqueID
- GrGpuResource::UniqueID renderTargetUniqueID() const override {
- return fRenderTarget.get()->uniqueID();
- }
-
SkString dumpInfo() const override {
SkString string("Scissor [");
if (fClip.scissorEnabled()) {
diff --git a/src/gpu/ops/GrCopySurfaceOp.h b/src/gpu/ops/GrCopySurfaceOp.h
index 789f7a25a1..1f4fbfa8a9 100644
--- a/src/gpu/ops/GrCopySurfaceOp.h
+++ b/src/gpu/ops/GrCopySurfaceOp.h
@@ -32,14 +32,6 @@ public:
const char* name() const override { return "CopySurface"; }
- // TODO: this needs to be updated to return GrSurfaceProxy::UniqueID
- GrGpuResource::UniqueID renderTargetUniqueID() const override {
- // Copy surface doesn't work through a GrGpuCommandBuffer. By returning an invalid RT ID we
- // force the caller to end the previous command buffer and execute this copy before
- // beginning a new one.
- return GrGpuResource::UniqueID::InvalidID();
- }
-
SkString dumpInfo() const override {
SkString string;
string.printf(
diff --git a/src/gpu/ops/GrDiscardOp.h b/src/gpu/ops/GrDiscardOp.h
index e7225af0d2..6923be2a49 100644
--- a/src/gpu/ops/GrDiscardOp.h
+++ b/src/gpu/ops/GrDiscardOp.h
@@ -20,11 +20,6 @@ public:
const char* name() const override { return "Discard"; }
- // TODO: this needs to be updated to return GrSurfaceProxy::UniqueID
- GrGpuResource::UniqueID renderTargetUniqueID() const override {
- return fRenderTarget.get()->uniqueID();
- }
-
SkString dumpInfo() const override {
SkString string;
string.printf("RT: %d", fRenderTarget.get()->uniqueID().asUInt());
@@ -39,7 +34,7 @@ private:
}
bool onCombineIfPossible(GrOp* that, const GrCaps& caps) override {
- return this->renderTargetUniqueID() == that->renderTargetUniqueID();
+ return fRenderTarget.get() == that->cast<GrDiscardOp>()->fRenderTarget.get();
}
void onPrepare(GrOpFlushState*) override {}
diff --git a/src/gpu/ops/GrDrawOp.h b/src/gpu/ops/GrDrawOp.h
index ad8a545b78..9e949b13cd 100644
--- a/src/gpu/ops/GrDrawOp.h
+++ b/src/gpu/ops/GrDrawOp.h
@@ -67,12 +67,6 @@ public:
// TODO no GrPrimitiveProcessors yet read fragment position
bool willReadFragmentPosition() const { return false; }
- // TODO: this needs to be updated to return GrSurfaceProxy::UniqueID
- // This is a bit more exciting than the other call sites since it uses the pipeline
- GrGpuResource::UniqueID renderTargetUniqueID() const final {
- return this->pipeline()->getRenderTarget()->uniqueID();
- }
-
protected:
static SkString DumpPipelineInfo(const GrPipeline& pipeline) {
SkString string;
diff --git a/src/gpu/ops/GrOp.h b/src/gpu/ops/GrOp.h
index 47a8097fa0..87748f52f8 100644
--- a/src/gpu/ops/GrOp.h
+++ b/src/gpu/ops/GrOp.h
@@ -129,11 +129,6 @@ public:
/** Issues the op's commands to GrGpu. */
void execute(GrOpFlushState* state, const SkRect& bounds) { this->onExecute(state, bounds); }
- /** Used to block combining across render target changes. Remove this once we store
- GrOps for different RTs in different targets. */
- // TODO: this needs to be updated to return GrSurfaceProxy::UniqueID
- virtual GrGpuResource::UniqueID renderTargetUniqueID() const = 0;
-
/** Used for spewing information about ops when debugging. */
virtual SkString dumpInfo() const {
SkString string;
diff --git a/src/gpu/ops/GrStencilPathOp.h b/src/gpu/ops/GrStencilPathOp.h
index fc29402258..03dc7ee067 100644
--- a/src/gpu/ops/GrStencilPathOp.h
+++ b/src/gpu/ops/GrStencilPathOp.h
@@ -33,11 +33,6 @@ public:
const char* name() const override { return "StencilPathOp"; }
- // TODO: this needs to be updated to return GrSurfaceProxy::UniqueID
- GrGpuResource::UniqueID renderTargetUniqueID() const override {
- return fRenderTarget.get()->uniqueID();
- }
-
SkString dumpInfo() const override {
SkString string;
string.printf("PATH: 0x%p, AA:%d", fPath.get(), fUseHWAA);