From 19e51dcd1eb0bcdc70f29620ce4ca30ddbfc2042 Mon Sep 17 00:00:00 2001 From: Robert Phillips Date: Wed, 9 Aug 2017 09:30:51 -0400 Subject: Store GrRenderTarget in GrGpuCommandBuffer Change-Id: I545d53ffb5f9d450b87a360516b03bdd47232a70 Reviewed-on: https://skia-review.googlesource.com/32460 Reviewed-by: Brian Salomon Commit-Queue: Robert Phillips --- src/gpu/ops/GrClearOp.cpp | 4 +--- src/gpu/ops/GrClearStencilClipOp.h | 5 +---- src/gpu/ops/GrDebugMarkerOp.h | 4 +--- src/gpu/ops/GrDiscardOp.h | 4 +--- src/gpu/ops/GrMeshDrawOp.cpp | 3 +-- src/gpu/ops/GrStencilPathOp.cpp | 2 -- 6 files changed, 5 insertions(+), 17 deletions(-) (limited to 'src/gpu/ops') 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()); -- cgit v1.2.3