Clarify that the OpArgs' outputSwizzle comes from its GrRenderTargetProxy
Since we want to collect shader information early, this attempts to make clear that numSamples, origin and outputSwizzle can all be obtained from the target renderTargetProxy.
Change-Id: I42e0fd79e2163f17673ccdd344a31fbaadac5f53
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/246298
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrOpsTask.cpp b/src/gpu/GrOpsTask.cpp
index f7ceca5..5670bd1 100644
--- a/src/gpu/GrOpsTask.cpp
+++ b/src/gpu/GrOpsTask.cpp
@@ -412,13 +412,12 @@
#ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
TRACE_EVENT0("skia.gpu", chain.head()->name());
#endif
- GrOpFlushState::OpArgs opArgs = {
+ GrOpFlushState::OpArgs opArgs(
chain.head(),
fTarget->asRenderTargetProxy(),
chain.appliedClip(),
- fTarget.get()->asRenderTargetProxy()->outputSwizzle(),
- chain.dstProxy()
- };
+ chain.dstProxy());
+
flushState->setOpArgs(&opArgs);
chain.head()->prepare(flushState);
flushState->setOpArgs(nullptr);
@@ -532,13 +531,10 @@
TRACE_EVENT0("skia.gpu", chain.head()->name());
#endif
- GrOpFlushState::OpArgs opArgs {
- chain.head(),
- fTarget->asRenderTargetProxy(),
- chain.appliedClip(),
- fTarget.get()->asRenderTargetProxy()->outputSwizzle(),
- chain.dstProxy()
- };
+ GrOpFlushState::OpArgs opArgs(chain.head(),
+ fTarget->asRenderTargetProxy(),
+ chain.appliedClip(),
+ chain.dstProxy());
flushState->setOpArgs(&opArgs);
chain.head()->execute(flushState, chain.bounds());