Chromium Code Reviews| Index: Source/platform/image-decoders/ImageDecoder.cpp |
| diff --git a/Source/platform/image-decoders/ImageDecoder.cpp b/Source/platform/image-decoders/ImageDecoder.cpp |
| index 16940d10e1a02755c60140e30f8ea17ba2b7139c..3e226260fd03a844d52ef0edb6acc38afec04880 100644 |
| --- a/Source/platform/image-decoders/ImageDecoder.cpp |
| +++ b/Source/platform/image-decoders/ImageDecoder.cpp |
| @@ -82,6 +82,34 @@ inline bool matchesCURSignature(char* contents) |
| return !memcmp(contents, "\x00\x00\x02\x00", 4); |
| } |
| +DecodingBuffers::DecodingBuffers() |
|
Noel Gordon
2014/07/25 15:55:01
Not the best place to add this: please move all th
sugoi1
2014/07/25 16:56:47
Done.
|
| +{ |
| + for (int i = 0; i < 3; ++i) { |
| + m_planes[i] = 0; |
| + m_rowBytes[i] = 0; |
| + } |
| +} |
| + |
| +void DecodingBuffers::set(void* planes[3], size_t rowBytes[3]) |
| +{ |
| + for (int i = 0; i < 3; ++i) { |
| + m_planes[i] = planes[i]; |
| + m_rowBytes[i] = rowBytes[i]; |
| + } |
| +} |
| + |
| +void* DecodingBuffers::getPlane(int i) |
| +{ |
| + ASSERT((i >= 0) && i < 3); |
| + return m_planes[i]; |
| +} |
| + |
| +size_t DecodingBuffers::getRowBytes(int i) const |
| +{ |
| + ASSERT((i >= 0) && i < 3); |
| + return m_rowBytes[i]; |
| +} |
| + |
| PassOwnPtr<ImageDecoder> ImageDecoder::create(const SharedBuffer& data, ImageSource::AlphaOption alphaOption, ImageSource::GammaAndColorProfileOption gammaAndColorProfileOption) |
| { |
| static const unsigned longestSignatureLength = sizeof("RIFF????WEBPVP") - 1; |