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

Unified Diff: src/effects/SkPixelXorXfermode.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/effects/SkArithmeticMode.cpp ('k') | src/effects/SkToFromValue.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkPixelXorXfermode.cpp
diff --git a/src/effects/SkPixelXorXfermode.cpp b/src/effects/SkPixelXorXfermode.cpp
index 5ea82e63092680059c1e6795eedeb63285f8be78..e2ecb0e365364ed6b896da4a0569a024aa7f6a04 100644
--- a/src/effects/SkPixelXorXfermode.cpp
+++ b/src/effects/SkPixelXorXfermode.cpp
@@ -10,8 +10,6 @@
#include "SkReadBuffer.h"
#include "SkWriteBuffer.h"
#include "SkString.h"
-#include "SkValue.h"
-#include "SkValueKeys.h"
// we always return an opaque color, 'cause I don't know what to do with
// the alpha-component and still return a valid premultiplied color.
@@ -66,8 +64,8 @@ static void add_pixelxor_code(GrGLSLFragmentBuilder* fragBuilder,
SkString xorFuncName;
// The xor function checks if the three passed in floats (f1, f2, f3) would
- // have a bit in the log2(fPowerOf2Divisor)-th position if they were
- // represented by an int. It then performs an xor of the 3 bits (using
+ // have a bit in the log2(fPowerOf2Divisor)-th position if they were
+ // represented by an int. It then performs an xor of the 3 bits (using
// the property that serial xors can be treated as a sum of 0s & 1s mod 2).
fragBuilder->emitFunction(kFloat_GrSLType,
"xor",
@@ -298,7 +296,7 @@ private:
void onSetData(const GrGLSLProgramDataManager& pdman,
const GrXferProcessor& processor) override {
const PixelXorXP& pixelXor = processor.cast<PixelXorXP>();
- pdman.set3f(fOpColorUni,
+ pdman.set3f(fOpColorUni,
SkColorGetR(pixelXor.opColor())/255.0f,
SkColorGetG(pixelXor.opColor())/255.0f,
SkColorGetB(pixelXor.opColor())/255.0f);
@@ -388,10 +386,3 @@ bool SkPixelXorXfermode::asXPFactory(GrXPFactory** xpf) const {
}
#endif
-
-SkValue SkPixelXorXfermode::asValue() const {
- auto value = SkValue::Object(SkValue::PixelXorXfermode);
- value.set(SkValueKeys::PixelXorXfermode::kOpColor,
- SkValue::FromU32(SkToU32(fOpColor)));
- return value;
-}
« no previous file with comments | « src/effects/SkArithmeticMode.cpp ('k') | src/effects/SkToFromValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698