diff options
Diffstat (limited to 'src/3rdparty/webkit/WebCore/platform/image-decoders/cairo/ImageDecoderCairo.cpp')
-rw-r--r-- | src/3rdparty/webkit/WebCore/platform/image-decoders/cairo/ImageDecoderCairo.cpp | 83 |
1 files changed, 0 insertions, 83 deletions
diff --git a/src/3rdparty/webkit/WebCore/platform/image-decoders/cairo/ImageDecoderCairo.cpp b/src/3rdparty/webkit/WebCore/platform/image-decoders/cairo/ImageDecoderCairo.cpp index c53eabd..203205d 100644 --- a/src/3rdparty/webkit/WebCore/platform/image-decoders/cairo/ImageDecoderCairo.cpp +++ b/src/3rdparty/webkit/WebCore/platform/image-decoders/cairo/ImageDecoderCairo.cpp @@ -30,53 +30,6 @@ namespace WebCore { -RGBA32Buffer::RGBA32Buffer() - : m_hasAlpha(false) - , m_status(FrameEmpty) - , m_duration(0) - , m_disposalMethod(DisposeNotSpecified) -{ -} - -void RGBA32Buffer::clear() -{ - m_bytes.clear(); - m_status = FrameEmpty; - // NOTE: Do not reset other members here; clearFrameBufferCache() - // calls this to free the bitmap data, but other functions like - // initFrameBuffer() and frameComplete() may still need to read - // other metadata out of this frame later. -} - -void RGBA32Buffer::zeroFill() -{ - m_bytes.fill(0); - m_hasAlpha = true; -} - -void RGBA32Buffer::copyBitmapData(const RGBA32Buffer& other) -{ - if (this == &other) - return; - - m_bytes = other.m_bytes; - m_size = other.m_size; - setHasAlpha(other.m_hasAlpha); -} - -bool RGBA32Buffer::setSize(int newWidth, int newHeight) -{ - // NOTE: This has no way to check for allocation failure if the - // requested size was too big... - m_bytes.resize(newWidth * newHeight); - m_size = IntSize(newWidth, newHeight); - - // Zero the image. - zeroFill(); - - return true; -} - NativeImagePtr RGBA32Buffer::asNewNativeImage() const { return cairo_image_surface_create_for_data( @@ -85,40 +38,4 @@ NativeImagePtr RGBA32Buffer::asNewNativeImage() const width() * sizeof(PixelData)); } -bool RGBA32Buffer::hasAlpha() const -{ - return m_hasAlpha; -} - -void RGBA32Buffer::setHasAlpha(bool alpha) -{ - m_hasAlpha = alpha; -} - -void RGBA32Buffer::setStatus(FrameStatus status) -{ - m_status = status; -} - -RGBA32Buffer& RGBA32Buffer::operator=(const RGBA32Buffer& other) -{ - if (this == &other) - return *this; - - copyBitmapData(other); - setRect(other.rect()); - setStatus(other.status()); - setDuration(other.duration()); - setDisposalMethod(other.disposalMethod()); - return *this; -} - -int RGBA32Buffer::width() const { - return m_size.width(); -} - -int RGBA32Buffer::height() const { - return m_size.height(); -} - } // namespace WebCore |