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

Unified Diff: dm/DMSrcSink.cpp

Issue 1671193002: Make SkPicture/SkImageGenerator default to SkCodec (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Move ImageGenerator impl into ktx code to share with nanobench 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 dd994b609015e31d951df3eab3bc29cee631cafa..f4c4b10c3e7f4b4ef06b6b28319bffde4b77c908 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) {}
@@ -802,7 +797,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());
}
@@ -1175,7 +1170,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