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

Side by Side Diff: src/codec/SkScanlineDecoder.cpp

Issue 1316123003: Style Change: SkNEW->new; SkDELETE->delete (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-26 (Wednesday) 15:59:00 EDT Created 5 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 | « src/codec/SkScaledCodec.cpp ('k') | src/codec/SkSwizzler.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 "SkScanlineDecoder.h" 8 #include "SkScanlineDecoder.h"
9 #include "SkCodec_libpng.h" 9 #include "SkCodec_libpng.h"
10 #include "SkCodec_wbmp.h" 10 #include "SkCodec_wbmp.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 return NULL; 55 return NULL;
56 } else { 56 } else {
57 return codec.detach(); 57 return codec.detach();
58 } 58 }
59 } 59 }
60 60
61 SkScanlineDecoder* SkScanlineDecoder::NewFromData(SkData* data) { 61 SkScanlineDecoder* SkScanlineDecoder::NewFromData(SkData* data) {
62 if (!data) { 62 if (!data) {
63 return NULL; 63 return NULL;
64 } 64 }
65 return NewFromStream(SkNEW_ARGS(SkMemoryStream, (data))); 65 return NewFromStream(new SkMemoryStream(data));
66 } 66 }
67 67
68 68
69 SkCodec::Result SkScanlineDecoder::start(const SkImageInfo& dstInfo, 69 SkCodec::Result SkScanlineDecoder::start(const SkImageInfo& dstInfo,
70 const SkCodec::Options* options, SkPMColor ctable[], int* ctableCount) { 70 const SkCodec::Options* options, SkPMColor ctable[], int* ctableCount) {
71 // Ensure that valid color ptrs are passed in for kIndex8 color type 71 // Ensure that valid color ptrs are passed in for kIndex8 color type
72 if (kIndex_8_SkColorType == dstInfo.colorType()) { 72 if (kIndex_8_SkColorType == dstInfo.colorType()) {
73 if (NULL == ctable || NULL == ctableCount) { 73 if (NULL == ctable || NULL == ctableCount) {
74 return SkCodec::kInvalidParameters; 74 return SkCodec::kInvalidParameters;
75 } 75 }
(...skipping 18 matching lines...) Expand all
94 94
95 fCurrScanline = 0; 95 fCurrScanline = 0;
96 fDstInfo = dstInfo; 96 fDstInfo = dstInfo;
97 return SkCodec::kSuccess; 97 return SkCodec::kSuccess;
98 } 98 }
99 99
100 SkCodec::Result SkScanlineDecoder::start(const SkImageInfo& dstInfo) { 100 SkCodec::Result SkScanlineDecoder::start(const SkImageInfo& dstInfo) {
101 return this->start(dstInfo, NULL, NULL, NULL); 101 return this->start(dstInfo, NULL, NULL, NULL);
102 } 102 }
103 103
OLDNEW
« no previous file with comments | « src/codec/SkScaledCodec.cpp ('k') | src/codec/SkSwizzler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698