aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2017-10-13 12:13:17 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-10-13 17:00:48 +0000
commitce4a389aa89642ed9a13765bd7e4495dceae701e (patch)
treeec257abbd6914c5adae62a1bb9e83f6db0dfc46b
parent69544ec14b5a4ac5b5695860e2ecb77406ec1033 (diff)
remove dead code -- older than min picture version
Bug: skia: Change-Id: I9bd3ed23debb4d0cbfff5417f34daf64b101ca2d Reviewed-on: https://skia-review.googlesource.com/59602 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
-rw-r--r--gn/utils.gni2
-rw-r--r--src/core/SkPictureFlat.h8
-rw-r--r--src/core/SkPicturePlayback.cpp17
-rw-r--r--src/ports/SkGlobalInitialization_default.cpp3
-rw-r--r--src/utils/SkBitmapSourceDeserializer.cpp26
-rw-r--r--src/utils/SkBitmapSourceDeserializer.h21
6 files changed, 4 insertions, 73 deletions
diff --git a/gn/utils.gni b/gn/utils.gni
index a8ceba2968..54e7f4443d 100644
--- a/gn/utils.gni
+++ b/gn/utils.gni
@@ -26,8 +26,6 @@ skia_utils_sources = [
"$_src/utils/SkBase64.cpp",
"$_src/utils/SkBase64.h",
- "$_src/utils/SkBitmapSourceDeserializer.cpp",
- "$_src/utils/SkBitmapSourceDeserializer.h",
"$_src/utils/SkBitSet.h",
"$_src/utils/SkFrontBufferedStream.cpp",
"$_src/utils/SkCamera.cpp",
diff --git a/src/core/SkPictureFlat.h b/src/core/SkPictureFlat.h
index 866c707359..c0080f74c7 100644
--- a/src/core/SkPictureFlat.h
+++ b/src/core/SkPictureFlat.h
@@ -61,9 +61,9 @@ enum DrawType {
SKEW,
TRANSLATE,
NOOP,
- BEGIN_COMMENT_GROUP, // deprecated (M44)
- COMMENT, // deprecated (M44)
- END_COMMENT_GROUP, // deprecated (M44)
+ BEGIN_COMMENT_GROUP_obsolete,
+ COMMENT_obsolete,
+ END_COMMENT_GROUP_obsolete,
// new ops -- feel free to re-alphabetize on next version bump
DRAW_DRRECT,
@@ -74,7 +74,7 @@ enum DrawType {
DRAW_PICTURE_MATRIX_PAINT,
DRAW_TEXT_BLOB,
DRAW_IMAGE,
- DRAW_IMAGE_RECT_STRICT, // deprecated (M45)
+ DRAW_IMAGE_RECT_STRICT_obsolete,
DRAW_ATLAS,
DRAW_IMAGE_NINE,
DRAW_IMAGE_RECT,
diff --git a/src/core/SkPicturePlayback.cpp b/src/core/SkPicturePlayback.cpp
index c0adaaa941..f9f390ef5a 100644
--- a/src/core/SkPicturePlayback.cpp
+++ b/src/core/SkPicturePlayback.cpp
@@ -333,22 +333,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);
@@ -389,7 +373,6 @@ void SkPicturePlayback::handleOp(SkReadBuffer* reader,
canvas->drawImageNine(image, center, dst, paint);
} break;
- case DRAW_IMAGE_RECT_STRICT:
case DRAW_IMAGE_RECT: {
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 52ef365ea2..c1256ef85c 100644
--- a/src/ports/SkGlobalInitialization_default.cpp
+++ b/src/ports/SkGlobalInitialization_default.cpp
@@ -8,7 +8,6 @@
#include "Sk1DPathEffect.h"
#include "Sk2DPathEffect.h"
#include "SkAlphaThresholdFilter.h"
-#include "SkBitmapSourceDeserializer.h"
#include "SkBlurImageFilter.h"
#include "SkBlurMaskFilter.h"
#include "SkColorFilterImageFilter.h"
@@ -61,8 +60,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 ccc95eefcf..0000000000
--- a/src/utils/SkBitmapSourceDeserializer.cpp
+++ /dev/null
@@ -1,26 +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 = (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