aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkPaint.cpp
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2017-06-08 12:45:52 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-06-08 18:23:19 +0000
commit70bc94f273224ed0755ae11dc479c57ff37e0436 (patch)
treef25bc45fd7e882d3baee4b3640b82b881d45ae23 /src/core/SkPaint.cpp
parentbc2cdd154bf5a031ca9d3a530123d9f7a4c0925d (diff)
Bump min picture to 7+ months ago
Delete lots of support code, including need for SkXfermode objects which are no longer used anywhere else. Bug: skia: Change-Id: Id6b7ef0f529691041ff2b206c35e336e8a4c974d Reviewed-on: https://skia-review.googlesource.com/19059 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/core/SkPaint.cpp')
-rw-r--r--src/core/SkPaint.cpp25
1 files changed, 3 insertions, 22 deletions
diff --git a/src/core/SkPaint.cpp b/src/core/SkPaint.cpp
index 78754957cf..dcd29d6100 100644
--- a/src/core/SkPaint.cpp
+++ b/src/core/SkPaint.cpp
@@ -1917,14 +1917,9 @@ void SkPaint::unflatten(SkReadBuffer& buffer) {
uint32_t tmp = buffer.readUInt();
this->setStrokeCap(static_cast<Cap>((tmp >> 24) & 0xFF));
this->setStrokeJoin(static_cast<Join>((tmp >> 16) & 0xFF));
- if (buffer.isVersionLT(SkReadBuffer::kXfermodeToBlendMode_Version)) {
- this->setStyle(static_cast<Style>((tmp >> 8) & 0xFF));
- this->setTextEncoding(static_cast<TextEncoding>((tmp >> 0) & 0xFF));
- } else {
- this->setStyle(static_cast<Style>((tmp >> 12) & 0xF));
- this->setTextEncoding(static_cast<TextEncoding>((tmp >> 8) & 0xF));
- this->setBlendMode((SkBlendMode)(tmp & 0xFF));
- }
+ this->setStyle(static_cast<Style>((tmp >> 12) & 0xF));
+ this->setTextEncoding(static_cast<TextEncoding>((tmp >> 8) & 0xF));
+ this->setBlendMode((SkBlendMode)(tmp & 0xFF));
if (flatFlags & kHasTypeface_FlatFlag) {
this->setTypeface(buffer.readTypeface());
@@ -1935,25 +1930,11 @@ void SkPaint::unflatten(SkReadBuffer& buffer) {
if (flatFlags & kHasEffects_FlatFlag) {
this->setPathEffect(buffer.readPathEffect());
this->setShader(buffer.readShader());
- if (buffer.isVersionLT(SkReadBuffer::kXfermodeToBlendMode_Version)) {
- sk_sp<SkXfermode> xfer = buffer.readXfermode();
- this->setBlendMode(xfer ? xfer->blend() : SkBlendMode::kSrcOver);
- }
this->setMaskFilter(buffer.readMaskFilter());
this->setColorFilter(buffer.readColorFilter());
this->setRasterizer(buffer.readRasterizer());
this->setLooper(buffer.readDrawLooper());
this->setImageFilter(buffer.readImageFilter());
-
- if (buffer.isVersionLT(SkReadBuffer::kAnnotationsMovedToCanvas_Version)) {
- // We used to store annotations here (string+skdata) if this bool was true
- if (buffer.readBool()) {
- // Annotations have moved to drawAnnotation, so we just drop this one on the floor.
- SkString key;
- buffer.readString(&key);
- (void)buffer.readByteArrayAsData();
- }
- }
} else {
this->setPathEffect(nullptr);
this->setShader(nullptr);