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

Side by Side Diff: src/images/SkImageDecoder_astc.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/images/SkImageDecoder_FactoryRegistrar.cpp ('k') | src/images/SkImageDecoder_ktx.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 2014 Google Inc. 2 * Copyright 2014 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 "SkEndian.h" 8 #include "SkEndian.h"
9 #include "SkColorPriv.h" 9 #include "SkColorPriv.h"
10 #include "SkImageDecoder.h" 10 #include "SkImageDecoder.h"
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 uint32_t magic; 179 uint32_t magic;
180 if (stream->read((void*)&magic, 4) != 4) { 180 if (stream->read((void*)&magic, 4) != 4) {
181 return false; 181 return false;
182 } 182 }
183 183
184 return kASTCMagicNumber == SkEndian_SwapLE32(magic); 184 return kASTCMagicNumber == SkEndian_SwapLE32(magic);
185 } 185 }
186 186
187 static SkImageDecoder* sk_libastc_dfactory(SkStreamRewindable* stream) { 187 static SkImageDecoder* sk_libastc_dfactory(SkStreamRewindable* stream) {
188 if (is_astc(stream)) { 188 if (is_astc(stream)) {
189 return SkNEW(SkASTCImageDecoder); 189 return new SkASTCImageDecoder;
190 } 190 }
191 return NULL; 191 return NULL;
192 } 192 }
193 193
194 static SkImageDecoder_DecodeReg gReg(sk_libastc_dfactory); 194 static SkImageDecoder_DecodeReg gReg(sk_libastc_dfactory);
195 195
196 static SkImageDecoder::Format get_format_astc(SkStreamRewindable* stream) { 196 static SkImageDecoder::Format get_format_astc(SkStreamRewindable* stream) {
197 if (is_astc(stream)) { 197 if (is_astc(stream)) {
198 return SkImageDecoder::kASTC_Format; 198 return SkImageDecoder::kASTC_Format;
199 } 199 }
200 return SkImageDecoder::kUnknown_Format; 200 return SkImageDecoder::kUnknown_Format;
201 } 201 }
202 202
203 static SkImageDecoder_FormatReg gFormatReg(get_format_astc); 203 static SkImageDecoder_FormatReg gFormatReg(get_format_astc);
OLDNEW
« no previous file with comments | « src/images/SkImageDecoder_FactoryRegistrar.cpp ('k') | src/images/SkImageDecoder_ktx.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698