summaryrefslogtreecommitdiffstats
path: root/WebCore
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore')
-rw-r--r--WebCore/platform/graphics/android/ImageBufferAndroid.cpp2
-rw-r--r--WebCore/platform/graphics/android/ImageSourceAndroid.cpp2
-rw-r--r--WebCore/platform/graphics/android/PathAndroid.cpp3
-rw-r--r--WebCore/platform/image-decoders/ImageDecoder.h14
4 files changed, 14 insertions, 7 deletions
diff --git a/WebCore/platform/graphics/android/ImageBufferAndroid.cpp b/WebCore/platform/graphics/android/ImageBufferAndroid.cpp
index 7b3e8e8..89d841d 100644
--- a/WebCore/platform/graphics/android/ImageBufferAndroid.cpp
+++ b/WebCore/platform/graphics/android/ImageBufferAndroid.cpp
@@ -46,7 +46,7 @@ ImageBufferData::ImageBufferData(const IntSize&)
{
}
-ImageBuffer::ImageBuffer(const IntSize& size, bool grayScale, bool& success)
+ImageBuffer::ImageBuffer(const IntSize& size, ImageColorSpace colorSpace, bool& success)
: m_data(size)
, m_size(size)
{
diff --git a/WebCore/platform/graphics/android/ImageSourceAndroid.cpp b/WebCore/platform/graphics/android/ImageSourceAndroid.cpp
index 70730d8..d33f94f 100644
--- a/WebCore/platform/graphics/android/ImageSourceAndroid.cpp
+++ b/WebCore/platform/graphics/android/ImageSourceAndroid.cpp
@@ -39,7 +39,7 @@
#ifdef ANDROID_ANIMATED_GIF
#include "EmojiFont.h"
- #include "skia/GIFImageDecoder.h"
+ #include "gif/GIFImageDecoder.h"
using namespace android;
#endif
diff --git a/WebCore/platform/graphics/android/PathAndroid.cpp b/WebCore/platform/graphics/android/PathAndroid.cpp
index e7c61d1..0eb1414 100644
--- a/WebCore/platform/graphics/android/PathAndroid.cpp
+++ b/WebCore/platform/graphics/android/PathAndroid.cpp
@@ -342,8 +342,9 @@ static FloatRect boundingBoxForCurrentStroke(GraphicsContext* context)
static GraphicsContext* scratchContext()
{
static ImageBuffer* scratch = 0;
+ // TODO(benm): Confirm with reed that it's correct to use the (default) DeviceRGB ColorSpace parameter in the call to create below.
if (!scratch)
- scratch = ImageBuffer::create(IntSize(1, 1), false).release();
+ scratch = ImageBuffer::create(IntSize(1, 1)).release();
// We don't bother checking for failure creating the ImageBuffer, since our
// ImageBuffer initializer won't fail.
return scratch->context();
diff --git a/WebCore/platform/image-decoders/ImageDecoder.h b/WebCore/platform/image-decoders/ImageDecoder.h
index ffc7d9e..57f8735 100644
--- a/WebCore/platform/image-decoders/ImageDecoder.h
+++ b/WebCore/platform/image-decoders/ImageDecoder.h
@@ -34,7 +34,8 @@
#include <wtf/RefPtr.h>
#include <wtf/Vector.h>
-#if PLATFORM(SKIA)
+#if (PLATFORM(SKIA) || PLATFORM(SGL))
+// TODO(benm): ANDROID: Can we define PLATFORM(SKIA) instead of PLATFORM(SGL) before upstreaming?
#include "NativeImageSkia.h"
#include "SkBitmap.h"
#endif
@@ -54,7 +55,7 @@ namespace WebCore {
DisposeOverwriteBgcolor, // Clear frame to transparent
DisposeOverwritePrevious, // Clear frame to previous framebuffer contents
};
-#if PLATFORM(SKIA)
+#if (PLATFORM(SKIA) || PLATFORM(SGL))
typedef uint32_t PixelData;
#else
typedef unsigned PixelData;
@@ -98,6 +99,11 @@ namespace WebCore {
memcpy(getAddr(startX, destY), startAddr, rowBytes);
}
+#if (PLATFORM(SKIA) || PLATFORM(SGL))
+ NativeImageSkia& bitmap() { return m_bitmap; }
+ const NativeImageSkia& bitmap() const { return m_bitmap; }
+#endif
+
// Allocates space for the pixel data. Must be called before any pixels
// are written. Will return true on success, false if the memory
// allocation fails. Calling this multiple times is undefined and may
@@ -136,7 +142,7 @@ namespace WebCore {
{
#if PLATFORM(CAIRO) || PLATFORM(WX)
return m_bytes.data() + (y * width()) + x;
-#elif PLATFORM(SKIA)
+#elif (PLATFORM(SKIA) || PLATFORM(SGL))
return m_bitmap.getAddr32(x, y);
#else
ASSERT_NOT_REACHED();
@@ -165,7 +171,7 @@ namespace WebCore {
IntSize m_size; // The size of the buffer. This should be the
// same as ImageDecoder::m_size.
bool m_hasAlpha; // Whether or not any of the pixels in the buffer have transparency.
-#elif PLATFORM(SKIA)
+#elif (PLATFORM(SKIA) || PLATFORM(SGL))
NativeImageSkia m_bitmap;
#endif
IntRect m_rect; // The rect of the original specified frame within the overall buffer.