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

Unified Diff: src/core/SkPicturePlayback.cpp

Issue 242643008: fix warnings around size_t/int (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkPaint.cpp ('k') | src/gpu/GrTHashTable.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPicturePlayback.cpp
diff --git a/src/core/SkPicturePlayback.cpp b/src/core/SkPicturePlayback.cpp
index 52ea56d5a0ed0668a55c7ef8ef27647c26ef13db..ba18392c88507615208ef219c0d80628df9a324a 100644
--- a/src/core/SkPicturePlayback.cpp
+++ b/src/core/SkPicturePlayback.cpp
@@ -310,14 +310,14 @@ bool SkPicturePlayback::containsBitmaps() const {
#include "SkStream.h"
-static void write_tag_size(SkWriteBuffer& buffer, uint32_t tag, uint32_t size) {
+static void write_tag_size(SkWriteBuffer& buffer, uint32_t tag, size_t size) {
buffer.writeUInt(tag);
buffer.writeUInt(size);
}
-static void write_tag_size(SkWStream* stream, uint32_t tag, uint32_t size) {
+static void write_tag_size(SkWStream* stream, uint32_t tag, size_t size) {
stream->write32(tag);
- stream->write32(size);
+ stream->write32(SkToU32(size));
}
static size_t compute_chunk_size(SkFlattenable::Factory* array, int count) {
@@ -357,7 +357,7 @@ static void write_factories(SkWStream* stream, const SkFactorySet& rec) {
if (NULL == name || 0 == *name) {
stream->writePackedUInt(0);
} else {
- uint32_t len = strlen(name);
+ size_t len = strlen(name);
stream->writePackedUInt(len);
stream->write(name, len);
}
« no previous file with comments | « src/core/SkPaint.cpp ('k') | src/gpu/GrTHashTable.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698