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

Unified Diff: src/effects/SkArithmeticMode_gpu.cpp

Issue 1410553002: Propagate premultiplied color enforcement flag (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: fix case Created 5 years, 2 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 | « gm/arithmode.cpp ('k') | no next file » | 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 96e8c0db964b9bf50fdf4e78be286dd26015f51d..e72ead8db81c5ffcebf1fef17cfca70155287ff1 100644
--- a/src/effects/SkArithmeticMode_gpu.cpp
+++ b/src/effects/SkArithmeticMode_gpu.cpp
@@ -54,7 +54,8 @@ static void add_arithmetic_code(GrGLFragmentBuilder* fsBuilder,
class GLArithmeticFP : public GrGLFragmentProcessor {
public:
- GLArithmeticFP(const GrProcessor&) : fEnforcePMColor(true) {}
+ GLArithmeticFP(const GrArithmeticFP& arithmeticFP)
+ : fEnforcePMColor(arithmeticFP.enforcePMColor()) {}
~GLArithmeticFP() override {}
@@ -191,8 +192,8 @@ private:
class GLArithmeticXP : public GrGLXferProcessor {
public:
- GLArithmeticXP(const GrProcessor&)
- : fEnforcePMColor(true) {
+ GLArithmeticXP(const ArithmeticXP& arithmeticXP)
+ : fEnforcePMColor(arithmeticXP.enforcePMColor()) {
}
~GLArithmeticXP() override {}
@@ -260,7 +261,7 @@ GrXferProcessor::OptFlags ArithmeticXP::onGetOptimizations(const GrProcOptInfo&
///////////////////////////////////////////////////////////////////////////////
GrArithmeticXPFactory::GrArithmeticXPFactory(float k1, float k2, float k3, float k4,
- bool enforcePMColor)
+ bool enforcePMColor)
: fK1(k1), fK2(k2), fK3(k3), fK4(k4), fEnforcePMColor(enforcePMColor) {
this->initClassID<GrArithmeticXPFactory>();
}
« no previous file with comments | « gm/arithmode.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698