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

Unified Diff: src/effects/SkArithmeticMode.cpp

Issue 1643753002: kill SkValue (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 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/core/SkXfermode_proccoeff.h ('k') | src/effects/SkPixelXorXfermode.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkArithmeticMode.cpp
diff --git a/src/effects/SkArithmeticMode.cpp b/src/effects/SkArithmeticMode.cpp
index 7d220765586b1aea4ad8dc49fb99f3437d04383c..ff062c39665440580436e1cb38ad3983d4fd4a91 100644
--- a/src/effects/SkArithmeticMode.cpp
+++ b/src/effects/SkArithmeticMode.cpp
@@ -11,8 +11,6 @@
#include "SkWriteBuffer.h"
#include "SkString.h"
#include "SkUnPreMultiply.h"
-#include "SkValue.h"
-#include "SkValueKeys.h"
#if SK_SUPPORT_GPU
#include "SkArithmeticMode_gpu.h"
#endif
@@ -26,7 +24,7 @@ public:
if (SkScalarNearlyZero(k1) && SkScalarNearlyEqual(k2, SK_Scalar1) &&
SkScalarNearlyZero(k3) && SkScalarNearlyZero(k4)) {
return SkXfermode::Create(SkXfermode::kSrc_Mode);
- } else if (SkScalarNearlyZero(k1) && SkScalarNearlyZero(k2) &&
+ } else if (SkScalarNearlyZero(k1) && SkScalarNearlyZero(k2) &&
SkScalarNearlyEqual(k3, SK_Scalar1) && SkScalarNearlyZero(k4)) {
return SkXfermode::Create(SkXfermode::kDst_Mode);
}
@@ -64,17 +62,6 @@ private:
buffer.writeBool(fEnforcePMColor);
}
- SkValue asValue() const override {
- auto value = SkValue::Object(SkValue::ArithmeticXfermode);
- using namespace SkValueKeys::ArithmeticXfermode;
- value.set(kK0, SkValue::FromF32(fK[0]));
- value.set(kK1, SkValue::FromF32(fK[1]));
- value.set(kK2, SkValue::FromF32(fK[2]));
- value.set(kK3, SkValue::FromF32(fK[3]));
- value.set(kEnforcePMColor, SkValue::FromS32(fEnforcePMColor ? 1 : 0));
- return value;
- }
-
SkScalar fK[4];
bool fEnforcePMColor;
« no previous file with comments | « src/core/SkXfermode_proccoeff.h ('k') | src/effects/SkPixelXorXfermode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698