Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(171)

Unified Diff: src/effects/SkArithmeticMode_gpu.cpp

Issue 1164973002: Add mixed samples support to XPs (Closed) Base URL: https://skia.googlesource.com/skia.git@upload2_reenablebea
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/effects/SkArithmeticMode_gpu.h ('k') | src/gpu/GrPipeline.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
}
« no previous file with comments | « src/effects/SkArithmeticMode_gpu.h ('k') | src/gpu/GrPipeline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698