summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/image-decoders
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2009-12-17 13:32:53 +0000
committerSteve Block <steveblock@google.com>2010-01-05 14:29:48 +0000
commitf912b6f62505f60109e7300787c93111dbd70560 (patch)
tree2432507bd57c2620b2e167f8368e548506c041f1 /WebCore/platform/image-decoders
parent8c8c7b43f311d492d2c13ee68bc91875262ae072 (diff)
downloadexternal_webkit-f912b6f62505f60109e7300787c93111dbd70560.zip
external_webkit-f912b6f62505f60109e7300787c93111dbd70560.tar.gz
external_webkit-f912b6f62505f60109e7300787c93111dbd70560.tar.bz2
Defines PLATFORM(SKIA), instead of PLATFROM(SGL) for Android.
Skia is used by Chromium, which defines PLATFORM(SKIA). Android also uses Skia, but currently defines PLATFORM(SGL) to account for platform-specific differences between Android and Chromum. We now use PLATFORM(SKIA) on Android and remove PLATFORM(SGL). Platform-specific differences are achieved with PLATFORM(ANDROID) guards. This reduces our diff with webkit.org. Change-Id: Ibf920b1929e7c3cdabb025ae61ceae3df67258bb
Diffstat (limited to 'WebCore/platform/image-decoders')
-rw-r--r--WebCore/platform/image-decoders/ImageDecoder.h11
-rw-r--r--WebCore/platform/image-decoders/skia/ImageDecoderSkia.cpp5
2 files changed, 7 insertions, 9 deletions
diff --git a/WebCore/platform/image-decoders/ImageDecoder.h b/WebCore/platform/image-decoders/ImageDecoder.h
index 08f4aa2..535efa1 100644
--- a/WebCore/platform/image-decoders/ImageDecoder.h
+++ b/WebCore/platform/image-decoders/ImageDecoder.h
@@ -36,8 +36,7 @@
#include <wtf/RefPtr.h>
#include <wtf/Vector.h>
-#if (PLATFORM(SKIA) || PLATFORM(SGL))
-// TODO(benm): ANDROID: Can we define PLATFORM(SKIA) instead of PLATFORM(SGL) before upstreaming?
+#if PLATFORM(SKIA)
#include "NativeImageSkia.h"
#elif PLATFORM(QT)
#include <QImage>
@@ -58,7 +57,7 @@ namespace WebCore {
DisposeOverwriteBgcolor, // Clear frame to transparent
DisposeOverwritePrevious, // Clear frame to previous framebuffer contents
};
-#if (PLATFORM(SKIA) || PLATFORM(QT) || PLATFORM(SGL))
+#if PLATFORM(SKIA) || PLATFORM(QT)
typedef uint32_t PixelData;
#else
typedef unsigned PixelData;
@@ -102,7 +101,7 @@ namespace WebCore {
memcpy(getAddr(startX, destY), startAddr, rowBytes);
}
-#if (PLATFORM(SKIA) || PLATFORM(SGL))
+#if PLATFORM(ANDROID)
NativeImageSkia& bitmap() { return m_bitmap; }
const NativeImageSkia& bitmap() const { return m_bitmap; }
#endif
@@ -148,7 +147,7 @@ namespace WebCore {
inline PixelData* getAddr(int x, int y)
{
-#if (PLATFORM(SKIA) || PLATFORM(SGL))
+#if PLATFORM(SKIA)
return m_bitmap.getAddr32(x, y);
#elif PLATFORM(QT)
return reinterpret_cast<QRgb*>(m_image.scanLine(y)) + x;
@@ -173,7 +172,7 @@ namespace WebCore {
}
}
-#if (PLATFORM(SKIA) || PLATFORM(SGL))
+#if PLATFORM(SKIA)
NativeImageSkia m_bitmap;
#elif PLATFORM(QT)
mutable QImage m_image;
diff --git a/WebCore/platform/image-decoders/skia/ImageDecoderSkia.cpp b/WebCore/platform/image-decoders/skia/ImageDecoderSkia.cpp
index 6acaed5..96342fa 100644
--- a/WebCore/platform/image-decoders/skia/ImageDecoderSkia.cpp
+++ b/WebCore/platform/image-decoders/skia/ImageDecoderSkia.cpp
@@ -26,8 +26,7 @@
#include "config.h"
#include "ImageDecoder.h"
-
-#if PLATFORM(SGL)
+#if PLATFORM(ANDROID)
#include "SkBitmapRef.h"
#endif
@@ -85,7 +84,7 @@ bool RGBA32Buffer::setSize(int newWidth, int newHeight)
NativeImagePtr RGBA32Buffer::asNewNativeImage() const
{
-#if PLATFORM(SGL)
+#if PLATFORM(ANDROID)
return new SkBitmapRef(m_bitmap);
#else
return new NativeImageSkia(m_bitmap);