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/images/SkImageDecoder_libico.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_libgif.cpp ('k') | src/images/SkImageDecoder_libjpeg.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 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
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 "SkColorPriv.h" 8 #include "SkColorPriv.h"
9 #include "SkImageDecoder.h" 9 #include "SkImageDecoder.h"
10 #include "SkStream.h" 10 #include "SkStream.h"
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 if (stream->read((void*)buf, 4) != 4) { 428 if (stream->read((void*)buf, 4) != 4) {
429 return false; 429 return false;
430 } 430 }
431 int reserved = read2Bytes(buf, 0); 431 int reserved = read2Bytes(buf, 0);
432 int type = read2Bytes(buf, 2); 432 int type = read2Bytes(buf, 2);
433 return 0 == reserved && 1 == type; 433 return 0 == reserved && 1 == type;
434 } 434 }
435 435
436 static SkImageDecoder* sk_libico_dfactory(SkStreamRewindable* stream) { 436 static SkImageDecoder* sk_libico_dfactory(SkStreamRewindable* stream) {
437 if (is_ico(stream)) { 437 if (is_ico(stream)) {
438 return SkNEW(SkICOImageDecoder); 438 return new SkICOImageDecoder;
439 } 439 }
440 return NULL; 440 return NULL;
441 } 441 }
442 442
443 static SkImageDecoder_DecodeReg gReg(sk_libico_dfactory); 443 static SkImageDecoder_DecodeReg gReg(sk_libico_dfactory);
444 444
445 static SkImageDecoder::Format get_format_ico(SkStreamRewindable* stream) { 445 static SkImageDecoder::Format get_format_ico(SkStreamRewindable* stream) {
446 if (is_ico(stream)) { 446 if (is_ico(stream)) {
447 return SkImageDecoder::kICO_Format; 447 return SkImageDecoder::kICO_Format;
448 } 448 }
449 return SkImageDecoder::kUnknown_Format; 449 return SkImageDecoder::kUnknown_Format;
450 } 450 }
451 451
452 static SkImageDecoder_FormatReg gFormatReg(get_format_ico); 452 static SkImageDecoder_FormatReg gFormatReg(get_format_ico);
OLDNEW
« no previous file with comments | « src/images/SkImageDecoder_libgif.cpp ('k') | src/images/SkImageDecoder_libjpeg.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698