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

Unified Diff: src/effects/SkPixelXorXfermode.cpp

Issue 395603002: Simplify flattening to just write enough to call the factory (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 4 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/SkPictureImageFilter.cpp ('k') | src/effects/SkRectShaderImageFilter.cpp » ('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 129f1823d5fc4c6e1220f0c347ba1339fd4c3ca8..68b5306a5262cf1e6872dcecb9bc15ffd5ea69fa 100644
--- a/src/effects/SkPixelXorXfermode.cpp
+++ b/src/effects/SkPixelXorXfermode.cpp
@@ -22,14 +22,18 @@ SkPMColor SkPixelXorXfermode::xferColor(SkPMColor src, SkPMColor dst) const {
}
void SkPixelXorXfermode::flatten(SkWriteBuffer& wb) const {
- this->INHERITED::flatten(wb);
wb.writeColor(fOpColor);
}
-SkPixelXorXfermode::SkPixelXorXfermode(SkReadBuffer& rb)
- : INHERITED(rb) {
+#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
+SkPixelXorXfermode::SkPixelXorXfermode(SkReadBuffer& rb) : INHERITED(rb) {
fOpColor = rb.readColor();
}
+#endif
+
+SkFlattenable* SkPixelXorXfermode::CreateProc(SkReadBuffer& buffer) {
+ return Create(buffer.readColor());
+}
#ifndef SK_IGNORE_TO_STRING
void SkPixelXorXfermode::toString(SkString* str) const {
« no previous file with comments | « src/effects/SkPictureImageFilter.cpp ('k') | src/effects/SkRectShaderImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698