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

Side by Side Diff: src/core/SkLineClipper.cpp

Issue 147053003: fix (some) 64bit warnings -- size_t -> int (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 11 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/core/SkGlyphCache.cpp ('k') | src/core/SkMallocPixelRef.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 #include "SkLineClipper.h" 8 #include "SkLineClipper.h"
9 9
10 template <typename T> T pin_unsorted(T value, T limit0, T limit1) { 10 template <typename T> T pin_unsorted(T value, T limit0, T limit1) {
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 260
261 if (tmp[index1].fX > clip.fRight) { 261 if (tmp[index1].fX > clip.fRight) {
262 r->set(clip.fRight, sect_with_vertical(tmp, clip.fRight)); 262 r->set(clip.fRight, sect_with_vertical(tmp, clip.fRight));
263 SkASSERT(is_between_unsorted(r->fY, tmp[0].fY, tmp[1].fY)); 263 SkASSERT(is_between_unsorted(r->fY, tmp[0].fY, tmp[1].fY));
264 r += 1; 264 r += 1;
265 r->set(clip.fRight, tmp[index1].fY); 265 r->set(clip.fRight, tmp[index1].fY);
266 } else { 266 } else {
267 *r = tmp[index1]; 267 *r = tmp[index1];
268 } 268 }
269 269
270 lineCount = r - result; 270 lineCount = SkToInt(r - result);
271 } 271 }
272 272
273 // Now copy the results into the caller's lines[] parameter 273 // Now copy the results into the caller's lines[] parameter
274 if (reverse) { 274 if (reverse) {
275 // copy the pts in reverse order to maintain winding order 275 // copy the pts in reverse order to maintain winding order
276 for (int i = 0; i <= lineCount; i++) { 276 for (int i = 0; i <= lineCount; i++) {
277 lines[lineCount - i] = result[i]; 277 lines[lineCount - i] = result[i];
278 } 278 }
279 } else { 279 } else {
280 memcpy(lines, result, (lineCount + 1) * sizeof(SkPoint)); 280 memcpy(lines, result, (lineCount + 1) * sizeof(SkPoint));
281 } 281 }
282 return lineCount; 282 return lineCount;
283 } 283 }
OLDNEW
« no previous file with comments | « src/core/SkGlyphCache.cpp ('k') | src/core/SkMallocPixelRef.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698