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

Side by Side Diff: src/images/SkJpegUtility.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/SkImageEncoder_argb.cpp ('k') | src/images/SkMovie.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 2010 The Android Open Source Project 2 * Copyright 2010 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 8
9 #include "SkJpegUtility.h" 9 #include "SkJpegUtility.h"
10 10
(...skipping 29 matching lines...) Expand all
40 40
41 src->current_offset = bo; 41 src->current_offset = bo;
42 src->next_input_byte = (const JOCTET*)src->fBuffer; 42 src->next_input_byte = (const JOCTET*)src->fBuffer;
43 src->bytes_in_buffer = 0; 43 src->bytes_in_buffer = 0;
44 return true; 44 return true;
45 } 45 }
46 #endif 46 #endif
47 47
48 static boolean sk_fill_input_buffer(j_decompress_ptr cinfo) { 48 static boolean sk_fill_input_buffer(j_decompress_ptr cinfo) {
49 skjpeg_source_mgr* src = (skjpeg_source_mgr*)cinfo->src; 49 skjpeg_source_mgr* src = (skjpeg_source_mgr*)cinfo->src;
50 if (src->fDecoder != NULL && src->fDecoder->shouldCancelDecode()) { 50 if (src->fDecoder != nullptr && src->fDecoder->shouldCancelDecode()) {
51 return FALSE; 51 return FALSE;
52 } 52 }
53 size_t bytes = src->fStream->read(src->fBuffer, skjpeg_source_mgr::kBufferSi ze); 53 size_t bytes = src->fStream->read(src->fBuffer, skjpeg_source_mgr::kBufferSi ze);
54 // note that JPEG is happy with less than the full read, 54 // note that JPEG is happy with less than the full read,
55 // as long as the result is non-zero 55 // as long as the result is non-zero
56 if (bytes == 0) { 56 if (bytes == 0) {
57 return FALSE; 57 return FALSE;
58 } 58 }
59 59
60 #ifdef SK_BUILD_FOR_ANDROID 60 #ifdef SK_BUILD_FOR_ANDROID
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 void skjpeg_error_exit(j_common_ptr cinfo) { 157 void skjpeg_error_exit(j_common_ptr cinfo) {
158 skjpeg_error_mgr* error = (skjpeg_error_mgr*)cinfo->err; 158 skjpeg_error_mgr* error = (skjpeg_error_mgr*)cinfo->err;
159 159
160 (*error->output_message) (cinfo); 160 (*error->output_message) (cinfo);
161 161
162 /* Let the memory manager delete any temp files before we die */ 162 /* Let the memory manager delete any temp files before we die */
163 jpeg_destroy(cinfo); 163 jpeg_destroy(cinfo);
164 164
165 longjmp(error->fJmpBuf, -1); 165 longjmp(error->fJmpBuf, -1);
166 } 166 }
OLDNEW
« no previous file with comments | « src/images/SkImageEncoder_argb.cpp ('k') | src/images/SkMovie.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698