OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "DMSrcSink.h" | 8 #include "DMSrcSink.h" |
9 #include "SamplePipeControllers.h" | 9 #include "SamplePipeControllers.h" |
10 #include "SkCodec.h" | 10 #include "SkCodec.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 #include "SkScanlineDecoder.h" | 27 #include "SkScanlineDecoder.h" |
28 #include "SkStream.h" | 28 #include "SkStream.h" |
29 #include "SkXMLWriter.h" | 29 #include "SkXMLWriter.h" |
30 #include "SkScaledCodec.h" | 30 #include "SkScaledCodec.h" |
31 | 31 |
32 DEFINE_bool(multiPage, false, "For document-type backends, render the source" | 32 DEFINE_bool(multiPage, false, "For document-type backends, render the source" |
33 " into multiple pages"); | 33 " into multiple pages"); |
34 | 34 |
35 static bool lazy_decode_bitmap(const void* src, size_t size, SkBitmap* dst) { | 35 static bool lazy_decode_bitmap(const void* src, size_t size, SkBitmap* dst) { |
36 SkAutoTUnref<SkData> encoded(SkData::NewWithCopy(src, size)); | 36 SkAutoTUnref<SkData> encoded(SkData::NewWithCopy(src, size)); |
37 return encoded && SkInstallDiscardablePixelRef(encoded, dst); | 37 return encoded && SkDEPRECATED_InstallDiscardablePixelRef(encoded, dst); |
38 } | 38 } |
39 | 39 |
40 namespace DM { | 40 namespace DM { |
41 | 41 |
42 GMSrc::GMSrc(skiagm::GMRegistry::Factory factory) : fFactory(factory) {} | 42 GMSrc::GMSrc(skiagm::GMRegistry::Factory factory) : fFactory(factory) {} |
43 | 43 |
44 Error GMSrc::draw(SkCanvas* canvas) const { | 44 Error GMSrc::draw(SkCanvas* canvas) const { |
45 SkAutoTDelete<skiagm::GM> gm(fFactory(nullptr)); | 45 SkAutoTDelete<skiagm::GM> gm(fFactory(nullptr)); |
46 canvas->concat(gm->getInitialTransform()); | 46 canvas->concat(gm->getInitialTransform()); |
47 gm->draw(canvas); | 47 gm->draw(canvas); |
(...skipping 1221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1269 skr.visit<void>(i, drawsAsSingletonPictures); | 1269 skr.visit<void>(i, drawsAsSingletonPictures); |
1270 } | 1270 } |
1271 SkAutoTUnref<SkPicture> macroPic(macroRec.endRecordingAsPicture()); | 1271 SkAutoTUnref<SkPicture> macroPic(macroRec.endRecordingAsPicture()); |
1272 | 1272 |
1273 canvas->drawPicture(macroPic); | 1273 canvas->drawPicture(macroPic); |
1274 return ""; | 1274 return ""; |
1275 }); | 1275 }); |
1276 } | 1276 } |
1277 | 1277 |
1278 } // namespace DM | 1278 } // namespace DM |
OLD | NEW |