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

Unified Diff: src/core/SkDraw.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkDebug.cpp ('k') | src/core/SkEdgeBuilder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkDraw.cpp
diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp
index affb24322c2775954f1e90808daa2c7b6a0289d8..013b73d23ac50acdd758a86a8aa8f2af89b428f6 100644
--- a/src/core/SkDraw.cpp
+++ b/src/core/SkDraw.cpp
@@ -151,11 +151,11 @@ static void D_Clear_BitmapXferProc(void* pixels, size_t bytes, uint32_t) {
static void D_Dst_BitmapXferProc(void*, size_t, uint32_t data) {}
static void D32_Src_BitmapXferProc(void* pixels, size_t bytes, uint32_t data) {
- sk_memset32((uint32_t*)pixels, data, bytes >> 2);
+ sk_memset32((uint32_t*)pixels, data, SkToInt(bytes >> 2));
}
static void D16_Src_BitmapXferProc(void* pixels, size_t bytes, uint32_t data) {
- sk_memset16((uint16_t*)pixels, data, bytes >> 1);
+ sk_memset16((uint16_t*)pixels, data, SkToInt(bytes >> 1));
}
static void DA8_Src_BitmapXferProc(void* pixels, size_t bytes, uint32_t data) {
@@ -553,7 +553,7 @@ static bool bounder_points(SkBounder* bounder, SkCanvas::PointMode mode,
SkRect bounds;
SkScalar inset = paint.getStrokeWidth();
- bounds.set(pts, count);
+ bounds.set(pts, SkToInt(count));
bounds.inset(-inset, -inset);
matrix.mapRect(&bounds);
@@ -610,14 +610,14 @@ void SkDraw::drawPoints(SkCanvas::PointMode mode, size_t count,
const size_t backup = (SkCanvas::kPolygon_PointMode == mode);
do {
- size_t n = count;
+ int n = SkToInt(count);
if (n > MAX_DEV_PTS) {
n = MAX_DEV_PTS;
}
matrix->mapPoints(devPts, pts, n);
proc(rec, devPts, n, bltr);
pts += n - backup;
- SkASSERT(count >= n);
+ SkASSERT(SkToInt(count) >= n);
count -= n;
if (count > 0) {
count += backup;
« no previous file with comments | « src/core/SkDebug.cpp ('k') | src/core/SkEdgeBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698