https://bugs.webkit.org/show_bug.cgi?id=114886
Reviewed by Benjamin Poulain.
Source/WebCore:
* html/HTMLCanvasElement.cpp: Remove Skia #ifdef references.
* platform/graphics/BitmapImage.cpp: Ditto.
* platform/graphics/FloatPoint.h: Ditto.
* platform/graphics/FloatRect.h: Ditto.
* platform/graphics/FontCache.h: Ditto.
* platform/graphics/Gradient.cpp: Ditto.
* platform/graphics/Gradient.h: Ditto.
* platform/graphics/GraphicsContext.cpp: Ditto.
* platform/graphics/GraphicsContext.h: Ditto.
* platform/graphics/GraphicsContext3D.h: Ditto.
* platform/graphics/ImageBuffer.cpp: Ditto.
* platform/graphics/ImageBuffer.h: Ditto.
* platform/graphics/ImageBufferData.h: Ditto.
* platform/graphics/IntPoint.h: Ditto.
* platform/graphics/IntRect.h: Ditto.
* platform/graphics/NativeImagePtr.h: Ditto.
* platform/graphics/Path.h: Ditto.
* platform/graphics/Pattern.cpp: Ditto.
* platform/graphics/Pattern.h: Ditto.
* platform/graphics/filters/FEBlend.h: Ditto.
* platform/graphics/filters/FEColorMatrix.h: Ditto.
* platform/graphics/filters/FEComponentTransfer.h: Ditto.
* platform/graphics/filters/FEComposite.h: Ditto.
* platform/graphics/filters/FEConvolveMatrix.h: Ditto.
* platform/graphics/filters/FEDisplacementMap.h: Ditto.
* platform/graphics/filters/FEGaussianBlur.h: Ditto.
* platform/graphics/filters/FELighting.h: Ditto.
* platform/graphics/filters/FEMorphology.h: Ditto.
* platform/graphics/filters/FEOffset.h: Ditto.
* platform/graphics/filters/FilterEffect.cpp: Ditto.
* platform/graphics/filters/FilterEffect.h: Ditto.
* platform/graphics/transforms/AffineTransform.h: Ditto.
* platform/graphics/transforms/TransformationMatrix.h: Ditto.
* platform/image-decoders/ImageDecoder.cpp: Ditto.
* platform/image-decoders/ImageDecoder.h: Ditto.
* platform/image-decoders/jpeg/JPEGImageDecoder.cpp: Ditto.
* platform/image-decoders/webp/WEBPImageDecoder.cpp: Ditto.
* platform/mac/LocalCurrentGraphicsContext.h: Ditto.
* platform/mac/LocalCurrentGraphicsContext.mm: Ditto.
* rendering/svg/RenderSVGResourceSolidColor.cpp: Ditto.
* svg/graphics/SVGImage.cpp: Ditto.
* svg/graphics/SVGImage.h: Ditto.
Source/WebKit/blackberry:
* Api/WebPage.cpp: Remove Skia #ifdef references.
* WebCoreSupport/AboutDataUseFeatures.in: Ditto.
Source/WTF:
* wtf/Platform.h:
Tools:
* DumpRenderTree/blackberry/PixelDumpSupportBlackBerry.cpp:
(createBitmapContextFromWebView): Remove Skia #ifdef references.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@149193
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2013-04-26 Martin Robinson <mrobinson@igalia.com>
+
+ Remove the remaining Skia #ifdefs
+ https://bugs.webkit.org/show_bug.cgi?id=114886
+
+ Reviewed by Benjamin Poulain.
+
+ * wtf/Platform.h:
+
2013-04-26 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
Add move semantics to RefPtr
#endif
#if PLATFORM(BLACKBERRY)
-#define WTF_USE_SKIA 1
#define WTF_USE_LOW_QUALITY_IMAGE_INTERPOLATION 1
#define WTF_USE_LOW_QUALITY_IMAGE_NO_JPEG_DITHERING 1
#define WTF_USE_LOW_QUALITY_IMAGE_NO_JPEG_FANCY_UPSAMPLING 1
+2013-04-26 Martin Robinson <mrobinson@igalia.com>
+
+ Remove the remaining Skia #ifdefs
+ https://bugs.webkit.org/show_bug.cgi?id=114886
+
+ Reviewed by Benjamin Poulain.
+
+ * html/HTMLCanvasElement.cpp: Remove Skia #ifdef references.
+ * platform/graphics/BitmapImage.cpp: Ditto.
+ * platform/graphics/FloatPoint.h: Ditto.
+ * platform/graphics/FloatRect.h: Ditto.
+ * platform/graphics/FontCache.h: Ditto.
+ * platform/graphics/Gradient.cpp: Ditto.
+ * platform/graphics/Gradient.h: Ditto.
+ * platform/graphics/GraphicsContext.cpp: Ditto.
+ * platform/graphics/GraphicsContext.h: Ditto.
+ * platform/graphics/GraphicsContext3D.h: Ditto.
+ * platform/graphics/ImageBuffer.cpp: Ditto.
+ * platform/graphics/ImageBuffer.h: Ditto.
+ * platform/graphics/ImageBufferData.h: Ditto.
+ * platform/graphics/IntPoint.h: Ditto.
+ * platform/graphics/IntRect.h: Ditto.
+ * platform/graphics/NativeImagePtr.h: Ditto.
+ * platform/graphics/Path.h: Ditto.
+ * platform/graphics/Pattern.cpp: Ditto.
+ * platform/graphics/Pattern.h: Ditto.
+ * platform/graphics/filters/FEBlend.h: Ditto.
+ * platform/graphics/filters/FEColorMatrix.h: Ditto.
+ * platform/graphics/filters/FEComponentTransfer.h: Ditto.
+ * platform/graphics/filters/FEComposite.h: Ditto.
+ * platform/graphics/filters/FEConvolveMatrix.h: Ditto.
+ * platform/graphics/filters/FEDisplacementMap.h: Ditto.
+ * platform/graphics/filters/FEGaussianBlur.h: Ditto.
+ * platform/graphics/filters/FELighting.h: Ditto.
+ * platform/graphics/filters/FEMorphology.h: Ditto.
+ * platform/graphics/filters/FEOffset.h: Ditto.
+ * platform/graphics/filters/FilterEffect.cpp: Ditto.
+ * platform/graphics/filters/FilterEffect.h: Ditto.
+ * platform/graphics/transforms/AffineTransform.h: Ditto.
+ * platform/graphics/transforms/TransformationMatrix.h: Ditto.
+ * platform/image-decoders/ImageDecoder.cpp: Ditto.
+ * platform/image-decoders/ImageDecoder.h: Ditto.
+ * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: Ditto.
+ * platform/image-decoders/webp/WEBPImageDecoder.cpp: Ditto.
+ * platform/mac/LocalCurrentGraphicsContext.h: Ditto.
+ * platform/mac/LocalCurrentGraphicsContext.mm: Ditto.
+ * rendering/svg/RenderSVGResourceSolidColor.cpp: Ditto.
+ * svg/graphics/SVGImage.cpp: Ditto.
+ * svg/graphics/SVGImage.h: Ditto.
+
2013-04-26 Allan Sandfeld Jensen <allan.jensen@digia.com>
Assert in JSC::Heap::unprotect when closing facebook.com web site
String encodingMimeType = toEncodingMimeType(mimeType);
-#if USE(CG) || USE(SKIA)
+#if USE(CG)
// Try to get ImageData first, as that may avoid lossy conversions.
RefPtr<ImageData> imageData = getImageData();
if (deviceSize.width() * deviceSize.height() > MaxCanvasArea)
return;
-#if USE(SKIA)
- if (deviceSize.width() > MaxSkiaDim || deviceSize.height() > MaxSkiaDim)
- return;
-#endif
IntSize bufferSize(deviceSize.width(), deviceSize.height());
if (!bufferSize.width() || !bufferSize.height())
return;
- RenderingMode renderingMode = shouldAccelerate(bufferSize) ? Accelerated :
-#if USE(SKIA)
- UnacceleratedNonPlatformBuffer;
-#else
- Unaccelerated;
-#endif
+ RenderingMode renderingMode = shouldAccelerate(bufferSize) ? Accelerated : Unaccelerated;
m_imageBuffer = ImageBuffer::create(size(), m_deviceScaleFactor, ColorSpaceDeviceRGB, renderingMode);
if (!m_imageBuffer)
return;
QT_END_NAMESPACE
#endif
-#if USE(SKIA)
-struct SkPoint;
-#endif
-
namespace WebCore {
class AffineTransform;
operator BlackBerry::Platform::FloatPoint() const;
#endif
-#if USE(SKIA)
- operator SkPoint() const;
- FloatPoint(const SkPoint&);
-#endif
-
FloatPoint matrixTransform(const TransformationMatrix&) const;
FloatPoint matrixTransform(const AffineTransform&) const;
}
#endif
-#if USE(SKIA)
-struct SkRect;
-#endif
-
#if USE(CAIRO)
typedef struct _cairo_rectangle cairo_rectangle_t;
#endif
FloatRect normalized() const;
#endif
-#if USE(SKIA)
- FloatRect(const SkRect&);
- operator SkRect() const;
-#endif
-
#if USE(CAIRO)
FloatRect(const cairo_rectangle_t&);
operator cairo_rectangle_t() const;
#endif
#if ENABLE(OPENTYPE_VERTICAL)
-#if USE(SKIA)
- typedef uint32_t FontFileKey;
-#else
typedef AtomicString FontFileKey;
-#endif
PassRefPtr<OpenTypeVerticalData> getVerticalData(const FontFileKey&, const FontPlatformData&);
#endif
invalidateHash();
}
-#if !USE(SKIA) && !USE(CAIRO) && !PLATFORM(BLACKBERRY)
+#if !USE(CAIRO) && !PLATFORM(BLACKBERRY)
void Gradient::setPlatformGradientSpaceTransform(const AffineTransform&)
{
}
#elif USE(CAIRO)
typedef struct _cairo_pattern cairo_pattern_t;
typedef cairo_pattern_t* PlatformGradient;
-#elif USE(SKIA)
-class SkShader;
-typedef class SkShader* PlatformGradient;
-typedef class SkShader* PlatformPattern;
#elif PLATFORM(BLACKBERRY)
namespace BlackBerry {
namespace Platform {
}
#endif
-#if !USE(SKIA)
void GraphicsContext::clipRoundedRect(const RoundedRect& rect)
{
if (paintingDisabled())
path.addRoundedRect(rect);
clip(path);
}
-#endif
void GraphicsContext::clipOutRoundedRect(const RoundedRect& rect)
{
return m_state.blendMode;
}
-#if !USE(CG) && !USE(SKIA)
+#if !USE(CG)
// Implement this if you want to go ahead and push the drawing mode into your native context
// immediately.
void GraphicsContext::setPlatformTextDrawingMode(TextDrawingModeFlags)
}
#endif
-#if !PLATFORM(QT) && !USE(CAIRO) && !USE(SKIA)
+#if !PLATFORM(QT) && !USE(CAIRO)
void GraphicsContext::setPlatformStrokeStyle(StrokeStyle)
{
}
}
#endif
-#if !USE(SKIA) && !USE(CG) && !USE(CAIRO)
+#if !USE(CG) && !USE(CAIRO)
bool GraphicsContext::isAcceleratedContext() const
{
return false;
strokePath(path);
}
-#if !USE(CG) && !USE(SKIA) // append && !USE(MYPLATFORM) here to optimize ellipses on your platform.
+#if !USE(CG)
void GraphicsContext::platformFillEllipse(const FloatRect& ellipse)
{
if (paintingDisabled())
#elif PLATFORM(QT)
#include <QPainter>
typedef QPainter PlatformGraphicsContext;
-#elif USE(SKIA)
-namespace WebCore {
-class PlatformContextSkia;
-typedef PlatformContextSkia GraphicsContextPlatformPrivate;
-}
-typedef WebCore::PlatformContextSkia PlatformGraphicsContext;
#elif OS(WINCE)
typedef struct HDC__ PlatformGraphicsContext;
#else
class AffineTransform;
class DrawingBuffer;
class Generator;
-#if !USE(SKIA)
class GraphicsContextPlatformPrivate;
-#endif
class ImageBuffer;
class IntRect;
class RoundedRect;
typedef void* PlatformGraphicsSurface3D;
#endif
-#if PLATFORM(BLACKBERRY) && USE(SKIA)
-class GrContext;
-#endif
-
// These are currently the same among all implementations.
const PlatformGraphicsContext3D NullPlatformGraphicsContext3D = 0;
const Platform3DObject NullPlatform3DObject = 0;
#elif PLATFORM(BLACKBERRY)
PlatformGraphicsContext3D platformGraphicsContext3D() const;
Platform3DObject platformTexture() const;
-#if USE(SKIA)
- GrContext* grContext();
-#endif
#if USE(ACCELERATED_COMPOSITING)
PlatformLayer* platformLayer() const;
#endif
// needs to lock the resources or relevant data if needed and returns true upon success
bool extractImage(bool premultiplyAlpha, bool ignoreGammaAndColorProfile);
-#if USE(SKIA)
- RefPtr<NativeImageSkia> m_nativeImage;
- RefPtr<NativeImageSkia> m_skiaImage;
-#elif USE(CAIRO)
+#if USE(CAIRO)
ImageSource* m_decoder;
RefPtr<cairo_surface_t> m_imageSurface;
#elif USE(CG)
genericConvertToLuminanceMask();
}
-#if USE(ACCELERATED_COMPOSITING) && !USE(SKIA) && !USE(CAIRO) && !PLATFORM(BLACKBERRY)
+#if USE(ACCELERATED_COMPOSITING) && !USE(CAIRO) && !PLATFORM(BLACKBERRY)
PlatformLayer* ImageBuffer::platformLayer() const
{
return 0;
}
#endif
-#if !USE(SKIA)
bool ImageBuffer::copyToPlatformTexture(GraphicsContext3D&, Platform3DObject, GC3Denum, bool, bool)
{
return false;
{
return create(size, resolutionScale, colorSpace, context->isAcceleratedContext() ? Accelerated : Unaccelerated);
}
-#endif
}
// This constructor will place its success into the given out-variable
// so that create() knows when it should return failure.
ImageBuffer(const IntSize&, float resolutionScale, ColorSpace, RenderingMode, bool& success);
-#if USE(SKIA)
- ImageBuffer(const IntSize&, float resolutionScale, ColorSpace, const GraphicsContext*, bool hasAlpha, bool& success);
-#endif
};
-#if USE(CG) || USE(SKIA)
+#if USE(CG)
String ImageDataToDataURL(const ImageData&, const String& mimeType, const double* quality);
#endif
#include "ImageBufferDataCairo.h"
#elif PLATFORM(QT)
#include "ImageBufferDataQt.h"
-#elif USE(SKIA)
-#include "ImageBufferDataSkia.h"
#elif OS(WINCE)
#include "ImageBufferDataWince.h"
#endif
typedef struct _Evas_Point Evas_Point;
#endif
-#if USE(SKIA)
-struct SkPoint;
-struct SkIPoint;
-#endif
-
namespace WebCore {
class IntPoint {
operator Evas_Point() const;
#endif
-#if USE(SKIA)
- IntPoint(const SkIPoint&);
- operator SkIPoint() const;
- operator SkPoint() const;
-#endif
-
private:
int m_x, m_y;
};
typedef struct _cairo_rectangle_int cairo_rectangle_int_t;
#endif
-#if USE(SKIA)
-struct SkRect;
-struct SkIRect;
-#endif
-
namespace WebCore {
class FloatRect;
operator CGRect() const;
#endif
-#if USE(SKIA)
- IntRect(const SkIRect&);
- operator SkRect() const;
- operator SkIRect() const;
-#endif
-
#if (PLATFORM(MAC) && !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES)) || (PLATFORM(QT) && USE(QTKIT))
operator NSRect() const;
#endif
QT_END_NAMESPACE
#elif USE(CAIRO)
#include "RefPtrCairo.h"
-#elif USE(SKIA)
-#include "NativeImageSkia.h"
-namespace WebCore {
-class NativeImageSkia;
-}
#elif OS(WINCE)
#include "SharedBitmap.h"
#endif
#elif USE(CAIRO)
typedef RefPtr<cairo_surface_t> NativeImagePtr;
typedef PassRefPtr<cairo_surface_t> PassNativeImagePtr;
-#elif USE(SKIA)
-typedef RefPtr<NativeImageSkia> NativeImagePtr;
-typedef PassRefPtr<NativeImageSkia> PassNativeImagePtr;
#elif OS(WINCE)
typedef RefPtr<SharedBitmap> NativeImagePtr;
#elif PLATFORM(BLACKBERRY)
typedef void* NativeImagePtr;
#endif
-#if !USE(SKIA) && !USE(CAIRO)
+#if !USE(CAIRO)
typedef NativeImagePtr PassNativeImagePtr;
#endif
class CairoPath;
}
typedef WebCore::CairoPath PlatformPath;
-#elif USE(SKIA)
-class SkPath;
-typedef SkPath PlatformPath;
#elif OS(WINCE)
namespace WebCore {
class PlatformPath;
: m_tileImage(image)
, m_repeatX(repeatX)
, m_repeatY(repeatY)
-#if USE(SKIA)
- , m_pattern(0)
- , m_externalMemoryAllocated(0)
-#endif
{
ASSERT(m_tileImage);
}
setPlatformPatternSpaceTransform();
}
-#if !USE(SKIA)
void Pattern::platformDestroy()
{
}
void Pattern::setPlatformPatternSpaceTransform()
{
}
-#endif
}
#elif USE(CAIRO)
#include <cairo.h>
typedef cairo_pattern_t* PlatformPatternPtr;
-#elif USE(SKIA)
-class SkShader;
-typedef SkShader* PlatformPatternPtr;
#elif PLATFORM(QT)
#include <QBrush>
typedef QBrush PlatformPatternPtr;
void platformDestroy();
// Pattern space is an abstract space that maps to the default user space by the transformation 'userSpaceTransformation'
-#if USE(SKIA)
- PlatformPatternPtr platformPattern(const AffineTransform& userSpaceTransformation);
-#elif PLATFORM(QT)
+#if PLATFORM(QT)
// Qt ignores user space transformation and uses pattern's instead
PlatformPatternPtr createPlatformPattern() const;
#else
bool m_repeatY;
AffineTransform m_patternSpaceTransformation;
PlatformPatternPtr m_pattern;
-#if USE(SKIA)
- int m_externalMemoryAllocated;
-#endif
};
} //namespace
unsigned colorArrayLength);
void platformApplyNEON(unsigned char* srcPixelArrayA, unsigned char* srcPixelArrayB, unsigned char* dstPixelArray,
unsigned colorArrayLength);
-#if USE(SKIA)
- virtual bool platformApplySkia();
- virtual SkImageFilter* createImageFilter(SkiaImageFilterBuilder*);
-#endif
-
virtual void platformApplySoftware();
virtual void dump();
bool setValues(const Vector<float>&);
virtual void platformApplySoftware();
-#if USE(SKIA)
- virtual bool platformApplySkia();
- virtual SkImageFilter* createImageFilter(SkiaImageFilterBuilder*);
-#endif
#if ENABLE(OPENCL)
virtual bool platformApplyOpenCL();
#endif
void setAlphaFunction(const ComponentTransferFunction&);
virtual void platformApplySoftware();
-#if USE(SKIA)
- virtual bool platformApplySkia();
- virtual SkImageFilter* createImageFilter(SkiaImageFilterBuilder*);
-#endif
virtual void dump();
virtual TextStream& externalRepresentation(TextStream&, int indention) const;
virtual TextStream& externalRepresentation(TextStream&, int indention) const;
-#if USE(SKIA)
- virtual SkImageFilter* createImageFilter(SkiaImageFilterBuilder*);
-#endif
-
protected:
virtual bool requiresValidPreMultipliedPixels() OVERRIDE { return m_type != FECOMPOSITE_OPERATOR_ARITHMETIC; }
bool setPreserveAlpha(bool);
virtual void platformApplySoftware();
-#if USE(SKIA)
- virtual SkImageFilter* createImageFilter(SkiaImageFilterBuilder*);
-#endif
virtual void dump();
virtual void determineAbsolutePaintRect() { setAbsolutePaintRect(enclosingIntRect(maxEffectRect())); }
private:
FEDisplacementMap(Filter*, ChannelSelectorType xChannelSelector, ChannelSelectorType yChannelSelector, float);
-#if USE(SKIA)
- virtual bool platformApplySkia();
- virtual SkImageFilter* createImageFilter(SkiaImageFilterBuilder*);
-#endif
-
ChannelSelectorType m_xChannelSelector;
ChannelSelectorType m_yChannelSelector;
float m_scale;
inline void platformApply(Uint8ClampedArray* srcPixelArray, Uint8ClampedArray* tmpPixelArray, unsigned kernelSizeX, unsigned kernelSizeY, IntSize& paintSize);
inline void platformApplyGeneric(Uint8ClampedArray* srcPixelArray, Uint8ClampedArray* tmpPixelArray, unsigned kernelSizeX, unsigned kernelSizeY, IntSize& paintSize);
-#if USE(SKIA)
- virtual bool platformApplySkia();
- virtual SkImageFilter* createImageFilter(SkiaImageFilterBuilder*);
-#endif
float m_stdX;
float m_stdY;
class FELighting : public FilterEffect {
public:
virtual void platformApplySoftware();
-#if USE(SKIA)
- virtual SkImageFilter* createImageFilter(SkiaImageFilterBuilder*);
- virtual bool platformApplySkia();
-#endif
virtual void determineAbsolutePaintRect() { setAbsolutePaintRect(enclosingIntRect(maxEffectRect())); }
bool setRadiusY(float);
virtual void platformApplySoftware();
-#if USE(SKIA)
- virtual bool platformApplySkia();
- virtual SkImageFilter* createImageFilter(SkiaImageFilterBuilder*);
-
-#endif
virtual void dump();
virtual void determineAbsolutePaintRect();
virtual TextStream& externalRepresentation(TextStream&, int indention) const;
-#if USE(SKIA)
- virtual SkImageFilter* createImageFilter(SkiaImageFilterBuilder*);
-#endif
-
private:
FEOffset(Filter*, float dx, float dy);
if (platformApplyOpenCL())
return;
#endif
-#if USE(SKIA)
- if (platformApplySkia())
- return;
-#endif
platformApplySoftware();
}
static const float kMaxFilterSize = 5000.0f;
-#if USE(SKIA)
-class SkImageFilter;
-#endif
-
namespace WebCore {
class Filter;
class ImageBuffer;
class TextStream;
-#if USE(SKIA)
-class SkiaImageFilterBuilder;
-#endif
-
typedef Vector<RefPtr<FilterEffect> > FilterEffectVector;
enum FilterEffectType {
#if ENABLE(OPENCL)
virtual bool platformApplyOpenCL();
#endif
-#if USE(SKIA)
- virtual bool platformApplySkia() { return false; }
- virtual SkImageFilter* createImageFilter(SkiaImageFilterBuilder*) { return 0; }
-#endif
virtual void dump() = 0;
virtual void determineAbsolutePaintRect();
#include <cairo.h>
#elif PLATFORM(QT)
#include <QTransform>
-#elif USE(SKIA)
-#include <SkMatrix.h>
#endif
namespace WebCore {
operator cairo_matrix_t() const;
#elif PLATFORM(QT)
operator QTransform() const;
-#elif USE(SKIA)
- operator SkMatrix() const;
#endif
static AffineTransform translation(double x, double y)
#elif PLATFORM(QT)
#include <QMatrix4x4>
#include <QTransform>
-#elif USE(SKIA)
-#include <SkMatrix.h>
#endif
#if PLATFORM(WIN) || (PLATFORM(GTK) && OS(WINDOWS)) || (PLATFORM(QT) && OS(WINDOWS))
#elif PLATFORM(QT)
operator QTransform() const;
operator QMatrix4x4() const;
-#elif USE(SKIA)
- operator SkMatrix() const;
#endif
#if PLATFORM(WIN) || (PLATFORM(GTK) && OS(WINDOWS)) || (PLATFORM(QT) && OS(WINDOWS))
return 0;
}
-#if !USE(SKIA)
-
ImageFrame::ImageFrame()
: m_hasAlpha(false)
, m_status(FrameEmpty)
m_status = status;
}
-#endif
-
namespace {
enum MatchType {
#include <wtf/Vector.h>
#include <wtf/text/WTFString.h>
-#if USE(SKIA)
-#include "NativeImageSkia.h"
-#include "SkColorPriv.h"
-#endif
-
#if USE(QCMSLIB)
#include "qcms.h"
#if OS(DARWIN)
DisposeOverwritePrevious // Clear frame to previous framebuffer
// contents
};
-#if USE(SKIA)
- typedef uint32_t PixelData;
-#else
typedef unsigned PixelData;
-#endif
ImageFrame();
inline PixelData* getAddr(int x, int y)
{
-#if USE(SKIA)
- return m_bitmap->bitmap().getAddr32(x, y);
-#else
return m_bytes + (y * width()) + x;
-#endif
}
// Use fix point multiplier instead of integer division or floating point math.
g = fixPointUnsignedMultiply(g, alphaMult);
b = fixPointUnsignedMultiply(b, alphaMult);
}
-#if USE(SKIA)
- // Call the "NoCheck" version since we may deliberately pass non-premultiplied
- // values, and we don't want an assert.
- *dest = SkPackARGB32NoCheck(a, r, g, b);
-#else
*dest = (a << 24 | r << 16 | g << 8 | b);
-#endif
}
private:
int width() const
{
-#if USE(SKIA)
- return m_bitmap->bitmap().width();
-#else
return m_size.width();
-#endif
}
int height() const
{
-#if USE(SKIA)
- return m_bitmap->bitmap().height();
-#else
return m_size.height();
-#endif
}
-#if USE(SKIA)
- RefPtr<NativeImageSkia> m_bitmap;
- SkBitmap::Allocator* m_allocator;
-#else
Vector<PixelData> m_backingStore;
PixelData* m_bytes; // The memory is backed by m_backingStore.
IntSize m_size;
// FIXME: Do we need m_colorProfile anymore?
ColorProfile m_colorProfile;
-#endif
bool m_hasAlpha;
IntRect m_originalFrameRect; // This will always just be the entire
// buffer except for GIF frames whose
// and returns true. Otherwise returns false.
virtual bool hotSpot(IntPoint&) const { return false; }
-#if USE(SKIA)
- virtual void setMemoryAllocator(SkBitmap::Allocator* allocator)
- {
- // FIXME: this doesn't work for images with multiple frames.
- if (m_frameBufferCache.isEmpty())
- m_frameBufferCache.resize(1);
- m_frameBufferCache[0].setMemoryAllocator(allocator);
- }
-
- virtual bool lockFrameBuffers()
- {
- bool ret = true;
- for (unsigned i = 0; i < m_frameBufferCache.size(); ++i) {
- const SkBitmap& bitmap = m_frameBufferCache[i].getSkBitmap();
- bitmap.lockPixels();
- ret = ret && bitmap.getPixels();
- }
- return ret;
- }
-
- virtual void unlockFrameBuffers()
- {
- for (unsigned i = 0; i < m_frameBufferCache.size(); ++i)
- m_frameBufferCache[i].getSkBitmap().unlockPixels();
- }
-#endif
protected:
void prepareScaleDataIfNecessary();
int upperBoundScaledX(int origX, int searchStart = 0);
#if defined(JCS_ALPHA_EXTENSIONS) && ASSUME_LITTLE_ENDIAN
#define TURBO_JPEG_RGB_SWIZZLE
-#if USE(SKIA) && (!SK_R32_SHIFT && SK_G32_SHIFT == 8 && SK_B32_SHIFT == 16)
-inline J_COLOR_SPACE rgbOutputColorSpace() { return JCS_EXT_RGBA; }
-#else
inline J_COLOR_SPACE rgbOutputColorSpace() { return JCS_EXT_BGRA; }
-#endif
inline bool turboSwizzled(J_COLOR_SPACE colorSpace) { return colorSpace == JCS_EXT_RGBA || colorSpace == JCS_EXT_BGRA; }
inline bool colorSpaceHasAlpha(J_COLOR_SPACE colorSpace) { return turboSwizzled(colorSpace); }
#else
#if CPU(BIG_ENDIAN) || CPU(MIDDLE_ENDIAN)
inline WEBP_CSP_MODE outputMode(bool hasAlpha) { return hasAlpha ? MODE_rgbA : MODE_RGBA; }
-#elif USE(SKIA) && SK_B32_SHIFT
-inline WEBP_CSP_MODE outputMode(bool hasAlpha) { return hasAlpha ? MODE_rgbA : MODE_RGBA; }
#else // LITTLE_ENDIAN, output BGRA pixels.
inline WEBP_CSP_MODE outputMode(bool hasAlpha) { return hasAlpha ? MODE_bgrA : MODE_BGRA; }
#endif
#include "GraphicsContext.h"
#include <wtf/Noncopyable.h>
-#if USE(SKIA)
-#include "skia/ext/skia_utils_mac.h"
-#endif
-
OBJC_CLASS NSGraphicsContext;
namespace WebCore {
GraphicsContext* m_savedGraphicsContext;
NSGraphicsContext* m_savedNSGraphicsContext;
bool m_didSetGraphicsContext;
-#if USE(SKIA)
- gfx::SkiaBitLocker m_skiaBitLocker;
-#endif
};
class ContextContainer {
WTF_MAKE_NONCOPYABLE(ContextContainer);
public:
-#if USE(SKIA)
- ContextContainer(GraphicsContext*);
-
- // This synchronizes the CGContext to reflect the current SkCanvas state.
- // The implementation may not return the same CGContext each time.
- CGContextRef context() { return m_skiaBitLocker.cgContext(); }
-#else
ContextContainer(GraphicsContext* graphicsContext)
: m_graphicsContext(graphicsContext->platformContext())
{
}
CGContextRef context() { return m_graphicsContext; }
-#endif
private:
-#if USE(SKIA)
- gfx::SkiaBitLocker m_skiaBitLocker;
-#else
PlatformGraphicsContext* m_graphicsContext;
-#endif
};
}
#include <AppKit/NSGraphicsContext.h>
-#if USE(SKIA)
-#include "platform_canvas.h"
-#include "PlatformContextSkia.h"
-#endif
-
namespace WebCore {
LocalCurrentGraphicsContext::LocalCurrentGraphicsContext(GraphicsContext* graphicsContext)
: m_didSetGraphicsContext(false)
-#if USE(SKIA)
- , m_skiaBitLocker(graphicsContext->platformContext()->canvas())
-#endif
{
m_savedGraphicsContext = graphicsContext;
graphicsContext->save();
CGContextRef LocalCurrentGraphicsContext::cgContext()
{
-#if USE(SKIA)
- // This synchronizes the CGContext to reflect the current SkCanvas state.
- // The implementation may not return the same CGContext each time.
- CGContextRef cgContext = m_skiaBitLocker.cgContext();
-#else
CGContextRef cgContext = m_savedGraphicsContext->platformContext();
-#endif
return cgContext;
}
-#if USE(SKIA)
-ContextContainer::ContextContainer(GraphicsContext* graphicsContext)
- : m_skiaBitLocker(graphicsContext->platformContext()->canvas())
-{
-}
-#endif
-
}
#include "RenderStyle.h"
#include "SVGRenderSupport.h"
-#if USE(SKIA)
-#include "PlatformContextSkia.h"
-#endif
-
namespace WebCore {
RenderSVGResourceType RenderSVGResourceSolidColor::s_resourceType = SolidColorResourceType;
setImageObserver(observer);
}
-#if USE(SKIA) || USE(CAIRO)
+#if USE(CAIRO)
// Passes ownership of the native image to the caller so PassNativeImagePtr needs
// to be a smart pointer type.
PassNativeImagePtr SVGImage::nativeImageForCurrentFrame()
virtual void stopAnimation() OVERRIDE;
virtual void resetAnimation() OVERRIDE;
-#if USE(SKIA) || USE(CAIRO)
+#if USE(CAIRO)
virtual PassNativeImagePtr nativeImageForCurrentFrame() OVERRIDE;
#endif
#include "MediaPlayerPrivateBlackBerry.h"
#endif
-#if USE(SKIA)
-#include "PlatformContextSkia.h"
-#endif
-
#if USE(ACCELERATED_COMPOSITING)
#include "FrameLayers.h"
#include "WebPageCompositorClient.h"
+2013-04-26 Martin Robinson <mrobinson@igalia.com>
+
+ Remove the remaining Skia #ifdefs
+ https://bugs.webkit.org/show_bug.cgi?id=114886
+
+ Reviewed by Benjamin Poulain.
+
+ * Api/WebPage.cpp: Remove Skia #ifdef references.
+ * WebCoreSupport/AboutDataUseFeatures.in: Ditto.
+
2013-04-26 Mary Wu <mary.wu@torchmobile.com.cn>
[BlackBerry] Should check if it's cached resource before download
SAFARI_THEME
SCROLLBAR_PAINTER
SECURITY_FRAMEWORK
-SKIA
-SKIA_ON_MAC_CHROMIUM
-SKIA_TEXT
SOUP
STORAGE_STRATEGIES
TEXMAP_OPENGL_ES_2
+2013-04-26 Martin Robinson <mrobinson@igalia.com>
+
+ Remove the remaining Skia #ifdefs
+ https://bugs.webkit.org/show_bug.cgi?id=114886
+
+ Reviewed by Benjamin Poulain.
+
+ * DumpRenderTree/blackberry/PixelDumpSupportBlackBerry.cpp:
+ (createBitmapContextFromWebView): Remove Skia #ifdef references.
+
2013-04-26 Mary Wu <mary.wu@torchmobile.com.cn>
[BlackBerry] Clean up load interface in WebPage
#include "WebPageClient.h"
#include <BlackBerryPlatformWindow.h>
-#if USE(SKIA)
-#include <SkDevice.h>
-#endif
#include <wtf/MD5.h>
#include <wtf/Vector.h>
const Platform::IntSize& windowSize = window->viewportSize();
unsigned char* data = new unsigned char[windowSize.width() * windowSize.height() * 4];
-#if USE(SKIA)
- // We need to force a synchronous update to the window or we may get an empty bitmap.
- // For example, running DRT with one test case that finishes before the screen is updated.
- window->post(windowRect);
-
- SkBitmap bitmap;
- bitmap.setConfig(SkBitmap::kARGB_8888_Config, windowSize.width(), windowSize.height());
- bitmap.allocPixels();
- bitmap.eraseARGB(0, 0, 0, 0);
-
- SkCanvas canvas(bitmap);
- backingStore->drawContents(&canvas, windowRect, windowSize);
-
- // Read that SkBitmap rather than change it. So use false on accessBitmap.
- const SkBitmap& contentsBitmap = canvas.getDevice()->accessBitmap(false/*changePixels*/);
- contentsBitmap.lockPixels();
-
- const unsigned char* windowPixels = 0;
- if (!contentsBitmap.empty()) {
- windowPixels = static_cast<const unsigned char*>(contentsBitmap.getPixels());
- if (windowPixels)
- memcpy(data, windowPixels, windowSize.width() * windowSize.height() * 4);
- }
-#else
BlackBerry::Platform::Graphics::Buffer* buffer = BlackBerry::Platform::Graphics::createBuffer(windowSize, BlackBerry::Platform::Graphics::AlwaysBacked);
BlackBerry::Platform::Graphics::Drawable* drawable = BlackBerry::Platform::Graphics::lockBufferDrawable(buffer);
if (drawable) {
BlackBerry::Platform::Graphics::releaseBufferDrawable(buffer);
}
BlackBerry::Platform::Graphics::destroyBuffer(buffer);
-#endif
return BitmapContext::createByAdoptingData(data, windowSize.width(), windowSize.height());
}