BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3727
Change-Id: Ic07ea6bd2756f1be08e80075c236a70ce6c08a3b
TBR=mtklein
Reviewed-on: https://skia-review.googlesource.com/3727
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
virtual sk_sp<SkTypeface> deserialize(const void* data, size_t size) = 0;
};
-class SkImageDeserializer {
-public:
- virtual ~SkImageDeserializer() {}
-
- virtual sk_sp<SkImage> deserialize(const void*, size_t) = 0;
-};
-
#endif
#include "SkCanvas.h"
#include "SkDeduper.h"
+#include "SkImageDeserializer.h"
#include "SkPicture.h"
#include "SkPictureRecorder.h"
#include "SkPipe.h"
sk_sp<SkImage> SkPipeInflator::makeImage(const sk_sp<SkData>& data) {
if (fIMDeserializer) {
- return fIMDeserializer->deserialize(data->data(), data->size());
+ return fIMDeserializer->makeFromData(data.get(), nullptr);
}
sk_sp<SkImage> image = make_from_skiaimageformat(data->data(), data->size());
if (!image) {