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

Side by Side Diff: dm/DMSrcSink.cpp

Issue 1372593002: SkInstallDiscardablePixelRef is deprecated, enforce that (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | gm/factory.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | gm/factory.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698