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

Side by Side Diff: src/images/SkImageDecoder_pkm.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_libwebp.cpp ('k') | src/images/SkImageDecoder_wbmp.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 "SkColorPriv.h" 8 #include "SkColorPriv.h"
9 #include "SkImageDecoder.h" 9 #include "SkImageDecoder.h"
10 #include "SkScaledBitmapSampler.h" 10 #include "SkScaledBitmapSampler.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 unsigned char buf[ETC_PKM_HEADER_SIZE]; 104 unsigned char buf[ETC_PKM_HEADER_SIZE];
105 if (stream->read((void*)buf, ETC_PKM_HEADER_SIZE) != ETC_PKM_HEADER_SIZE) { 105 if (stream->read((void*)buf, ETC_PKM_HEADER_SIZE) != ETC_PKM_HEADER_SIZE) {
106 return false; 106 return false;
107 } 107 }
108 108
109 return SkToBool(etc1_pkm_is_valid(buf)); 109 return SkToBool(etc1_pkm_is_valid(buf));
110 } 110 }
111 111
112 static SkImageDecoder* sk_libpkm_dfactory(SkStreamRewindable* stream) { 112 static SkImageDecoder* sk_libpkm_dfactory(SkStreamRewindable* stream) {
113 if (is_pkm(stream)) { 113 if (is_pkm(stream)) {
114 return SkNEW(SkPKMImageDecoder); 114 return new SkPKMImageDecoder;
115 } 115 }
116 return NULL; 116 return NULL;
117 } 117 }
118 118
119 static SkImageDecoder_DecodeReg gReg(sk_libpkm_dfactory); 119 static SkImageDecoder_DecodeReg gReg(sk_libpkm_dfactory);
120 120
121 static SkImageDecoder::Format get_format_pkm(SkStreamRewindable* stream) { 121 static SkImageDecoder::Format get_format_pkm(SkStreamRewindable* stream) {
122 if (is_pkm(stream)) { 122 if (is_pkm(stream)) {
123 return SkImageDecoder::kPKM_Format; 123 return SkImageDecoder::kPKM_Format;
124 } 124 }
125 return SkImageDecoder::kUnknown_Format; 125 return SkImageDecoder::kUnknown_Format;
126 } 126 }
127 127
128 static SkImageDecoder_FormatReg gFormatReg(get_format_pkm); 128 static SkImageDecoder_FormatReg gFormatReg(get_format_pkm);
OLDNEW
« no previous file with comments | « src/images/SkImageDecoder_libwebp.cpp ('k') | src/images/SkImageDecoder_wbmp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698