Deprecate GrDrawOp::fixedFunctionFlags()
Replaces this call with a usesMSAA() method that gets called before
finalize(), and usesStencil() which gets called after.
Bug: skia:12047
Change-Id: I860dc39e9af23a77f6ee1420d6bc648ab747b504
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/413356
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
diff --git a/src/gpu/GrOpsTask.cpp b/src/gpu/GrOpsTask.cpp
index a387269..fd4bdf0 100644
--- a/src/gpu/GrOpsTask.cpp
+++ b/src/gpu/GrOpsTask.cpp
@@ -390,8 +390,7 @@
this->recordOp(std::move(op), GrProcessorSet::EmptySetAnalysis(), nullptr, nullptr, caps);
}
-void GrOpsTask::addDrawOp(GrDrawingManager* drawingMgr, GrOp::Owner op,
- GrDrawOp::FixedFunctionFlags fixedFunctionFlags,
+void GrOpsTask::addDrawOp(GrDrawingManager* drawingMgr, GrOp::Owner op, bool usesMSAA,
const GrProcessorSet::Analysis& processorAnalysis, GrAppliedClip&& clip,
const DstProxyView& dstProxyView,
GrTextureResolveManager textureResolveManager, const GrCaps& caps) {
@@ -424,12 +423,11 @@
#ifdef SK_DEBUG
// Ensure we can support dynamic msaa if the caller is trying to trigger it.
GrRenderTargetProxy* rtProxy = this->target(0)->asRenderTargetProxy();
- if (rtProxy->numSamples() == 1 &&
- (fixedFunctionFlags & GrDrawOp::FixedFunctionFlags::kUsesHWAA)) {
+ if (rtProxy->numSamples() == 1 && usesMSAA) {
SkASSERT(caps.supportsDynamicMSAA(rtProxy));
}
#endif
- fUsesMSAASurface |= (fixedFunctionFlags & GrDrawOp::FixedFunctionFlags::kUsesHWAA);
+ fUsesMSAASurface |= usesMSAA;
this->recordOp(std::move(op), processorAnalysis, clip.doesClip() ? &clip : nullptr,
&dstProxyView, caps);