Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Unified Diff: src/core/SkPicture.cpp

Issue 1671193002: Make SkPicture/SkImageGenerator default to SkCodec (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add references to bugs Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/core/SkPicture.cpp
diff --git a/src/core/SkPicture.cpp b/src/core/SkPicture.cpp
index 8247336d49e96d3d7698dbb8bdaf61a1a9498b41..55d5f42c65b7877cc6f68eb8fdb91022412706f1 100644
--- a/src/core/SkPicture.cpp
+++ b/src/core/SkPicture.cpp
@@ -6,6 +6,7 @@
*/
#include "SkAtomics.h"
+#include "SkImageGenerator.h"
#include "SkMessageBus.h"
#include "SkPicture.h"
#include "SkPictureData.h"
@@ -138,6 +139,12 @@ SkPicture* SkPicture::Forwardport(const SkPictInfo& info, const SkPictureData* d
return r.endRecording();
}
+bool SkPicture::DefaultInstall(const void* src, size_t length, SkBitmap* dst) {
+ SkAutoTUnref<SkData> encoded(SkData::NewWithCopy(src, length));
+ return encoded && SkDEPRECATED_InstallDiscardablePixelRef(
+ SkImageGenerator::NewFromEncoded(encoded), dst);
+}
+
SkPicture* SkPicture::CreateFromStream(SkStream* stream, InstallPixelRefProc proc) {
return CreateFromStream(stream, proc, nullptr);
}
« include/core/SkPicture.h ('K') | « public.bzl ('k') | src/ports/SkImageGenerator_skia.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698