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

Side by Side Diff: src/pipe/SkGPipeRead.cpp

Issue 256443002: fix int/size_t warnings in pipe (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 8 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 | « no previous file | src/pipe/SkGPipeWrite.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 2011 Google Inc. 3 * Copyright 2011 Google Inc.
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 "SkBitmapHeap.h" 10 #include "SkBitmapHeap.h"
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 SkTDArray<SkFlattenable::Factory> fFactoryArray; 223 SkTDArray<SkFlattenable::Factory> fFactoryArray;
224 SkTDArray<SkBitmap*> fBitmaps; 224 SkTDArray<SkBitmap*> fBitmaps;
225 bool fSilent; 225 bool fSilent;
226 // Only used when sharing bitmaps with the writer. 226 // Only used when sharing bitmaps with the writer.
227 SkBitmapHeap* fSharedHeap; 227 SkBitmapHeap* fSharedHeap;
228 unsigned fFlags; 228 unsigned fFlags;
229 }; 229 };
230 230
231 /////////////////////////////////////////////////////////////////////////////// 231 ///////////////////////////////////////////////////////////////////////////////
232 232
233 template <typename T> const T* skip(SkReader32* reader, int count = 1) { 233 template <typename T> const T* skip(SkReader32* reader, size_t count = 1) {
234 SkASSERT(count >= 0); 234 SkASSERT(count >= 0);
235 size_t size = sizeof(T) * count; 235 size_t size = sizeof(T) * count;
236 SkASSERT(SkAlign4(size) == size); 236 SkASSERT(SkAlign4(size) == size);
237 return reinterpret_cast<const T*>(reader->skip(size)); 237 return reinterpret_cast<const T*>(reader->skip(size));
238 } 238 }
239 239
240 template <typename T> const T* skipAlign(SkReader32* reader, int count = 1) { 240 template <typename T> const T* skipAlign(SkReader32* reader, size_t count = 1) {
241 SkASSERT(count >= 0); 241 SkASSERT(count >= 0);
242 size_t size = SkAlign4(sizeof(T) * count); 242 size_t size = SkAlign4(sizeof(T) * count);
243 return reinterpret_cast<const T*>(reader->skip(size)); 243 return reinterpret_cast<const T*>(reader->skip(size));
244 } 244 }
245 245
246 /////////////////////////////////////////////////////////////////////////////// 246 ///////////////////////////////////////////////////////////////////////////////
247 /////////////////////////////////////////////////////////////////////////////// 247 ///////////////////////////////////////////////////////////////////////////////
248 248
249 static void clipPath_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, 249 static void clipPath_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32,
250 SkGPipeState* state) { 250 SkGPipeState* state) {
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 status = kReadAtom_Status; 899 status = kReadAtom_Status;
900 break; 900 break;
901 } 901 }
902 } 902 }
903 903
904 if (bytesRead) { 904 if (bytesRead) {
905 *bytesRead = reader.offset(); 905 *bytesRead = reader.offset();
906 } 906 }
907 return status; 907 return status;
908 } 908 }
OLDNEW
« no previous file with comments | « no previous file | src/pipe/SkGPipeWrite.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698