Index: third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp |
diff --git a/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp b/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp |
index b660c660eb881bd73c788b7b7b1f43c765f20169..b1cac4d49cf6f40825fc7d431b401caa3a8a4955 100644 |
--- a/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp |
+++ b/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp |
@@ -32,12 +32,12 @@ |
namespace blink { |
-static unsigned copyFromSharedBuffer(char* buffer, unsigned bufferLength, const SharedBuffer& sharedBuffer, unsigned offset) |
+static size_t copyFromSharedBuffer(char* buffer, size_t bufferLength, const SharedBuffer& sharedBuffer, size_t offset) |
{ |
- unsigned bytesExtracted = 0; |
+ size_t bytesExtracted = 0; |
const char* moreData; |
- while (unsigned moreDataLength = sharedBuffer.getSomeData(moreData, offset)) { |
- unsigned bytesToCopy = std::min(bufferLength - bytesExtracted, moreDataLength); |
+ while (size_t moreDataLength = sharedBuffer.getSomeData(moreData, offset)) { |
+ size_t bytesToCopy = std::min(bufferLength - bytesExtracted, moreDataLength); |
memcpy(buffer + bytesExtracted, moreData, bytesToCopy); |
bytesExtracted += bytesToCopy; |
if (bytesExtracted == bufferLength) |
@@ -84,7 +84,7 @@ inline bool matchesBMPSignature(char* contents) |
PassOwnPtr<ImageDecoder> ImageDecoder::create(const SharedBuffer& data, AlphaOption alphaOption, GammaAndColorProfileOption colorOptions) |
{ |
- const unsigned longestSignatureLength = sizeof("RIFF????WEBPVP") - 1; |
+ const size_t longestSignatureLength = sizeof("RIFF????WEBPVP") - 1; |
ASSERT(longestSignatureLength == 14); |
size_t maxDecodedBytes = Platform::current() ? Platform::current()->maxDecodedImageBytes() : noDecodedImageByteLimit; |