aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2017-02-09 16:16:08 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-02-09 22:36:57 +0000
commite037d12625b1dbb7952ae8a6553d6830e8b3ebbf (patch)
tree45d703b50d0de790a1cded7a7175689dbabcc72b /src
parentd9569664fe76068adcc87d7a029350f5dbdbc4a6 (diff)
Roll minimum picture version up to 44.
This is the version produced by Chrome M54. M56 is stable now. I am most interested in deleting SkBitmapSourceDeserializer, because it awkwardly calls from core into effects (SkImageSource). Change-Id: I58b8b990017ba43372ab3333a4ef8312e75abc61 Reviewed-on: https://skia-review.googlesource.com/8286 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'src')
-rw-r--r--src/core/SkFontDescriptor.cpp12
-rw-r--r--src/core/SkPicturePlayback.cpp20
-rw-r--r--src/ports/SkGlobalInitialization_default.cpp3
-rw-r--r--src/utils/SkBitmapSourceDeserializer.cpp31
-rw-r--r--src/utils/SkBitmapSourceDeserializer.h21
5 files changed, 2 insertions, 85 deletions
diff --git a/src/core/SkFontDescriptor.cpp b/src/core/SkFontDescriptor.cpp
index 73ea2058ce..94fe23d446 100644
--- a/src/core/SkFontDescriptor.cpp
+++ b/src/core/SkFontDescriptor.cpp
@@ -20,7 +20,6 @@ enum {
// defines for names in its 'name' table.
kFontAxes = 0xFC,
kFontIndex = 0xFD,
- kFontFileName = 0xFE, // Remove when MIN_PICTURE_VERSION > 41
kSentinel = 0xFF,
};
@@ -34,14 +33,6 @@ static void read_string(SkStream* stream, SkString* string) {
}
}
-// Remove when MIN_PICTURE_VERSION > 41
-static void skip_string(SkStream* stream) {
- const uint32_t length = SkToU32(stream->readPackedUInt());
- if (length > 0) {
- stream->skip(length);
- }
-}
-
static void write_string(SkWStream* stream, const SkString& string, uint32_t id) {
if (!string.isEmpty()) {
stream->writePackedUInt(id);
@@ -94,9 +85,6 @@ bool SkFontDescriptor::Deserialize(SkStream* stream, SkFontDescriptor* result) {
case kFontIndex:
index = read_uint(stream);
break;
- case kFontFileName: // Remove when MIN_PICTURE_VERSION > 41
- skip_string(stream);
- break;
default:
SkDEBUGFAIL("Unknown id used by a font descriptor");
return false;
diff --git a/src/core/SkPicturePlayback.cpp b/src/core/SkPicturePlayback.cpp
index be2e5dbe04..d0309879d5 100644
--- a/src/core/SkPicturePlayback.cpp
+++ b/src/core/SkPicturePlayback.cpp
@@ -134,8 +134,8 @@ void SkPicturePlayback::handleOp(SkReadBuffer* reader,
reader->skip(size - 4);
} break;
case CLIP_PATH: {
- const SkPath& path = fPictureData->getPath(reader);
- uint32_t packed = reader->readInt();
+ const SkPath& path = fPictureData->getPath(reader);
+ uint32_t packed = reader->readInt();
SkClipOp clipOp = ClipParams_unpackRegionOp(reader, packed);
bool doAA = ClipParams_unpackDoAA(packed);
size_t offsetToRestore = reader->readInt();
@@ -329,22 +329,6 @@ void SkPicturePlayback::handleOp(SkReadBuffer* reader,
canvas->drawDRRect(outer, inner, *paint);
}
} break;
- case BEGIN_COMMENT_GROUP: {
- SkString tmp;
- reader->readString(&tmp);
- // deprecated (M44)
- break;
- }
- case COMMENT: {
- SkString tmp;
- reader->readString(&tmp);
- reader->readString(&tmp);
- // deprecated (M44)
- break;
- }
- case END_COMMENT_GROUP:
- // deprecated (M44)
- break;
case DRAW_IMAGE: {
const SkPaint* paint = fPictureData->getPaint(reader);
const SkImage* image = fPictureData->getImage(reader);
diff --git a/src/ports/SkGlobalInitialization_default.cpp b/src/ports/SkGlobalInitialization_default.cpp
index dd6ef873b3..2096993bd7 100644
--- a/src/ports/SkGlobalInitialization_default.cpp
+++ b/src/ports/SkGlobalInitialization_default.cpp
@@ -10,7 +10,6 @@
#include "SkAlphaThresholdFilter.h"
#include "../../src/effects/SkArithmeticModePriv.h"
#include "SkArcToPathEffect.h"
-#include "SkBitmapSourceDeserializer.h"
#include "SkBlurDrawLooper.h"
#include "SkBlurImageFilter.h"
#include "SkBlurMaskFilter.h"
@@ -65,8 +64,6 @@
* will automatically be called before any of skia's effects are asked to be deserialized.
*/
void SkFlattenable::PrivateInitializer::InitEffects() {
- SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBitmapSourceDeserializer)
-
// MaskFilter
SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkEmbossMaskFilter)
SkBlurMaskFilter::InitializeFlattenables();
diff --git a/src/utils/SkBitmapSourceDeserializer.cpp b/src/utils/SkBitmapSourceDeserializer.cpp
deleted file mode 100644
index 1f8cc1c7bd..0000000000
--- a/src/utils/SkBitmapSourceDeserializer.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright 2015 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include "SkBitmapSourceDeserializer.h"
-
-#include "SkBitmap.h"
-#include "SkFilterQuality.h"
-#include "SkImage.h"
-#include "SkImageSource.h"
-#include "SkReadBuffer.h"
-
-sk_sp<SkFlattenable> SkBitmapSourceDeserializer::CreateProc(SkReadBuffer& buffer) {
- SkFilterQuality filterQuality;
- if (buffer.isVersionLT(SkReadBuffer::kBitmapSourceFilterQuality_Version)) {
- filterQuality = kHigh_SkFilterQuality;
- } else {
- filterQuality = (SkFilterQuality)buffer.readInt();
- }
- SkRect src, dst;
- buffer.readRect(&src);
- buffer.readRect(&dst);
- sk_sp<SkImage> image = buffer.readBitmapAsImage();
- if (image) {
- return SkImageSource::Make(std::move(image), src, dst, filterQuality);
- }
- return nullptr;
-}
diff --git a/src/utils/SkBitmapSourceDeserializer.h b/src/utils/SkBitmapSourceDeserializer.h
deleted file mode 100644
index e017599918..0000000000
--- a/src/utils/SkBitmapSourceDeserializer.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright 2015 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef SkBitmapSourceDeserializer_DEFINED
-#define SkBitmapSourceDeserializer_DEFINED
-
-#include "SkFlattenable.h"
-
-// A temporary utility class to support deserializing legacy SkBitmapSource as SkImageSource.
-// Should be removed when SKP versions which may contain SkBitmapSource records are phased out.
-class SkBitmapSourceDeserializer : public SkFlattenable {
-public:
- SK_DEFINE_FLATTENABLE_TYPE(SkImageFilter)
- SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkBitmapSource)
-};
-
-#endif