Skip to content
Permalink
Browse files
2010-04-22 Stephan Aßmus <superstippi@gmx.de>
        Reviewed by David Levin.

        [Haiku] Implement ImageBuffer support
        https://bugs.webkit.org/show_bug.cgi?id=35288

        Covered by existing tests.

        Complete implementation of ImageBuffer for Haiku. Uses StillImage
        class to export a WebCore::Image and associated GraphicsContext
        to perform arbitrary drawing in the offscreen BBitmap buffer.

        * platform/graphics/haiku/ImageBufferData.h:
        * platform/graphics/haiku/ImageBufferHaiku.cpp,
        (WebCore::ImageBufferData::ImageBufferData),
        (WebCore::ImageBufferData::~ImageBufferData),
        (WebCore::ImageBuffer::ImageBuffer),
        (WebCore::ImageBuffer::~ImageBuffer),
        (WebCore::ImageBuffer::context),
        (WebCore::ImageBuffer::image):
            Implementation uses offscreen BBitmap and BView, wraps StillImage
            around those to provide WebCore::Image interface.
        (WebCore::ImageBuffer::platformTransformColorSpace):
        (WebCore::convertFromData):
            Method just performs BGRA <-> RGBA conversion.
        (WebCore::convertFromInternalData):
            Method just performs BGRA <-> RGBA conversion and handles
            pre-multiplying the color values if requested.
        (WebCore::convertToInternalData):
            Method just performs BGRA <-> RGBA conversion and handles
            de.multiplying the color values if requested.
        (WebCore::getImageData):
            Common code for the next two methods.
        (WebCore::ImageBuffer::getUnmultipliedImageData),
        (WebCore::ImageBuffer::getPremultipliedImageData):
            Implemented.
        (WebCore::putImageData):
            Common code for the next two methods.
        (WebCore::ImageBuffer::putUnmultipliedImageData),
        (WebCore::ImageBuffer::putPremultipliedImageData):
            Implemented.
        (WebCore::ImageBuffer::toDataURL):
            Uses Haiku "Translation Kit" to convert image data to data
            of the requested mime type.

Canonical link: https://commits.webkit.org/49359@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@58078 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
eseidel committed Apr 22, 2010
1 parent 54d9371 commit 10447c3fcb4e979e21a7e8e6adc86c7cadc13d99
Showing 3 changed files with 367 additions and 37 deletions.
@@ -1,3 +1,49 @@
2010-04-22 Stephan Aßmus <superstippi@gmx.de>

Reviewed by David Levin.

[Haiku] Implement ImageBuffer support
https://bugs.webkit.org/show_bug.cgi?id=35288

Covered by existing tests.

Complete implementation of ImageBuffer for Haiku. Uses StillImage
class to export a WebCore::Image and associated GraphicsContext
to perform arbitrary drawing in the offscreen BBitmap buffer.

* platform/graphics/haiku/ImageBufferData.h:
* platform/graphics/haiku/ImageBufferHaiku.cpp,
(WebCore::ImageBufferData::ImageBufferData),
(WebCore::ImageBufferData::~ImageBufferData),
(WebCore::ImageBuffer::ImageBuffer),
(WebCore::ImageBuffer::~ImageBuffer),
(WebCore::ImageBuffer::context),
(WebCore::ImageBuffer::image):
Implementation uses offscreen BBitmap and BView, wraps StillImage
around those to provide WebCore::Image interface.
(WebCore::ImageBuffer::platformTransformColorSpace):
(WebCore::convertFromData):
Method just performs BGRA <-> RGBA conversion.
(WebCore::convertFromInternalData):
Method just performs BGRA <-> RGBA conversion and handles
pre-multiplying the color values if requested.
(WebCore::convertToInternalData):
Method just performs BGRA <-> RGBA conversion and handles
de.multiplying the color values if requested.
(WebCore::getImageData):
Common code for the next two methods.
(WebCore::ImageBuffer::getUnmultipliedImageData),
(WebCore::ImageBuffer::getPremultipliedImageData):
Implemented.
(WebCore::putImageData):
Common code for the next two methods.
(WebCore::ImageBuffer::putUnmultipliedImageData),
(WebCore::ImageBuffer::putPremultipliedImageData):
Implemented.
(WebCore::ImageBuffer::toDataURL):
Uses Haiku "Translation Kit" to convert image data to data
of the requested mime type.

2010-04-22 Adam Barth <abarth@webkit.org>

Unreviewed, rolling out r58069.
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2009 Maxime Simon <simon.maxime@gmail.com>
* Copyright (C) 2010 Stephan Aßmus <superstippi@gmx.de>
*
* All rights reserved.
*
@@ -28,16 +28,23 @@
#ifndef ImageBufferData_h
#define ImageBufferData_h

#include <Bitmap.h>
#include <View.h>

namespace WebCore {

class IntSize;
class IntSize;

class ImageBufferData {
public:
ImageBufferData(const IntSize&);
~ImageBufferData();

class ImageBufferData {
public:
ImageBufferData(const IntSize&);
};
BBitmap m_bitmap;
BView m_view;
};

} // namespace WebCore
} // namespace WebCore

#endif // ImageBufferData_h
#endif // ImageBufferData_h

0 comments on commit 10447c3

Please sign in to comment.