aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu/effects/GrCoverageSetOpXP.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/gpu/effects/GrCoverageSetOpXP.h')
-rw-r--r--include/gpu/effects/GrCoverageSetOpXP.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/include/gpu/effects/GrCoverageSetOpXP.h b/include/gpu/effects/GrCoverageSetOpXP.h
index 2aae7be41d..ca71abc4e0 100644
--- a/include/gpu/effects/GrCoverageSetOpXP.h
+++ b/include/gpu/effects/GrCoverageSetOpXP.h
@@ -14,6 +14,12 @@
class GrProcOptInfo;
+// See the comment above GrXPFactory's definition about this warning suppression.
+#if defined(__GNUC__) || defined(__clang)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
+#endif
+
/**
* This xfer processor directly blends the the src coverage with the dst using a set operator. It is
* useful for rendering coverage masks using CSG. It can optionally invert the src coverage before
@@ -21,13 +27,13 @@ class GrProcOptInfo;
*/
class GrCoverageSetOpXPFactory : public GrXPFactory {
public:
- static sk_sp<GrXPFactory> Make(SkRegion::Op regionOp, bool invertCoverage = false);
+ static const GrXPFactory* Get(SkRegion::Op regionOp, bool invertCoverage = false);
void getInvariantBlendedColor(const GrProcOptInfo& colorPOI,
GrXPFactory::InvariantBlendedColor*) const override;
private:
- GrCoverageSetOpXPFactory(SkRegion::Op regionOp, bool invertCoverage);
+ constexpr GrCoverageSetOpXPFactory(SkRegion::Op regionOp, bool invertCoverage);
GrXferProcessor* onCreateXferProcessor(const GrCaps&,
const GrPipelineAnalysis&,
@@ -38,11 +44,6 @@ private:
return false;
}
- bool onIsEqual(const GrXPFactory& xpfBase) const override {
- const GrCoverageSetOpXPFactory& xpf = xpfBase.cast<GrCoverageSetOpXPFactory>();
- return fRegionOp == xpf.fRegionOp;
- }
-
GR_DECLARE_XP_FACTORY_TEST;
SkRegion::Op fRegionOp;
@@ -50,5 +51,8 @@ private:
typedef GrXPFactory INHERITED;
};
+#if defined(__GNUC__) || defined(__clang)
+#pragma GCC diagnostic pop
+#endif
#endif