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_libbmp.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_ktx.cpp ('k') | src/images/SkImageDecoder_libgif.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 /* 2 /*
3 * Copyright 2007 The Android Open Source Project 3 * Copyright 2007 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "bmpdecoderhelper.h" 10 #include "bmpdecoderhelper.h"
(...skipping 28 matching lines...) Expand all
39 39
40 40
41 char buffer[sizeof(kBmpMagic)]; 41 char buffer[sizeof(kBmpMagic)];
42 42
43 return stream->read(buffer, sizeof(kBmpMagic)) == sizeof(kBmpMagic) && 43 return stream->read(buffer, sizeof(kBmpMagic)) == sizeof(kBmpMagic) &&
44 !memcmp(buffer, kBmpMagic, sizeof(kBmpMagic)); 44 !memcmp(buffer, kBmpMagic, sizeof(kBmpMagic));
45 } 45 }
46 46
47 static SkImageDecoder* sk_libbmp_dfactory(SkStreamRewindable* stream) { 47 static SkImageDecoder* sk_libbmp_dfactory(SkStreamRewindable* stream) {
48 if (is_bmp(stream)) { 48 if (is_bmp(stream)) {
49 return SkNEW(SkBMPImageDecoder); 49 return new SkBMPImageDecoder;
50 } 50 }
51 return NULL; 51 return NULL;
52 } 52 }
53 53
54 static SkImageDecoder_DecodeReg gReg(sk_libbmp_dfactory); 54 static SkImageDecoder_DecodeReg gReg(sk_libbmp_dfactory);
55 55
56 static SkImageDecoder::Format get_format_bmp(SkStreamRewindable* stream) { 56 static SkImageDecoder::Format get_format_bmp(SkStreamRewindable* stream) {
57 if (is_bmp(stream)) { 57 if (is_bmp(stream)) {
58 return SkImageDecoder::kBMP_Format; 58 return SkImageDecoder::kBMP_Format;
59 } 59 }
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 const int dstHeight = sampler.scaledHeight(); 153 const int dstHeight = sampler.scaledHeight();
154 const uint8_t* srcRow = callback.rgb(); 154 const uint8_t* srcRow = callback.rgb();
155 155
156 srcRow += sampler.srcY0() * srcRowBytes; 156 srcRow += sampler.srcY0() * srcRowBytes;
157 for (int y = 0; y < dstHeight; y++) { 157 for (int y = 0; y < dstHeight; y++) {
158 sampler.next(srcRow); 158 sampler.next(srcRow);
159 srcRow += sampler.srcDY() * srcRowBytes; 159 srcRow += sampler.srcDY() * srcRowBytes;
160 } 160 }
161 return kSuccess; 161 return kSuccess;
162 } 162 }
OLDNEW
« no previous file with comments | « src/images/SkImageDecoder_ktx.cpp ('k') | src/images/SkImageDecoder_libgif.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698