Index: src/effects/SkArithmeticMode_gpu.cpp |
diff --git a/src/effects/SkArithmeticMode_gpu.cpp b/src/effects/SkArithmeticMode_gpu.cpp |
index 0d81c7966ce91fd3b3cf8953b90576271573f5d5..074cada0a05a0eabb57d63057f83df648ae26fa0 100644 |
--- a/src/effects/SkArithmeticMode_gpu.cpp |
+++ b/src/effects/SkArithmeticMode_gpu.cpp |
@@ -160,13 +160,8 @@ GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrArithmeticFP); |
class ArithmeticXP : public GrXferProcessor { |
public: |
- static GrXferProcessor* Create(float k1, float k2, float k3, float k4, bool enforcePMColor, |
- const DstTexture* dstTexture, bool willReadDstColor) { |
- return SkNEW_ARGS(ArithmeticXP, (k1, k2, k3, k4, enforcePMColor, dstTexture, |
- willReadDstColor)); |
- } |
- |
- ~ArithmeticXP() override {}; |
+ ArithmeticXP(const DstTexture*, bool hasMixedSamples, |
+ float k1, float k2, float k3, float k4, bool enforcePMColor); |
const char* name() const override { return "Arithmetic"; } |
@@ -179,9 +174,6 @@ public: |
bool enforcePMColor() const { return fEnforcePMColor; } |
private: |
- ArithmeticXP(float k1, float k2, float k3, float k4, bool enforcePMColor, |
- const DstTexture*, bool willReadDstColor); |
- |
GrXferProcessor::OptFlags onGetOptimizations(const GrProcOptInfo& colorPOI, |
const GrProcOptInfo& coveragePOI, |
bool doesStencilWrite, |
@@ -253,9 +245,9 @@ private: |
/////////////////////////////////////////////////////////////////////////////// |
-ArithmeticXP::ArithmeticXP(float k1, float k2, float k3, float k4, bool enforcePMColor, |
- const DstTexture* dstTexture, bool willReadDstColor) |
- : INHERITED(dstTexture, willReadDstColor) |
+ArithmeticXP::ArithmeticXP(const DstTexture* dstTexture, bool hasMixedSamples, |
+ float k1, float k2, float k3, float k4, bool enforcePMColor) |
+ : INHERITED(dstTexture, true, hasMixedSamples) |
, fK1(k1) |
, fK2(k2) |
, fK3(k3) |
@@ -292,9 +284,10 @@ GrXferProcessor* |
GrArithmeticXPFactory::onCreateXferProcessor(const GrCaps& caps, |
const GrProcOptInfo& colorPOI, |
const GrProcOptInfo& coveragePOI, |
+ bool hasMixedSamples, |
const DstTexture* dstTexture) const { |
- return ArithmeticXP::Create(fK1, fK2, fK3, fK4, fEnforcePMColor, dstTexture, |
- this->willReadDstColor(caps, colorPOI, coveragePOI)); |
+ return SkNEW_ARGS(ArithmeticXP, (dstTexture, hasMixedSamples, fK1, fK2, fK3, fK4, |
+ fEnforcePMColor)); |
} |