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

Unified Diff: dm/DMSrcSink.cpp

Issue 1699183004: Make SkPicture/SkImageGenerator default to SkCodec (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix rebase bug 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
« no previous file with comments | « bench/ETCBitmapBench.cpp ('k') | gyp/codec.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DMSrcSink.cpp
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp
index e5d18cdaafd86af6d66ff5f3b4660619b64cc933..366d8f860ebb9278e8ded9f46b4615cd16b24eb3 100644
--- a/dm/DMSrcSink.cpp
+++ b/dm/DMSrcSink.cpp
@@ -40,11 +40,6 @@ DEFINE_bool(multiPage, false, "For document-type backends, render the source"
" into multiple pages");
DEFINE_bool(RAW_threading, true, "Allow RAW decodes to run on multiple threads?");
-static bool lazy_decode_bitmap(const void* src, size_t size, SkBitmap* dst) {
- SkAutoTUnref<SkData> encoded(SkData::NewWithCopy(src, size));
- return encoded && SkDEPRECATED_InstallDiscardablePixelRef(encoded, dst);
-}
-
namespace DM {
GMSrc::GMSrc(skiagm::GMRegistry::Factory factory) : fFactory(factory) {}
@@ -805,7 +800,7 @@ Error SKPSrc::draw(SkCanvas* canvas) const {
if (!stream) {
return SkStringPrintf("Couldn't read %s.", fPath.c_str());
}
- SkAutoTUnref<SkPicture> pic(SkPicture::CreateFromStream(stream, &lazy_decode_bitmap));
+ SkAutoTUnref<SkPicture> pic(SkPicture::CreateFromStream(stream));
if (!pic) {
return SkStringPrintf("Couldn't decode %s as a picture.", fPath.c_str());
}
@@ -1178,7 +1173,7 @@ Error ViaSerialization::draw(
SkDynamicMemoryWStream wStream;
pic->serialize(&wStream);
SkAutoTDelete<SkStream> rStream(wStream.detachAsStream());
- SkAutoTUnref<SkPicture> deserialized(SkPicture::CreateFromStream(rStream, &lazy_decode_bitmap));
+ SkAutoTUnref<SkPicture> deserialized(SkPicture::CreateFromStream(rStream));
return draw_to_canvas(fSink, bitmap, stream, log, size, [&](SkCanvas* canvas) {
canvas->drawPicture(deserialized);
« no previous file with comments | « bench/ETCBitmapBench.cpp ('k') | gyp/codec.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698