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

Side by Side Diff: src/android/SkBitmapRegionDecoder.cpp

Issue 2333713002: change SkStreams to work with sk_sp<SkData> instead of SkData* (Closed)
Patch Set: fix xpsdevice Created 4 years, 3 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 | « samplecode/DecodeFile.h ('k') | src/codec/SkAndroidCodec.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 "SkBitmapRegionCodec.h" 8 #include "SkBitmapRegionCodec.h"
9 #include "SkBitmapRegionDecoder.h" 9 #include "SkBitmapRegionDecoder.h"
10 #include "SkAndroidCodec.h" 10 #include "SkAndroidCodec.h"
11 #include "SkCodec.h" 11 #include "SkCodec.h"
12 #include "SkCodecPriv.h" 12 #include "SkCodecPriv.h"
13 13
14 SkBitmapRegionDecoder* SkBitmapRegionDecoder::Create( 14 SkBitmapRegionDecoder* SkBitmapRegionDecoder::Create(
15 SkData* data, Strategy strategy) { 15 sk_sp<SkData> data, Strategy strategy) {
16 return SkBitmapRegionDecoder::Create(new SkMemoryStream(data), 16 return SkBitmapRegionDecoder::Create(new SkMemoryStream(data),
17 strategy); 17 strategy);
18 } 18 }
19 19
20 SkBitmapRegionDecoder* SkBitmapRegionDecoder::Create( 20 SkBitmapRegionDecoder* SkBitmapRegionDecoder::Create(
21 SkStreamRewindable* stream, Strategy strategy) { 21 SkStreamRewindable* stream, Strategy strategy) {
22 SkAutoTDelete<SkStreamRewindable> streamDeleter(stream); 22 SkAutoTDelete<SkStreamRewindable> streamDeleter(stream);
23 switch (strategy) { 23 switch (strategy) {
24 case kAndroidCodec_Strategy: { 24 case kAndroidCodec_Strategy: {
25 SkAutoTDelete<SkAndroidCodec> codec = 25 SkAutoTDelete<SkAndroidCodec> codec =
(...skipping 13 matching lines...) Expand all
39 return nullptr; 39 return nullptr;
40 } 40 }
41 41
42 return new SkBitmapRegionCodec(codec.release()); 42 return new SkBitmapRegionCodec(codec.release());
43 } 43 }
44 default: 44 default:
45 SkASSERT(false); 45 SkASSERT(false);
46 return nullptr; 46 return nullptr;
47 } 47 }
48 } 48 }
OLDNEW
« no previous file with comments | « samplecode/DecodeFile.h ('k') | src/codec/SkAndroidCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698