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

Side by Side Diff: src/images/bmpdecoderhelper.cpp

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 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/bmpdecoderhelper.h ('k') | src/lazy/SkCachingPixelRef.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 // Author: cevans@google.com (Chris Evans) 9 // Author: cevans@google.com (Chris Evans)
10 10
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 if (offset > 0 && (size_t)offset > pos_ && (size_t)offset < len_) { 156 if (offset > 0 && (size_t)offset > pos_ && (size_t)offset < len_) {
157 pos_ = offset; 157 pos_ = offset;
158 } 158 }
159 // Deliberately off-by-one; a load of BMPs seem to have their last byte 159 // Deliberately off-by-one; a load of BMPs seem to have their last byte
160 // missing. 160 // missing.
161 if (!rle && (pos_ + (rowLen * height_) > len_ + 1)) { 161 if (!rle && (pos_ + (rowLen * height_) > len_ + 1)) {
162 return false; 162 return false;
163 } 163 }
164 164
165 output_ = callback->SetSize(width_, height_); 165 output_ = callback->SetSize(width_, height_);
166 if (NULL == output_) { 166 if (nullptr == output_) {
167 return true; // meaning we succeeded, but they want us to stop now 167 return true; // meaning we succeeded, but they want us to stop now
168 } 168 }
169 169
170 if (rle && (bpp_ == 4 || bpp_ == 8)) { 170 if (rle && (bpp_ == 4 || bpp_ == 8)) {
171 DoRLEDecode(); 171 DoRLEDecode();
172 } else { 172 } else {
173 DoStandardDecode(); 173 DoStandardDecode();
174 } 174 }
175 return true; 175 return true;
176 } 176 }
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 mask >>= 1; 360 mask >>= 1;
361 } 361 }
362 while (mask != 0 && !(mask & 0x80)) { 362 while (mask != 0 && !(mask & 0x80)) {
363 mask <<= 1; 363 mask <<= 1;
364 ret++; 364 ret++;
365 } 365 }
366 return ret; 366 return ret;
367 } 367 }
368 368
369 } // namespace image_codec 369 } // namespace image_codec
OLDNEW
« no previous file with comments | « src/images/bmpdecoderhelper.h ('k') | src/lazy/SkCachingPixelRef.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698