diff options
author | Ben Murdoch <benm@google.com> | 2011-05-13 16:23:25 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2011-05-16 11:35:02 +0100 |
commit | 65f03d4f644ce73618e5f4f50dd694b26f55ae12 (patch) | |
tree | f478babb801e720de7bfaee23443ffe029f58731 /Source/WebCore/platform/image-decoders/png | |
parent | 47de4a2fb7262c7ebdb9cd133ad2c54c187454d0 (diff) | |
download | external_webkit-65f03d4f644ce73618e5f4f50dd694b26f55ae12.zip external_webkit-65f03d4f644ce73618e5f4f50dd694b26f55ae12.tar.gz external_webkit-65f03d4f644ce73618e5f4f50dd694b26f55ae12.tar.bz2 |
Merge WebKit at r75993: Initial merge by git.
Change-Id: I602bbdc3974787a3b0450456a30a7868286921c3
Diffstat (limited to 'Source/WebCore/platform/image-decoders/png')
-rw-r--r-- | Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp | 14 | ||||
-rw-r--r-- | Source/WebCore/platform/image-decoders/png/PNGImageDecoder.h | 4 |
2 files changed, 9 insertions, 9 deletions
diff --git a/Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp b/Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp index 3fe4d3c..755d704 100644 --- a/Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp +++ b/Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp @@ -197,7 +197,7 @@ bool PNGImageDecoder::setSize(unsigned width, unsigned height) return true; } -RGBA32Buffer* PNGImageDecoder::frameBufferAtIndex(size_t index) +ImageFrame* PNGImageDecoder::frameBufferAtIndex(size_t index) { if (index) return 0; @@ -207,8 +207,8 @@ RGBA32Buffer* PNGImageDecoder::frameBufferAtIndex(size_t index) m_frameBufferCache[0].setPremultiplyAlpha(m_premultiplyAlpha); } - RGBA32Buffer& frame = m_frameBufferCache[0]; - if (frame.status() != RGBA32Buffer::FrameComplete) + ImageFrame& frame = m_frameBufferCache[0]; + if (frame.status() != ImageFrame::FrameComplete) decode(false); return &frame; } @@ -330,13 +330,13 @@ void PNGImageDecoder::rowAvailable(unsigned char* rowBuffer, unsigned rowIndex, return; // Initialize the framebuffer if needed. - RGBA32Buffer& buffer = m_frameBufferCache[0]; - if (buffer.status() == RGBA32Buffer::FrameEmpty) { + ImageFrame& buffer = m_frameBufferCache[0]; + if (buffer.status() == ImageFrame::FrameEmpty) { if (!buffer.setSize(scaledSize().width(), scaledSize().height())) { longjmp(JMPBUF(m_reader->pngPtr()), 1); return; } - buffer.setStatus(RGBA32Buffer::FramePartial); + buffer.setStatus(ImageFrame::FramePartial); buffer.setHasAlpha(false); buffer.setColorProfile(m_colorProfile); @@ -410,7 +410,7 @@ void PNGImageDecoder::rowAvailable(unsigned char* rowBuffer, unsigned rowIndex, void PNGImageDecoder::pngComplete() { if (!m_frameBufferCache.isEmpty()) - m_frameBufferCache.first().setStatus(RGBA32Buffer::FrameComplete); + m_frameBufferCache.first().setStatus(ImageFrame::FrameComplete); } void PNGImageDecoder::decode(bool onlySize) diff --git a/Source/WebCore/platform/image-decoders/png/PNGImageDecoder.h b/Source/WebCore/platform/image-decoders/png/PNGImageDecoder.h index 1e8902f..ec2e857 100644 --- a/Source/WebCore/platform/image-decoders/png/PNGImageDecoder.h +++ b/Source/WebCore/platform/image-decoders/png/PNGImageDecoder.h @@ -43,7 +43,7 @@ namespace WebCore { virtual String filenameExtension() const { return "png"; } virtual bool isSizeAvailable(); virtual bool setSize(unsigned width, unsigned height); - virtual RGBA32Buffer* frameBufferAtIndex(size_t index); + virtual ImageFrame* frameBufferAtIndex(size_t index); // CAUTION: setFailed() deletes |m_reader|. Be careful to avoid // accessing deleted memory, especially when calling this from inside // PNGImageReader! @@ -56,7 +56,7 @@ namespace WebCore { bool isComplete() const { - return !m_frameBufferCache.isEmpty() && (m_frameBufferCache.first().status() == RGBA32Buffer::FrameComplete); + return !m_frameBufferCache.isEmpty() && (m_frameBufferCache.first().status() == ImageFrame::FrameComplete); } private: |