Revert "Roll minimum picture version up to 44."
This reverts commit e037d12625b1dbb7952ae8a6553d6830e8b3ebbf.
Reason for revert: Checking to see if this broke the Chrome DEPS roll
Original change's description:
> 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>
>
TBR=mtklein@chromium.org,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I9202591c7945c9421f335e544bf12461e38acdc6
Reviewed-on: https://skia-review.googlesource.com/8305
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/src/utils/SkBitmapSourceDeserializer.cpp b/src/utils/SkBitmapSourceDeserializer.cpp
new file mode 100644
index 0000000..1f8cc1c
--- /dev/null
+++ b/src/utils/SkBitmapSourceDeserializer.cpp
@@ -0,0 +1,31 @@
+/*
+ * 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;
+}