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

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

Issue 27343002: Second wave of Win64 warning cleanup (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: switched count_glyphs back to int Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « src/images/SkImageDecoder_libwebp.cpp ('k') | src/pdf/SkPDFResourceDict.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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 #endif 62 #endif
63 src->next_input_byte = (const JOCTET*)src->fBuffer; 63 src->next_input_byte = (const JOCTET*)src->fBuffer;
64 src->bytes_in_buffer = bytes; 64 src->bytes_in_buffer = bytes;
65 return TRUE; 65 return TRUE;
66 } 66 }
67 67
68 static void sk_skip_input_data(j_decompress_ptr cinfo, long num_bytes) { 68 static void sk_skip_input_data(j_decompress_ptr cinfo, long num_bytes) {
69 skjpeg_source_mgr* src = (skjpeg_source_mgr*)cinfo->src; 69 skjpeg_source_mgr* src = (skjpeg_source_mgr*)cinfo->src;
70 70
71 if (num_bytes > (long)src->bytes_in_buffer) { 71 if (num_bytes > (long)src->bytes_in_buffer) {
72 long bytesToSkip = num_bytes - src->bytes_in_buffer; 72 size_t bytesToSkip = num_bytes - src->bytes_in_buffer;
73 while (bytesToSkip > 0) { 73 while (bytesToSkip > 0) {
74 long bytes = (long)src->fStream->skip(bytesToSkip); 74 size_t bytes = src->fStream->skip(bytesToSkip);
75 if (bytes <= 0 || bytes > bytesToSkip) { 75 if (bytes <= 0 || bytes > bytesToSkip) {
76 // SkDebugf("xxxxxxxxxxxxxx failure to skip request %d returned %d\ n", bytesToSkip, bytes); 76 // SkDebugf("xxxxxxxxxxxxxx failure to skip request %d returned %d\ n", bytesToSkip, bytes);
77 cinfo->err->error_exit((j_common_ptr)cinfo); 77 cinfo->err->error_exit((j_common_ptr)cinfo);
78 return; 78 return;
79 } 79 }
80 #ifdef SK_BUILD_FOR_ANDROID 80 #ifdef SK_BUILD_FOR_ANDROID
81 src->current_offset += bytes; 81 src->current_offset += bytes;
82 #endif 82 #endif
83 bytesToSkip -= bytes; 83 bytesToSkip -= bytes;
84 } 84 }
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 void skjpeg_error_exit(j_common_ptr cinfo) { 161 void skjpeg_error_exit(j_common_ptr cinfo) {
162 skjpeg_error_mgr* error = (skjpeg_error_mgr*)cinfo->err; 162 skjpeg_error_mgr* error = (skjpeg_error_mgr*)cinfo->err;
163 163
164 (*error->output_message) (cinfo); 164 (*error->output_message) (cinfo);
165 165
166 /* Let the memory manager delete any temp files before we die */ 166 /* Let the memory manager delete any temp files before we die */
167 jpeg_destroy(cinfo); 167 jpeg_destroy(cinfo);
168 168
169 longjmp(error->fJmpBuf, -1); 169 longjmp(error->fJmpBuf, -1);
170 } 170 }
OLDNEW
« no previous file with comments | « src/images/SkImageDecoder_libwebp.cpp ('k') | src/pdf/SkPDFResourceDict.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698