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

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

Issue 1498583002: Revert of skstd -> std for unique_ptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years 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 | « include/private/SkUniquePtr.h ('k') | src/core/SkSharedMutex.h » ('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 "SkBitmapRegionCanvas.h" 8 #include "SkBitmapRegionCanvas.h"
9 #include "SkBitmapRegionCodec.h" 9 #include "SkBitmapRegionCodec.h"
10 #include "SkBitmapRegionDecoder.h" 10 #include "SkBitmapRegionDecoder.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 SkASSERT(SkCodec::kTopDown_SkScanlineOrder == codec->getScanlineOrde r() || 47 SkASSERT(SkCodec::kTopDown_SkScanlineOrder == codec->getScanlineOrde r() ||
48 SkCodec::kNone_SkScanlineOrder == codec->getScanlineOrder()) ; 48 SkCodec::kNone_SkScanlineOrder == codec->getScanlineOrder()) ;
49 49
50 return new SkBitmapRegionCanvas(codec.detach()); 50 return new SkBitmapRegionCanvas(codec.detach());
51 } 51 }
52 case kAndroidCodec_Strategy: { 52 case kAndroidCodec_Strategy: {
53 SkAutoTDelete<SkAndroidCodec> codec = 53 SkAutoTDelete<SkAndroidCodec> codec =
54 SkAndroidCodec::NewFromStream(streamDeleter.detach()); 54 SkAndroidCodec::NewFromStream(streamDeleter.detach());
55 if (nullptr == codec) { 55 if (nullptr == codec) {
56 SkCodecPrintf("Error: Failed to create codec.\n"); 56 SkCodecPrintf("Error: Failed to create codec.\n");
57 return nullptr; 57 return NULL;
58 } 58 }
59 59
60 SkEncodedFormat format = codec->getEncodedFormat(); 60 SkEncodedFormat format = codec->getEncodedFormat();
61 switch (format) { 61 switch (format) {
62 case SkEncodedFormat::kJPEG_SkEncodedFormat: 62 case SkEncodedFormat::kJPEG_SkEncodedFormat:
63 case SkEncodedFormat::kPNG_SkEncodedFormat: 63 case SkEncodedFormat::kPNG_SkEncodedFormat:
64 case SkEncodedFormat::kWEBP_SkEncodedFormat: 64 case SkEncodedFormat::kWEBP_SkEncodedFormat:
65 break; 65 break;
66 default: 66 default:
67 return nullptr; 67 return nullptr;
68 } 68 }
69 69
70 return new SkBitmapRegionCodec(codec.detach()); 70 return new SkBitmapRegionCodec(codec.detach());
71 } 71 }
72 default: 72 default:
73 SkASSERT(false); 73 SkASSERT(false);
74 return nullptr; 74 return nullptr;
75 } 75 }
76 } 76 }
OLDNEW
« no previous file with comments | « include/private/SkUniquePtr.h ('k') | src/core/SkSharedMutex.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698