summaryrefslogtreecommitdiffstats
path: root/WebCore
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore')
-rw-r--r--WebCore/loader/CachedImage.cpp2
-rw-r--r--WebCore/platform/graphics/BitmapImage.h2
-rw-r--r--WebCore/platform/graphics/FloatPoint.h2
-rw-r--r--WebCore/platform/graphics/FloatRect.h4
-rw-r--r--WebCore/platform/graphics/Gradient.cpp2
-rw-r--r--WebCore/platform/graphics/Gradient.h10
-rw-r--r--WebCore/platform/graphics/GraphicsContext.cpp6
-rw-r--r--WebCore/platform/graphics/GraphicsContext.h18
-rw-r--r--WebCore/platform/graphics/Image.h2
-rw-r--r--WebCore/platform/graphics/ImageSource.h18
-rw-r--r--WebCore/platform/graphics/IntPoint.h4
-rw-r--r--WebCore/platform/graphics/IntRect.h4
-rw-r--r--WebCore/platform/graphics/Path.h3
-rw-r--r--WebCore/platform/graphics/Pattern.h2
-rw-r--r--WebCore/platform/graphics/skia/NativeImageSkia.cpp5
-rw-r--r--WebCore/platform/graphics/transforms/TransformationMatrix.h4
-rw-r--r--WebCore/platform/image-decoders/ImageDecoder.h11
-rw-r--r--WebCore/platform/image-decoders/skia/ImageDecoderSkia.cpp5
-rw-r--r--WebCore/svg/graphics/SVGPaintServer.cpp4
19 files changed, 52 insertions, 56 deletions
diff --git a/WebCore/loader/CachedImage.cpp b/WebCore/loader/CachedImage.cpp
index a91f126..780d7ee 100644
--- a/WebCore/loader/CachedImage.cpp
+++ b/WebCore/loader/CachedImage.cpp
@@ -252,7 +252,7 @@ inline void CachedImage::createImage()
}
#endif
m_image = BitmapImage::create(this);
-#if PLATFORM(SGL)
+#if PLATFORM(ANDROID)
m_image->setURL(url());
#endif
}
diff --git a/WebCore/platform/graphics/BitmapImage.h b/WebCore/platform/graphics/BitmapImage.h
index a07daf2..0031df6 100644
--- a/WebCore/platform/graphics/BitmapImage.h
+++ b/WebCore/platform/graphics/BitmapImage.h
@@ -148,7 +148,7 @@ public:
virtual bool getHBITMAPOfSize(HBITMAP, LPSIZE);
#endif
-#if PLATFORM(SGL)
+#if PLATFORM(ANDROID)
virtual void setURL(const String& str);
#endif
diff --git a/WebCore/platform/graphics/FloatPoint.h b/WebCore/platform/graphics/FloatPoint.h
index 7d32bcf..45a1e83 100644
--- a/WebCore/platform/graphics/FloatPoint.h
+++ b/WebCore/platform/graphics/FloatPoint.h
@@ -100,7 +100,7 @@ public:
operator BPoint() const;
#endif
-#if (PLATFORM(SKIA) || PLATFORM(SGL))
+#if PLATFORM(SKIA)
operator SkPoint() const;
FloatPoint(const SkPoint&);
#endif
diff --git a/WebCore/platform/graphics/FloatRect.h b/WebCore/platform/graphics/FloatRect.h
index 4b4694f..2dc854d 100644
--- a/WebCore/platform/graphics/FloatRect.h
+++ b/WebCore/platform/graphics/FloatRect.h
@@ -55,7 +55,7 @@ class wxRect2DDouble;
class BRect;
#endif
-#if (PLATFORM(SKIA) || PLATFORM(SGL))
+#if PLATFORM(SKIA)
struct SkRect;
#endif
@@ -149,7 +149,7 @@ public:
operator BRect() const;
#endif
-#if (PLATFORM(SKIA) || PLATFORM(SGL))
+#if PLATFORM(SKIA)
FloatRect(const SkRect&);
operator SkRect() const;
#endif
diff --git a/WebCore/platform/graphics/Gradient.cpp b/WebCore/platform/graphics/Gradient.cpp
index 77a0d21..204a2b6 100644
--- a/WebCore/platform/graphics/Gradient.cpp
+++ b/WebCore/platform/graphics/Gradient.cpp
@@ -161,7 +161,7 @@ void Gradient::setGradientSpaceTransform(const TransformationMatrix& gradientSpa
setPlatformGradientSpaceTransform(gradientSpaceTransformation);
}
-#if !PLATFORM(SKIA)
+#if !(PLATFORM(SKIA) && !PLATFORM(ANDROID))
void Gradient::setPlatformGradientSpaceTransform(const TransformationMatrix&)
{
}
diff --git a/WebCore/platform/graphics/Gradient.h b/WebCore/platform/graphics/Gradient.h
index 7f01251..011a2cd 100644
--- a/WebCore/platform/graphics/Gradient.h
+++ b/WebCore/platform/graphics/Gradient.h
@@ -46,13 +46,15 @@ typedef QGradient* PlatformGradient;
#elif PLATFORM(CAIRO)
typedef struct _cairo_pattern cairo_pattern_t;
typedef cairo_pattern_t* PlatformGradient;
-#elif PLATFORM(ANDROID) && PLATFORM(SGL)
+#elif PLATFORM(SKIA)
+#if PLATFORM(ANDROID)
#include "SkShader.h"
typedef class PlatformGradientRec* PlatformGradient;
-#elif PLATFORM(SKIA)
+#else
class SkShader;
typedef class SkShader* PlatformGradient;
typedef class SkShader* PlatformPattern;
+#endif
#else
typedef void* PlatformGradient;
#endif
@@ -86,13 +88,11 @@ namespace WebCore {
struct ColorStop;
const Vector<ColorStop>& getStops() const;
#else
-
-#if PLATFORM(ANDROID) && PLATFORM(SGL)
+#if PLATFORM(ANDROID)
SkShader* getShader(SkShader::TileMode);
#endif
PlatformGradient platformGradient();
#endif
-
struct ColorStop {
float stop;
float red;
diff --git a/WebCore/platform/graphics/GraphicsContext.cpp b/WebCore/platform/graphics/GraphicsContext.cpp
index fee05ee..e80004f 100644
--- a/WebCore/platform/graphics/GraphicsContext.cpp
+++ b/WebCore/platform/graphics/GraphicsContext.cpp
@@ -518,7 +518,7 @@ void GraphicsContext::fillRect(const FloatRect& rect, Generator& generator)
generator.fill(this, rect);
}
-#if !PLATFORM(SKIA)
+#if !(PLATFORM(SKIA) && !PLATFORM(ANDROID))
void GraphicsContext::setPlatformFillGradient(Gradient*)
{
}
@@ -536,7 +536,7 @@ void GraphicsContext::setPlatformStrokePattern(Pattern*)
}
#endif
-#if !PLATFORM(CG) && !PLATFORM(SKIA)
+#if !PLATFORM(CG) && !(PLATFORM(SKIA) && !PLATFORM(ANDROID))
// Implement this if you want to go ahead and push the drawing mode into your native context
// immediately.
void GraphicsContext::setPlatformTextDrawingMode(int mode)
@@ -544,7 +544,7 @@ void GraphicsContext::setPlatformTextDrawingMode(int mode)
}
#endif
-#if !PLATFORM(QT) && !PLATFORM(CAIRO) && !PLATFORM(SKIA) && !PLATFORM(HAIKU)
+#if !PLATFORM(QT) && !PLATFORM(CAIRO) && !(PLATFORM(SKIA) && !PLATFORM(ANDROID)) && !PLATFORM(HAIKU)
void GraphicsContext::setPlatformStrokeStyle(const StrokeStyle&)
{
}
diff --git a/WebCore/platform/graphics/GraphicsContext.h b/WebCore/platform/graphics/GraphicsContext.h
index 96a6221..ecf2101 100644
--- a/WebCore/platform/graphics/GraphicsContext.h
+++ b/WebCore/platform/graphics/GraphicsContext.h
@@ -46,12 +46,6 @@ QT_BEGIN_NAMESPACE
class QPainter;
QT_END_NAMESPACE
typedef QPainter PlatformGraphicsContext;
-#elif PLATFORM(SGL)
-namespace WebCore {
-class PlatformGraphicsContext;
-}
-class SkPaint;
-struct SkPoint;
#elif PLATFORM(WX)
class wxGCDC;
class wxWindowDC;
@@ -72,7 +66,15 @@ class wxWindowDC;
typedef wxWindowDC PlatformGraphicsContext;
#endif
#elif PLATFORM(SKIA)
+#if PLATFORM(ANDROID)
+namespace WebCore {
+class PlatformGraphicsContext;
+}
+class SkPaint;
+struct SkPoint;
+#else
typedef class PlatformContextSkia PlatformGraphicsContext;
+#endif
#elif PLATFORM(HAIKU)
class BView;
typedef BView PlatformGraphicsContext;
@@ -190,7 +192,7 @@ namespace WebCore {
void applyFillPattern();
#endif
-#if PLATFORM(SGL)
+#if PLATFORM(ANDROID)
// initialize a paint for bitmaps
void setupBitmapPaint(SkPaint*);
// initialize a paint for filling
@@ -204,7 +206,7 @@ namespace WebCore {
bool willFill() const;
// returns true if there is a valid (non-transparent) stroke color
bool willStroke() const;
-
+
// may return NULL, since we lazily allocate the path. This is the path
// that is drawn by drawPath()
const SkPath* getCurrPath() const;
diff --git a/WebCore/platform/graphics/Image.h b/WebCore/platform/graphics/Image.h
index aef6577..f25169b 100644
--- a/WebCore/platform/graphics/Image.h
+++ b/WebCore/platform/graphics/Image.h
@@ -148,7 +148,7 @@ public:
virtual bool getHBITMAPOfSize(HBITMAP, LPSIZE) { return false; }
#endif
-#if PLATFORM(SGL)
+#if PLATFORM(ANDROID)
virtual void setURL(const String& str) {}
#endif
diff --git a/WebCore/platform/graphics/ImageSource.h b/WebCore/platform/graphics/ImageSource.h
index 19c7bf7..083c7b0 100644
--- a/WebCore/platform/graphics/ImageSource.h
+++ b/WebCore/platform/graphics/ImageSource.h
@@ -45,12 +45,14 @@ QT_END_NAMESPACE
#elif PLATFORM(CAIRO)
struct _cairo_surface;
typedef struct _cairo_surface cairo_surface_t;
-#elif PLATFORM(ANDROID) && PLATFORM(SGL)
+#elif PLATFORM(SKIA)
+#if PLATFORM(ANDROID)
#include "SkString.h"
class SkBitmapRef;
class PrivateAndroidImageSourceRec;
-#elif PLATFORM(SKIA)
+#else
class NativeImageSkia;
+#endif
#elif PLATFORM(HAIKU)
class BBitmap;
#elif PLATFORM(WINCE)
@@ -70,14 +72,14 @@ typedef CGImageRef NativeImagePtr;
class ImageDecoderQt;
typedef ImageDecoderQt* NativeImageSourcePtr;
typedef QPixmap* NativeImagePtr;
-#elif PLATFORM(ANDROID)
-#if PLATFORM(SGL)
+#elif PLATFORM(SKIA)
+#if PLATFORM(ANDROID)
class String;
#ifdef ANDROID_ANIMATED_GIF
class ImageDecoder;
#endif
struct NativeImageSourcePtr {
- SkString m_url;
+ SkString m_url;
PrivateAndroidImageSourceRec* m_image;
#ifdef ANDROID_ANIMATED_GIF
ImageDecoder* m_gifDecoder;
@@ -85,7 +87,7 @@ struct NativeImageSourcePtr {
};
typedef const Vector<char>* NativeBytePtr;
typedef SkBitmapRef* NativeImagePtr;
-#elif PLATFORM(SKIA) // ANDROID
+#else
class ImageDecoder;
typedef ImageDecoder* NativeImageSourcePtr;
typedef NativeImageSkia* NativeImagePtr;
@@ -101,8 +103,6 @@ typedef wxBitmap* NativeImagePtr;
#endif
#elif PLATFORM(CAIRO)
typedef cairo_surface_t* NativeImagePtr;
-#elif PLATFORM(SKIA)
-typedef NativeImageSkia* NativeImagePtr;
#elif PLATFORM(HAIKU)
typedef BBitmap* NativeImagePtr;
#elif PLATFORM(WINCE)
@@ -166,11 +166,9 @@ public:
bool frameIsCompleteAtIndex(size_t); // Whether or not the frame is completely decoded.
#if PLATFORM(ANDROID)
-#if PLATFORM(SGL)
void clearURL();
void setURL(const String& url);
#endif
-#endif
private:
#if PLATFORM(ANDROID)
// FIXME: This is protected only to allow ImageSourceSkia to set ICO decoder
diff --git a/WebCore/platform/graphics/IntPoint.h b/WebCore/platform/graphics/IntPoint.h
index afbfb46..ab5f3ec 100644
--- a/WebCore/platform/graphics/IntPoint.h
+++ b/WebCore/platform/graphics/IntPoint.h
@@ -63,7 +63,7 @@ class BPoint;
class wxPoint;
#endif
-#if (PLATFORM(SKIA) || PLATFORM(SGL))
+#if PLATFORM(SKIA)
struct SkPoint;
struct SkIPoint;
#endif
@@ -133,7 +133,7 @@ public:
operator wxPoint() const;
#endif
-#if (PLATFORM(SKIA) || PLATFORM(SGL))
+#if PLATFORM(SKIA)
IntPoint(const SkIPoint&);
operator SkIPoint() const;
operator SkPoint() const;
diff --git a/WebCore/platform/graphics/IntRect.h b/WebCore/platform/graphics/IntRect.h
index cd912ff..97b21bc 100644
--- a/WebCore/platform/graphics/IntRect.h
+++ b/WebCore/platform/graphics/IntRect.h
@@ -57,7 +57,7 @@ class BRect;
class wxRect;
#endif
-#if (PLATFORM(SKIA) || PLATFORM(SGL))
+#if PLATFORM(SKIA)
struct SkRect;
struct SkIRect;
#endif
@@ -155,7 +155,7 @@ public:
operator CGRect() const;
#endif
-#if (PLATFORM(SKIA) || PLATFORM(SGL))
+#if PLATFORM(SKIA)
IntRect(const SkIRect&);
operator SkRect() const;
operator SkIRect() const;
diff --git a/WebCore/platform/graphics/Path.h b/WebCore/platform/graphics/Path.h
index fef5ad2..6618fb7 100644
--- a/WebCore/platform/graphics/Path.h
+++ b/WebCore/platform/graphics/Path.h
@@ -39,9 +39,6 @@ QT_BEGIN_NAMESPACE
class QPainterPath;
QT_END_NAMESPACE
typedef QPainterPath PlatformPath;
-#elif PLATFORM(SGL)
-class SkPath;
-typedef SkPath PlatformPath;
#elif PLATFORM(WX) && USE(WXGC)
class wxGraphicsPath;
typedef wxGraphicsPath PlatformPath;
diff --git a/WebCore/platform/graphics/Pattern.h b/WebCore/platform/graphics/Pattern.h
index 2f1192c..aa0a357 100644
--- a/WebCore/platform/graphics/Pattern.h
+++ b/WebCore/platform/graphics/Pattern.h
@@ -39,7 +39,7 @@ typedef CGPatternRef PlatformPatternPtr;
#elif PLATFORM(CAIRO)
#include <cairo.h>
typedef cairo_pattern_t* PlatformPatternPtr;
-#elif PLATFORM(SKIA) || PLATFORM(SGL)
+#elif PLATFORM(SKIA)
class SkShader;
typedef SkShader* PlatformPatternPtr;
#elif PLATFORM(QT)
diff --git a/WebCore/platform/graphics/skia/NativeImageSkia.cpp b/WebCore/platform/graphics/skia/NativeImageSkia.cpp
index 477be05..2411897 100644
--- a/WebCore/platform/graphics/skia/NativeImageSkia.cpp
+++ b/WebCore/platform/graphics/skia/NativeImageSkia.cpp
@@ -30,7 +30,7 @@
#include "config.h"
-#if PLATFORM(SKIA)
+#if !PLATFORM(ANDROID)
#include "skia/ext/image_operations.h"
#endif
@@ -65,10 +65,11 @@ bool NativeImageSkia::hasResizedBitmap(int w, int h) const
SkBitmap NativeImageSkia::resizedBitmap(int w, int h) const
{
-#if PLATFORM(SKIA)
+#if !PLATFORM(ANDROID)
if (m_resizedImage.width() != w || m_resizedImage.height() != h)
m_resizedImage = skia::ImageOperations::Resize(*this, skia::ImageOperations::RESIZE_LANCZOS3, w, h);
#endif
+
return m_resizedImage;
}
diff --git a/WebCore/platform/graphics/transforms/TransformationMatrix.h b/WebCore/platform/graphics/transforms/TransformationMatrix.h
index 33f9afe..802ad3c 100644
--- a/WebCore/platform/graphics/transforms/TransformationMatrix.h
+++ b/WebCore/platform/graphics/transforms/TransformationMatrix.h
@@ -37,7 +37,7 @@
#include <cairo.h>
#elif PLATFORM(QT)
#include <QTransform>
-#elif PLATFORM(SKIA) || PLATFORM(SGL)
+#elif PLATFORM(SKIA)
#include <SkMatrix.h>
#elif PLATFORM(WX) && USE(WXGC)
#include <wx/graphics.h>
@@ -301,7 +301,7 @@ public:
operator cairo_matrix_t() const;
#elif PLATFORM(QT)
operator QTransform() const;
-#elif PLATFORM(SKIA) || PLATFORM(SGL)
+#elif PLATFORM(SKIA)
operator SkMatrix() const;
#elif PLATFORM(WX) && USE(WXGC)
operator wxGraphicsMatrix() const;
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);
diff --git a/WebCore/svg/graphics/SVGPaintServer.cpp b/WebCore/svg/graphics/SVGPaintServer.cpp
index 728ff1b..6b81f72 100644
--- a/WebCore/svg/graphics/SVGPaintServer.cpp
+++ b/WebCore/svg/graphics/SVGPaintServer.cpp
@@ -38,7 +38,7 @@
#include "SVGStyledElement.h"
#include "SVGURIReference.h"
-#if PLATFORM(SKIA)
+#if PLATFORM(SKIA) && !PLATFORM(ANDROID)
#include "PlatformContextSkia.h"
#endif
@@ -184,7 +184,7 @@ void SVGPaintServer::renderPath(GraphicsContext*& context, const RenderObject* p
context->strokePath();
}
-#if PLATFORM(SKIA)
+#if PLATFORM(SKIA) && !PLATFORM(ANDROID)
void SVGPaintServer::teardown(GraphicsContext*& context, const RenderObject*, SVGPaintTargetType, bool) const
{
// FIXME: Move this into the GraphicsContext