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

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

Issue 256453007: Fix build: these asserts are always now true, which GCC warns about (Closed) Base URL: https://skia.googlesource.com/skia.git@master
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
« no previous file with comments | « no previous file | no next file » | 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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
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, size_t count = 1) { 233 template <typename T> const T* skip(SkReader32* reader, size_t count = 1) {
234 SkASSERT(count >= 0);
235 size_t size = sizeof(T) * count; 234 size_t size = sizeof(T) * count;
236 SkASSERT(SkAlign4(size) == size); 235 SkASSERT(SkAlign4(size) == size);
237 return reinterpret_cast<const T*>(reader->skip(size)); 236 return reinterpret_cast<const T*>(reader->skip(size));
238 } 237 }
239 238
240 template <typename T> const T* skipAlign(SkReader32* reader, size_t count = 1) { 239 template <typename T> const T* skipAlign(SkReader32* reader, size_t count = 1) {
241 SkASSERT(count >= 0);
242 size_t size = SkAlign4(sizeof(T) * count); 240 size_t size = SkAlign4(sizeof(T) * count);
243 return reinterpret_cast<const T*>(reader->skip(size)); 241 return reinterpret_cast<const T*>(reader->skip(size));
244 } 242 }
245 243
246 /////////////////////////////////////////////////////////////////////////////// 244 ///////////////////////////////////////////////////////////////////////////////
247 /////////////////////////////////////////////////////////////////////////////// 245 ///////////////////////////////////////////////////////////////////////////////
248 246
249 static void clipPath_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, 247 static void clipPath_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32,
250 SkGPipeState* state) { 248 SkGPipeState* state) {
251 SkPath path; 249 SkPath path;
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 status = kReadAtom_Status; 897 status = kReadAtom_Status;
900 break; 898 break;
901 } 899 }
902 } 900 }
903 901
904 if (bytesRead) { 902 if (bytesRead) {
905 *bytesRead = reader.offset(); 903 *bytesRead = reader.offset();
906 } 904 }
907 return status; 905 return status;
908 } 906 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698