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

Unified Diff: src/core/SkMallocPixelRef.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/SkLineClipper.cpp ('k') | src/core/SkMask.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkMallocPixelRef.cpp
diff --git a/src/core/SkMallocPixelRef.cpp b/src/core/SkMallocPixelRef.cpp
index c591ffb37d716b163336002b8523e52739e8cb58..fae10c4c6a51fc03b1eb50c1c95e1cc38b7f06e0 100644
--- a/src/core/SkMallocPixelRef.cpp
+++ b/src/core/SkMallocPixelRef.cpp
@@ -55,7 +55,7 @@ SkMallocPixelRef* SkMallocPixelRef::NewAllocate(const SkImageInfo& info,
return NULL;
}
- int32_t minRB = info.minRowBytes();
+ int32_t minRB = SkToS32(info.minRowBytes());
if (minRB < 0) {
return NULL; // allocation will be too large
}
@@ -65,7 +65,7 @@ SkMallocPixelRef* SkMallocPixelRef::NewAllocate(const SkImageInfo& info,
int32_t rowBytes;
if (requestedRowBytes) {
- rowBytes = requestedRowBytes;
+ rowBytes = SkToS32(requestedRowBytes);
} else {
rowBytes = minRB;
}
@@ -204,7 +204,7 @@ size_t SkMallocPixelRef::getAllocatedSizeInBytes() const {
void SkMallocPixelRef::flatten(SkFlattenableWriteBuffer& buffer) const {
this->INHERITED::flatten(buffer);
- buffer.write32(fRB);
+ buffer.write32(SkToU32(fRB));
// TODO: replace this bulk write with a chunky one that can trim off any
// trailing bytes on each scanline (in case rowbytes > width*size)
« no previous file with comments | « src/core/SkLineClipper.cpp ('k') | src/core/SkMask.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698