aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/ops
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-08-09 09:30:51 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-08-09 14:30:54 +0000
commit19e51dcd1eb0bcdc70f29620ce4ca30ddbfc2042 (patch)
tree19639614fa3494f150b97c4dd9bf9b07b69474fa /src/gpu/ops
parent69fd008199989c5a5a96f992dcaa4089b63f490f (diff)
Store GrRenderTarget in GrGpuCommandBuffer
Change-Id: I545d53ffb5f9d450b87a360516b03bdd47232a70 Reviewed-on: https://skia-review.googlesource.com/32460 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/ops')
-rw-r--r--src/gpu/ops/GrClearOp.cpp4
-rw-r--r--src/gpu/ops/GrClearStencilClipOp.h5
-rw-r--r--src/gpu/ops/GrDebugMarkerOp.h4
-rw-r--r--src/gpu/ops/GrDiscardOp.h4
-rw-r--r--src/gpu/ops/GrMeshDrawOp.cpp3
-rw-r--r--src/gpu/ops/GrStencilPathOp.cpp2
6 files changed, 5 insertions, 17 deletions
diff --git a/src/gpu/ops/GrClearOp.cpp b/src/gpu/ops/GrClearOp.cpp
index 4cc2bf2ac3..4b1efd6c47 100644
--- a/src/gpu/ops/GrClearOp.cpp
+++ b/src/gpu/ops/GrClearOp.cpp
@@ -32,7 +32,5 @@ GrClearOp::GrClearOp(const GrFixedClip& clip, GrColor color, GrSurfaceProxy* pro
}
void GrClearOp::onExecute(GrOpFlushState* state) {
- SkASSERT(state->drawOpArgs().renderTarget());
-
- state->commandBuffer()->clear(state->drawOpArgs().fProxy, fClip, fColor);
+ state->commandBuffer()->clear(fClip, fColor);
}
diff --git a/src/gpu/ops/GrClearStencilClipOp.h b/src/gpu/ops/GrClearStencilClipOp.h
index 2b60f02893..1364b2365a 100644
--- a/src/gpu/ops/GrClearStencilClipOp.h
+++ b/src/gpu/ops/GrClearStencilClipOp.h
@@ -55,10 +55,7 @@ private:
void onPrepare(GrOpFlushState*) override {}
void onExecute(GrOpFlushState* state) override {
- SkASSERT(state->drawOpArgs().renderTarget());
-
- GrRenderTargetProxy* proxy = state->drawOpArgs().fProxy;
- state->commandBuffer()->clearStencilClip(proxy, fClip, fInsideStencilMask);
+ state->commandBuffer()->clearStencilClip(fClip, fInsideStencilMask);
}
const GrFixedClip fClip;
diff --git a/src/gpu/ops/GrDebugMarkerOp.h b/src/gpu/ops/GrDebugMarkerOp.h
index 326aa75bdd..1b02c62e1a 100644
--- a/src/gpu/ops/GrDebugMarkerOp.h
+++ b/src/gpu/ops/GrDebugMarkerOp.h
@@ -42,11 +42,9 @@ private:
void onPrepare(GrOpFlushState*) override {}
void onExecute(GrOpFlushState* state) override {
- SkASSERT(state->drawOpArgs().renderTarget());
-
//SkDebugf("%s\n", fStr.c_str());
if (state->caps().gpuTracingSupport()) {
- state->commandBuffer()->insertEventMarker(state->drawOpArgs().fProxy, fStr.c_str());
+ state->commandBuffer()->insertEventMarker(fStr.c_str());
}
}
diff --git a/src/gpu/ops/GrDiscardOp.h b/src/gpu/ops/GrDiscardOp.h
index 4fb481ca74..d30aa5a8c5 100644
--- a/src/gpu/ops/GrDiscardOp.h
+++ b/src/gpu/ops/GrDiscardOp.h
@@ -39,9 +39,7 @@ private:
void onPrepare(GrOpFlushState*) override {}
void onExecute(GrOpFlushState* state) override {
- SkASSERT(state->drawOpArgs().renderTarget());
-
- state->commandBuffer()->discard(state->drawOpArgs().fProxy);
+ state->commandBuffer()->discard();
}
typedef GrOp INHERITED;
diff --git a/src/gpu/ops/GrMeshDrawOp.cpp b/src/gpu/ops/GrMeshDrawOp.cpp
index 04a3096383..10253174b8 100644
--- a/src/gpu/ops/GrMeshDrawOp.cpp
+++ b/src/gpu/ops/GrMeshDrawOp.cpp
@@ -69,8 +69,7 @@ void GrMeshDrawOp::onExecute(GrOpFlushState* state) {
GrDrawOpUploadToken drawToken = state->nextTokenToFlush();
while (currUploadIdx < fInlineUploads.count() &&
fInlineUploads[currUploadIdx].fUploadBeforeToken == drawToken) {
- state->commandBuffer()->inlineUpload(state, fInlineUploads[currUploadIdx++].fUpload,
- state->drawOpArgs().fProxy);
+ state->commandBuffer()->inlineUpload(state, fInlineUploads[currUploadIdx++].fUpload);
}
const QueuedDraw& draw = fQueuedDraws[currDrawIdx];
SkASSERT(draw.fPipeline->proxy() == state->drawOpArgs().fProxy);
diff --git a/src/gpu/ops/GrStencilPathOp.cpp b/src/gpu/ops/GrStencilPathOp.cpp
index 3c17e81f05..53a55cc979 100644
--- a/src/gpu/ops/GrStencilPathOp.cpp
+++ b/src/gpu/ops/GrStencilPathOp.cpp
@@ -11,8 +11,6 @@
#include "GrOpFlushState.h"
void GrStencilPathOp::onExecute(GrOpFlushState* state) {
- SkASSERT(state->drawOpArgs().renderTarget());
-
GrPathRendering::StencilPathArgs args(fUseHWAA, state->drawOpArgs().fProxy,
&fViewMatrix, &fScissor, &fStencil);
state->gpu()->pathRendering()->stencilPath(args, fPath.get());