2011-02-24 Patrick Gansterer <paroga@webkit.org>
authorparoga@webkit.org <paroga@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Feb 2011 17:33:43 +0000 (17:33 +0000)
committerparoga@webkit.org <paroga@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Feb 2011 17:33:43 +0000 (17:33 +0000)
        Reviewed by Eric Seidel.

        Rename PLATFORM(SKIA) to USE(SKIA)
        https://bugs.webkit.org/show_bug.cgi?id=55090

        * wtf/Platform.h:
2011-02-24  Patrick Gansterer  <paroga@webkit.org>

        Reviewed by Eric Seidel.

        Rename PLATFORM(SKIA) to USE(SKIA)
        https://bugs.webkit.org/show_bug.cgi?id=55090

        * config.h: Removed second define of PLATFORM(SKIA).
        * html/HTMLCanvasElement.cpp:
        * platform/graphics/FloatPoint.h:
        * platform/graphics/FloatRect.h:
        * platform/graphics/Gradient.cpp:
        * platform/graphics/Gradient.h:
        * platform/graphics/GraphicsContext.cpp:
        * platform/graphics/GraphicsContext.h:
        * platform/graphics/ImageSource.h:
        * platform/graphics/IntPoint.h:
        * platform/graphics/IntRect.h:
        * platform/graphics/Path.h:
        * platform/graphics/Pattern.cpp:
        * platform/graphics/Pattern.h:
        * platform/graphics/chromium/ContentLayerChromium.cpp:
        * platform/graphics/chromium/ContentLayerChromium.h:
        * platform/graphics/chromium/GLES2Canvas.cpp:
        * platform/graphics/chromium/ImageLayerChromium.cpp:
        * platform/graphics/chromium/LayerChromium.cpp:
        * platform/graphics/chromium/LayerRendererChromium.cpp:
        * platform/graphics/chromium/LayerRendererChromium.h:
        * platform/graphics/chromium/LayerTilerChromium.cpp:
        * platform/graphics/chromium/ShaderChromium.h:
        * platform/graphics/gpu/LoopBlinnPathProcessor.cpp:
        * platform/graphics/transforms/AffineTransform.h:
        * platform/graphics/transforms/TransformationMatrix.h:
        * platform/image-decoders/ImageDecoder.cpp:
        * platform/image-decoders/ImageDecoder.h:
        * rendering/svg/RenderSVGResourceSolidColor.cpp:
2011-02-24  Patrick Gansterer  <paroga@webkit.org>

        Reviewed by Eric Seidel.

        Rename PLATFORM(SKIA) to USE(SKIA)
        https://bugs.webkit.org/show_bug.cgi?id=55090

        * src/GraphicsContext3DChromium.cpp:
        (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal):
        (WebCore::GraphicsContext3DInternal::paintRenderingResultsToCanvas):
        * src/GraphicsContext3DInternal.h:
        * src/WebViewImpl.cpp:
        (WebKit::WebViewImpl::doPixelReadbackToCanvas):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@79578 268f45cc-cd09-0410-ab3c-d52691b4dbfc

36 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/wtf/Platform.h
Source/WebCore/ChangeLog
Source/WebCore/config.h
Source/WebCore/html/HTMLCanvasElement.cpp
Source/WebCore/platform/graphics/FloatPoint.h
Source/WebCore/platform/graphics/FloatRect.h
Source/WebCore/platform/graphics/Gradient.cpp
Source/WebCore/platform/graphics/Gradient.h
Source/WebCore/platform/graphics/GraphicsContext.cpp
Source/WebCore/platform/graphics/GraphicsContext.h
Source/WebCore/platform/graphics/ImageSource.h
Source/WebCore/platform/graphics/IntPoint.h
Source/WebCore/platform/graphics/IntRect.h
Source/WebCore/platform/graphics/Path.h
Source/WebCore/platform/graphics/Pattern.cpp
Source/WebCore/platform/graphics/Pattern.h
Source/WebCore/platform/graphics/chromium/ContentLayerChromium.cpp
Source/WebCore/platform/graphics/chromium/ContentLayerChromium.h
Source/WebCore/platform/graphics/chromium/GLES2Canvas.cpp
Source/WebCore/platform/graphics/chromium/ImageLayerChromium.cpp
Source/WebCore/platform/graphics/chromium/LayerChromium.cpp
Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp
Source/WebCore/platform/graphics/chromium/LayerRendererChromium.h
Source/WebCore/platform/graphics/chromium/LayerTilerChromium.cpp
Source/WebCore/platform/graphics/chromium/ShaderChromium.h
Source/WebCore/platform/graphics/gpu/LoopBlinnPathProcessor.cpp
Source/WebCore/platform/graphics/transforms/AffineTransform.h
Source/WebCore/platform/graphics/transforms/TransformationMatrix.h
Source/WebCore/platform/image-decoders/ImageDecoder.cpp
Source/WebCore/platform/image-decoders/ImageDecoder.h
Source/WebCore/rendering/svg/RenderSVGResourceSolidColor.cpp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp
Source/WebKit/chromium/src/GraphicsContext3DInternal.h
Source/WebKit/chromium/src/WebViewImpl.cpp

index cdaf36b..a6d396b 100644 (file)
@@ -1,5 +1,14 @@
 2011-02-24  Patrick Gansterer  <paroga@webkit.org>
 
+        Reviewed by Eric Seidel.
+
+        Rename PLATFORM(SKIA) to USE(SKIA)
+        https://bugs.webkit.org/show_bug.cgi?id=55090
+
+        * wtf/Platform.h:
+
+2011-02-24  Patrick Gansterer  <paroga@webkit.org>
+
         Reviewed by Alexey Proskuryakov.
 
         Remove pthreads dependecy for JSLock
index aa5d1ab..29a660a 100644 (file)
 #define WTF_PLATFORM_CA 1
 #endif
 
-/* PLATFORM(SKIA) for Win/Linux, CG/CI for Mac */
+/* USE(SKIA) for Win/Linux, CG for Mac */
 #if PLATFORM(CHROMIUM)
 #if OS(DARWIN)
 #define WTF_PLATFORM_CG 1
 #define WTF_USE_CORE_TEXT 1
 #define WTF_USE_ICCJPEG 1
 #else
-#define WTF_PLATFORM_SKIA 1
+#define WTF_USE_SKIA 1
 #define WTF_USE_CHROMIUM_NET 1
 #endif
 #endif
 
 #if PLATFORM(BREWMP)
-#define WTF_PLATFORM_SKIA 1
+#define WTF_USE_SKIA 1
 #endif
 
 #if PLATFORM(GTK)
index 81f5a77..495b346 100644 (file)
@@ -1,3 +1,40 @@
+2011-02-24  Patrick Gansterer  <paroga@webkit.org>
+
+        Reviewed by Eric Seidel.
+
+        Rename PLATFORM(SKIA) to USE(SKIA)
+        https://bugs.webkit.org/show_bug.cgi?id=55090
+
+        * config.h: Removed second define of PLATFORM(SKIA).
+        * html/HTMLCanvasElement.cpp:
+        * platform/graphics/FloatPoint.h:
+        * platform/graphics/FloatRect.h:
+        * platform/graphics/Gradient.cpp:
+        * platform/graphics/Gradient.h:
+        * platform/graphics/GraphicsContext.cpp:
+        * platform/graphics/GraphicsContext.h:
+        * platform/graphics/ImageSource.h:
+        * platform/graphics/IntPoint.h:
+        * platform/graphics/IntRect.h:
+        * platform/graphics/Path.h:
+        * platform/graphics/Pattern.cpp:
+        * platform/graphics/Pattern.h:
+        * platform/graphics/chromium/ContentLayerChromium.cpp:
+        * platform/graphics/chromium/ContentLayerChromium.h:
+        * platform/graphics/chromium/GLES2Canvas.cpp:
+        * platform/graphics/chromium/ImageLayerChromium.cpp:
+        * platform/graphics/chromium/LayerChromium.cpp:
+        * platform/graphics/chromium/LayerRendererChromium.cpp:
+        * platform/graphics/chromium/LayerRendererChromium.h:
+        * platform/graphics/chromium/LayerTilerChromium.cpp:
+        * platform/graphics/chromium/ShaderChromium.h:
+        * platform/graphics/gpu/LoopBlinnPathProcessor.cpp:
+        * platform/graphics/transforms/AffineTransform.h:
+        * platform/graphics/transforms/TransformationMatrix.h:
+        * platform/image-decoders/ImageDecoder.cpp:
+        * platform/image-decoders/ImageDecoder.h:
+        * rendering/svg/RenderSVGResourceSolidColor.cpp:
+
 2011-02-24  Pavel Feldman  <pfeldman@chromium.org>
 
         Reviewed by Yury Semikhatsky.
index 972d5e1..a00f1e5 100644 (file)
 
 #if PLATFORM(CHROMIUM)
 
-#if !OS(DARWIN)
-// Define SKIA on non-Mac.
-#define WTF_PLATFORM_SKIA 1
-#endif /* !OS(DARWIN) */
-
 // Chromium uses this file instead of JavaScriptCore/config.h to compile
 // JavaScriptCore/wtf (chromium doesn't compile the rest of JSC). Therefore,
 // this define is required.
index 09e8d04..79ebdad 100644 (file)
@@ -369,7 +369,7 @@ IntSize HTMLCanvasElement::convertToValidDeviceSize(float width, float height) c
     if (width < 1 || height < 1 || width * height > MaxCanvasArea)
         return IntSize();
 
-#if PLATFORM(SKIA)
+#if USE(SKIA)
     if (width > MaxSkiaDim || height > MaxSkiaDim)
         return IntSize();
 #endif
index 73a1bac..c4b2943 100644 (file)
@@ -54,7 +54,7 @@ QT_END_NAMESPACE
 class BPoint;
 #endif
 
-#if PLATFORM(SKIA)
+#if USE(SKIA)
 struct SkPoint;
 #endif
 
@@ -130,7 +130,7 @@ public:
     operator BPoint() const;
 #endif
 
-#if PLATFORM(SKIA)
+#if USE(SKIA)
     operator SkPoint() const;
     FloatPoint(const SkPoint&);
 #endif
index 733f7cc..bd23476 100644 (file)
@@ -55,7 +55,7 @@ class wxRect2DDouble;
 class BRect;
 #endif
 
-#if PLATFORM(SKIA)
+#if USE(SKIA)
 struct SkRect;
 #endif
 
@@ -163,7 +163,7 @@ public:
     operator BRect() const;
 #endif
 
-#if PLATFORM(SKIA)
+#if USE(SKIA)
     FloatRect(const SkRect&);
     operator SkRect() const;
 #endif
index 079dcd5..bb0c63c 100644 (file)
@@ -221,7 +221,7 @@ void Gradient::setGradientSpaceTransform(const AffineTransform& gradientSpaceTra
     setPlatformGradientSpaceTransform(gradientSpaceTransformation);
 }
 
-#if !PLATFORM(SKIA) && !PLATFORM(CAIRO)
+#if !USE(SKIA) && !PLATFORM(CAIRO)
 void Gradient::setPlatformGradientSpaceTransform(const AffineTransform&)
 {
 }
index e9c9c10..9a2c3fc 100644 (file)
@@ -57,7 +57,7 @@ typedef QGradient* PlatformGradient;
 #elif PLATFORM(CAIRO)
 typedef struct _cairo_pattern cairo_pattern_t;
 typedef cairo_pattern_t* PlatformGradient;
-#elif PLATFORM(SKIA)
+#elif USE(SKIA)
 class SkShader;
 typedef class SkShader* PlatformGradient;
 typedef class SkShader* PlatformPattern;
index 8026891..d753828 100644 (file)
@@ -656,7 +656,7 @@ CompositeOperator GraphicsContext::compositeOperation() const
     return m_state.compositeOperator;
 }
 
-#if !PLATFORM(SKIA)
+#if !USE(SKIA)
 void GraphicsContext::setPlatformFillGradient(Gradient*)
 {
 }
@@ -674,7 +674,7 @@ void GraphicsContext::setPlatformStrokePattern(Pattern*)
 }
 #endif
 
-#if !PLATFORM(CG) && !PLATFORM(SKIA)
+#if !PLATFORM(CG) && !USE(SKIA)
 // Implement this if you want to go ahead and push the drawing mode into your native context
 // immediately.
 void GraphicsContext::setPlatformTextDrawingMode(TextDrawingModeFlags mode)
@@ -682,7 +682,7 @@ void GraphicsContext::setPlatformTextDrawingMode(TextDrawingModeFlags mode)
 }
 #endif
 
-#if !PLATFORM(QT) && !PLATFORM(CAIRO) && !PLATFORM(SKIA) && !PLATFORM(HAIKU) && !PLATFORM(OPENVG)
+#if !PLATFORM(QT) && !PLATFORM(CAIRO) && !USE(SKIA) && !PLATFORM(HAIKU) && !PLATFORM(OPENVG)
 void GraphicsContext::setPlatformStrokeStyle(StrokeStyle)
 {
 }
@@ -694,7 +694,7 @@ void GraphicsContext::setPlatformShouldSmoothFonts(bool)
 }
 #endif
 
-#if !PLATFORM(SKIA)
+#if !USE(SKIA)
 void GraphicsContext::setSharedGraphicsContext3D(SharedGraphicsContext3D*, DrawingBuffer*, const IntSize&)
 {
 }
index 3657387..937da98 100644 (file)
@@ -74,7 +74,7 @@ class wxWindowDC;
 #else
     typedef wxWindowDC PlatformGraphicsContext;
 #endif
-#elif PLATFORM(SKIA)
+#elif USE(SKIA)
 namespace WebCore {
 class PlatformContextSkia;
 }
index dff803f..3fc4ae7 100644 (file)
@@ -46,7 +46,7 @@ QT_END_NAMESPACE
 #elif PLATFORM(CAIRO)
 struct _cairo_surface;
 typedef struct _cairo_surface cairo_surface_t;
-#elif PLATFORM(SKIA)
+#elif USE(SKIA)
 namespace WebCore {
 class NativeImageSkia;
 }
@@ -90,7 +90,7 @@ typedef wxBitmap* NativeImagePtr;
 #endif
 #elif PLATFORM(CAIRO)
 typedef cairo_surface_t* NativeImagePtr;
-#elif PLATFORM(SKIA)
+#elif USE(SKIA)
 typedef WebCore::NativeImageSkia* NativeImagePtr;
 #elif PLATFORM(HAIKU)
 typedef BBitmap* NativeImagePtr;
index cd5e4d4..d27906b 100644 (file)
@@ -68,7 +68,7 @@ class wxPoint;
 typedef struct _point AEEPoint;
 #endif
 
-#if PLATFORM(SKIA)
+#if USE(SKIA)
 struct SkPoint;
 struct SkIPoint;
 #endif
@@ -153,7 +153,7 @@ public:
     operator AEEPoint() const;
 #endif
 
-#if PLATFORM(SKIA)
+#if USE(SKIA)
     IntPoint(const SkIPoint&);
     operator SkIPoint() const;
     operator SkPoint() const;
index 3a2433d..c413e7a 100644 (file)
@@ -64,7 +64,7 @@ typedef struct _Eina_Rectangle Eina_Rectangle;
 class wxRect;
 #endif
 
-#if PLATFORM(SKIA)
+#if USE(SKIA)
 struct SkRect;
 struct SkIRect;
 #endif
@@ -186,7 +186,7 @@ public:
     operator CGRect() const;
 #endif
 
-#if PLATFORM(SKIA)
+#if USE(SKIA)
     IntRect(const SkIRect&);
     operator SkRect() const;
     operator SkIRect() const;
index 852d88e..31f2cd6 100644 (file)
@@ -49,7 +49,7 @@ namespace WebCore {
 class CairoPath;
 }
 typedef WebCore::CairoPath PlatformPath;
-#elif PLATFORM(SKIA)
+#elif USE(SKIA)
 class SkPath;
 typedef SkPath PlatformPath;
 #elif PLATFORM(HAIKU)
index 82d0a24..c2c3de0 100644 (file)
@@ -35,7 +35,7 @@ Pattern::Pattern(PassRefPtr<Image> image, bool repeatX, bool repeatY)
     : m_tileImage(image)
     , m_repeatX(repeatX)
     , m_repeatY(repeatY)
-#if PLATFORM(SKIA)
+#if USE(SKIA)
     , m_pattern(0)
 #endif
 {
@@ -53,7 +53,7 @@ void Pattern::setPatternSpaceTransform(const AffineTransform& patternSpaceTransf
     setPlatformPatternSpaceTransform();
 }
 
-#if !PLATFORM(SKIA)
+#if !USE(SKIA)
 void Pattern::platformDestroy()
 {
 }
index e215f3d..c88f2fb 100644 (file)
@@ -41,7 +41,7 @@ typedef CGPatternRef PlatformPatternPtr;
 #elif PLATFORM(CAIRO)
 #include <cairo.h>
 typedef cairo_pattern_t* PlatformPatternPtr;
-#elif PLATFORM(SKIA)
+#elif USE(SKIA)
 class SkShader;
 typedef SkShader* PlatformPatternPtr;
 #elif PLATFORM(QT)
@@ -79,7 +79,7 @@ public:
     void platformDestroy();
 
     // Pattern space is an abstract space that maps to the default user space by the transformation 'userSpaceTransformation' 
-#if PLATFORM(SKIA)
+#if USE(SKIA)
     PlatformPatternPtr platformPattern(const AffineTransform& userSpaceTransformation);
 #else
     PlatformPatternPtr createPlatformPattern(const AffineTransform& userSpaceTransformation) const;
index 920f780..f7cb591 100644 (file)
@@ -39,7 +39,7 @@
 #include "LayerTexture.h"
 #include "RenderLayerBacking.h"
 
-#if PLATFORM(SKIA)
+#if USE(SKIA)
 #include "NativeImageSkia.h"
 #include "PlatformContextSkia.h"
 #include "SkColorPriv.h"
@@ -174,7 +174,7 @@ void ContentLayerChromium::updateContentsIfDirty()
     if (dirtyRect.isEmpty())
         return;
 
-#if PLATFORM(SKIA)
+#if USE(SKIA)
     OwnPtr<PlatformContextSkia> skiaContext;
 
     skiaContext.set(new PlatformContextSkia(m_uploadPixelCanvas.get()));
@@ -220,7 +220,7 @@ void ContentLayerChromium::resizeUploadBufferForImage(const IntSize& size)
 }
 void ContentLayerChromium::resizeUploadBuffer(const IntSize& size)
 {
-#if PLATFORM(SKIA)
+#if USE(SKIA)
     m_uploadPixelCanvas = new skia::PlatformCanvas(size.width(), size.height(), false);
     m_uploadBufferSize = size;
 #else
@@ -228,7 +228,7 @@ void ContentLayerChromium::resizeUploadBuffer(const IntSize& size)
 #endif
 }
 
-#if PLATFORM(SKIA)
+#if USE(SKIA)
 class SkBitmapConditionalAutoLockerPixels {
     WTF_MAKE_NONCOPYABLE(SkBitmapConditionalAutoLockerPixels);
 public:
@@ -257,11 +257,11 @@ private:
 void ContentLayerChromium::updateTextureIfNeeded()
 {
     uint8_t* pixels = 0;
-#if PLATFORM(SKIA)
+#if USE(SKIA)
     SkBitmapConditionalAutoLockerPixels locker;
 #endif
     if (!m_uploadUpdateRect.isEmpty()) {
-#if PLATFORM(SKIA)
+#if USE(SKIA)
         if (m_uploadPixelCanvas) {
             const SkBitmap& bitmap = m_uploadPixelCanvas->getDevice()->accessBitmap(false);
             locker.lockPixels(&bitmap);
index e192091..df498ce 100644 (file)
@@ -76,7 +76,7 @@ protected:
     // On platforms using Skia, we use the skia::PlatformCanvas for content layers
     // and the m_uploadPixelData buffer for image layers.
     // FIXME: We should be using memory we control for all uploads.
-#if PLATFORM(SKIA)
+#if USE(SKIA)
     OwnPtr<skia::PlatformCanvas> m_uploadPixelCanvas;
 #endif
     OwnPtr<Vector<uint8_t> > m_uploadPixelData;
index 0b0a280..2ff6b8b 100644 (file)
@@ -43,7 +43,7 @@
 #include "Path.h"
 #include "PlatformString.h"
 #include "SharedGraphicsContext3D.h"
-#if PLATFORM(SKIA)
+#if USE(SKIA)
 #include "SkPath.h"
 #endif
 #include "Texture.h"
@@ -404,9 +404,9 @@ Texture* GLES2Canvas::getTexture(NativeImagePtr ptr)
     return m_context->getTexture(ptr);
 }
 
-#if PLATFORM(SKIA)
+#if USE(SKIA)
 // This is actually cross-platform code, but since its only caller is inside a
-// PLATFORM(SKIA), it will cause a warning-as-error on Chrome/Mac.
+// USE(SKIA), it will cause a warning-as-error on Chrome/Mac.
 static void interpolateQuadratic(DoubleVector* vertices, const FloatPoint& p0, const FloatPoint& p1, const FloatPoint& p2)
 {
     float tIncrement = 1.0f / pathTesselation, t = tIncrement;
@@ -481,7 +481,7 @@ void GLES2Canvas::createVertexBufferFromPath(const Path& path, int* count, unsig
     checkGLError("createVertexBufferFromPath, createBuffer");
     DoubleVector inVertices;
     WTF::Vector<size_t> contours;
-#if PLATFORM(SKIA)
+#if USE(SKIA)
     const SkPath* skPath = path.platformPath();
     SkPoint pts[4];
     SkPath::Iter iter(*skPath, true);
index d88ee60..c2a891b 100644 (file)
@@ -38,7 +38,7 @@
 #include "LayerRendererChromium.h"
 #include "LayerTexture.h"
 
-#if PLATFORM(SKIA)
+#if USE(SKIA)
 #include "NativeImageSkia.h"
 #include "PlatformContextSkia.h"
 #endif
@@ -86,7 +86,7 @@ void ImageLayerChromium::updateContentsIfDirty()
 
     NativeImagePtr nativeImage = m_contents->nativeImageForCurrentFrame();
 
-#if PLATFORM(SKIA)
+#if USE(SKIA)
     // The layer contains an Image.
     NativeImageSkia* skiaImage = static_cast<NativeImageSkia*>(nativeImage);
     const SkBitmap* skiaBitmap = skiaImage;
@@ -103,7 +103,7 @@ void ImageLayerChromium::updateContentsIfDirty()
         resizeUploadBufferForImage(bitmapSize);
     m_uploadUpdateRect = IntRect(IntPoint(0, 0), bitmapSize);
 
-#if PLATFORM(SKIA)
+#if USE(SKIA)
     SkAutoLockPixels lock(*skiaBitmap);
     // FIXME: do we need to support more image configurations?
     ASSERT(skiaBitmap->config()== SkBitmap::kARGB_8888_Config);
index 6e03e64..451ec99 100644 (file)
@@ -36,7 +36,7 @@
 
 #include "GraphicsContext3D.h"
 #include "LayerRendererChromium.h"
-#if PLATFORM(SKIA)
+#if USE(SKIA)
 #include "NativeImageSkia.h"
 #include "PlatformContextSkia.h"
 #endif
index efe3548..5d3354a 100644 (file)
@@ -42,7 +42,7 @@
 #include "NotImplemented.h"
 #include "TextureManager.h"
 #include "WebGLLayerChromium.h"
-#if PLATFORM(SKIA)
+#if USE(SKIA)
 #include "NativeImageSkia.h"
 #include "PlatformContextSkia.h"
 #elif PLATFORM(CG)
index 1c20393..438caab 100644 (file)
@@ -172,7 +172,7 @@ private:
     unsigned m_offscreenFramebufferId;
     bool m_compositeOffscreen;
 
-#if PLATFORM(SKIA)
+#if USE(SKIA)
     OwnPtr<skia::PlatformCanvas> m_rootLayerCanvas;
     OwnPtr<PlatformContextSkia> m_rootLayerSkiaContext;
     OwnPtr<GraphicsContext> m_rootLayerGraphicsContext;
index d4e8391..d0ff543 100644 (file)
@@ -35,7 +35,7 @@
 #include "LayerRendererChromium.h"
 #include "LayerTexture.h"
 
-#if PLATFORM(SKIA)
+#if USE(SKIA)
 #include "NativeImageSkia.h"
 #include "PlatformContextSkia.h"
 #elif PLATFORM(CG)
@@ -271,7 +271,7 @@ void LayerTilerChromium::update(TilePaintInterface& painter, const IntRect& cont
 
     const IntRect paintRect = layerRectToContentRect(dirtyLayerRect);
     GraphicsContext3D* context = layerRendererContext();
-#if PLATFORM(SKIA)
+#if USE(SKIA)
     OwnPtr<skia::PlatformCanvas> canvas(new skia::PlatformCanvas(paintRect.width(), paintRect.height(), false));
     OwnPtr<PlatformContextSkia> skiaContext(new PlatformContextSkia(canvas.get()));
     OwnPtr<GraphicsContext> graphicsContext(new GraphicsContext(reinterpret_cast<PlatformGraphicsContext*>(skiaContext.get())));
index 40c3392..460b02b 100644 (file)
@@ -136,7 +136,7 @@ private:
     int m_alphaLocation;
 };
 
-#if PLATFORM(SKIA) && SK_B32_SHIFT
+#if USE(SKIA) && SK_B32_SHIFT
 typedef FragmentShaderRGBATexAlpha FragmentShaderTexAlpha;
 #else
 typedef FragmentShaderBGRATexAlpha FragmentShaderTexAlpha;
index e84ddbf..5439885 100644 (file)
@@ -43,7 +43,7 @@
 #include <wtf/Assertions.h>
 #include <wtf/FastMalloc.h>
 
-#if PLATFORM(SKIA)
+#if USE(SKIA)
 #include "SkGeometry.h"
 #include "SkPath.h"
 #include "SkScalar.h"
@@ -612,7 +612,7 @@ void LoopBlinnPathProcessor::buildContours(const Path& path)
 {
     // Clear out the contours
     m_contours.clear();
-#if PLATFORM(SKIA)
+#if USE(SKIA)
     SkPath::Iter iter(*path.platformPath(), false);
     SkPoint points[4];
     SkPath::Verb verb;
@@ -700,7 +700,7 @@ void LoopBlinnPathProcessor::buildContours(const Path& path)
             break;
         }
     } while (verb != SkPath::kDone_Verb);
-#else // !PLATFORM(SKIA)
+#else // !USE(SKIA)
     // Must port to your platform.
     ASSERT_NOT_REACHED();
 #endif
index 3e3995f..14431aa 100644 (file)
@@ -40,7 +40,7 @@
 #include "VGUtils.h"
 #elif PLATFORM(QT)
 #include <QTransform>
-#elif PLATFORM(SKIA)
+#elif USE(SKIA)
 #include <SkMatrix.h>
 #elif PLATFORM(WX) && USE(WXGC)
 #include <wx/graphics.h>
@@ -165,7 +165,7 @@ public:
     operator VGMatrix() const;
 #elif PLATFORM(QT)
     operator QTransform() const;
-#elif PLATFORM(SKIA)
+#elif USE(SKIA)
     operator SkMatrix() const;
 #elif PLATFORM(WX) && USE(WXGC)
     operator wxGraphicsMatrix() const;
index fa27c0e..f0c2671 100644 (file)
@@ -42,7 +42,7 @@
 #include "VGUtils.h"
 #elif PLATFORM(QT)
 #include <QTransform>
-#elif PLATFORM(SKIA)
+#elif USE(SKIA)
 #include <SkMatrix.h>
 #elif PLATFORM(WX) && USE(WXGC)
 #include <wx/graphics.h>
@@ -321,7 +321,7 @@ public:
     operator VGMatrix() const;
 #elif PLATFORM(QT)
     operator QTransform() const;
-#elif PLATFORM(SKIA)
+#elif USE(SKIA)
     operator SkMatrix() const;
 #elif PLATFORM(WX) && USE(WXGC)
     operator wxGraphicsMatrix() const;
index aa9cc3e..22e7a4f 100644 (file)
@@ -125,7 +125,7 @@ ImageDecoder* ImageDecoder::create(const SharedBuffer& data, ImageSource::AlphaO
     return 0;
 }
 
-#if !PLATFORM(SKIA)
+#if !USE(SKIA)
 
 ImageFrame::ImageFrame()
     : m_hasAlpha(false)
index 71493ad..95cf87b 100644 (file)
@@ -37,7 +37,7 @@
 #include <wtf/RefPtr.h>
 #include <wtf/Vector.h>
 
-#if PLATFORM(SKIA)
+#if USE(SKIA)
 #include "NativeImageSkia.h"
 #include "SkColorPriv.h"
 #elif PLATFORM(QT)
@@ -65,7 +65,7 @@ namespace WebCore {
             DisposeOverwritePrevious, // Clear frame to previous framebuffer
                                       // contents
         };
-#if PLATFORM(SKIA) || PLATFORM(QT)
+#if USE(SKIA) || PLATFORM(QT)
         typedef uint32_t PixelData;
 #else
         typedef unsigned PixelData;
@@ -153,7 +153,7 @@ namespace WebCore {
 
         inline PixelData* getAddr(int x, int y)
         {
-#if PLATFORM(SKIA)
+#if USE(SKIA)
             return m_bitmap.getAddr32(x, y);
 #elif PLATFORM(QT)
             m_image = m_pixmap.toImage();
@@ -175,7 +175,7 @@ namespace WebCore {
                     g = static_cast<unsigned>(g * alphaPercent);
                     b = static_cast<unsigned>(b * alphaPercent);
                 }
-#if PLATFORM(SKIA)
+#if USE(SKIA)
                 // we are sure to call the NoCheck version, since we may
                 // deliberately pass non-premultiplied values, and we don't want
                 // an assert.
@@ -186,7 +186,7 @@ namespace WebCore {
             }
         }
 
-#if PLATFORM(SKIA)
+#if USE(SKIA)
         NativeImageSkia m_bitmap;
 #elif PLATFORM(QT)
         mutable QPixmap m_pixmap;
index 9f6c063..5be2af6 100644 (file)
@@ -26,7 +26,7 @@
 #include "RenderStyle.h"
 #include "SVGRenderSupport.h"
 
-#if PLATFORM(SKIA)
+#if USE(SKIA)
 #include "PlatformContextSkia.h"
 #endif
 
index f6aac94..910bcb3 100644 (file)
@@ -1,3 +1,17 @@
+2011-02-24  Patrick Gansterer  <paroga@webkit.org>
+
+        Reviewed by Eric Seidel.
+
+        Rename PLATFORM(SKIA) to USE(SKIA)
+        https://bugs.webkit.org/show_bug.cgi?id=55090
+
+        * src/GraphicsContext3DChromium.cpp:
+        (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal):
+        (WebCore::GraphicsContext3DInternal::paintRenderingResultsToCanvas):
+        * src/GraphicsContext3DInternal.h:
+        * src/WebViewImpl.cpp:
+        (WebKit::WebViewImpl::doPixelReadbackToCanvas):
+
 2011-02-24  Vsevolod Vlasov  <vsevik@chromium.org>
 
         Reviewed by Alexey Proskuryakov.
index 0751785..3d937ac 100644 (file)
@@ -82,7 +82,7 @@ namespace WebCore {
 GraphicsContext3DInternal::GraphicsContext3DInternal()
     : m_webViewImpl(0)
     , m_initializedAvailableExtensions(false)
-#if PLATFORM(SKIA)
+#if USE(SKIA)
 #elif PLATFORM(CG)
     , m_renderOutput(0)
 #else
@@ -165,7 +165,7 @@ void GraphicsContext3DInternal::paintRenderingResultsToCanvas(CanvasRenderingCon
     HTMLCanvasElement* canvas = context->canvas();
     ImageBuffer* imageBuffer = canvas->buffer();
     unsigned char* pixels = 0;
-#if PLATFORM(SKIA)
+#if USE(SKIA)
     const SkBitmap* canvasBitmap = imageBuffer->context()->platformContext()->bitmap();
     const SkBitmap* readbackBitmap = 0;
     ASSERT(canvasBitmap->config() == SkBitmap::kARGB_8888_Config);
@@ -200,7 +200,7 @@ void GraphicsContext3DInternal::paintRenderingResultsToCanvas(CanvasRenderingCon
 
     m_impl->readBackFramebuffer(pixels, 4 * m_impl->width() * m_impl->height());
 
-#if PLATFORM(SKIA)
+#if USE(SKIA)
     if (m_resizingBitmap.readyToDraw()) {
         // We need to draw the resizing bitmap into the canvas's backing store.
         SkCanvas canvas(*canvasBitmap);
index be9ce16..c8f7c7a 100644 (file)
@@ -29,7 +29,7 @@
 #include "GraphicsContext3D.h"
 #include <wtf/HashSet.h>
 #include <wtf/OwnPtr.h>
-#if PLATFORM(SKIA)
+#if USE(SKIA)
 #include "SkBitmap.h"
 #endif
 
@@ -276,7 +276,7 @@ private:
 #if USE(ACCELERATED_COMPOSITING)
     RefPtr<WebGLLayerChromium> m_compositingLayer;
 #endif
-#if PLATFORM(SKIA)
+#if USE(SKIA)
     // If the width and height of the Canvas's backing store don't
     // match those that we were given in the most recent call to
     // reshape(), then we need an intermediate bitmap to read back the
index 237ce00..cccd18f 100644 (file)
@@ -1017,7 +1017,7 @@ void WebViewImpl::doPixelReadbackToCanvas(WebCanvas* canvas, const IntRect& rect
     ASSERT(rect.maxX() <= m_layerRenderer->rootLayerTextureSize().width()
            && rect.maxY() <= m_layerRenderer->rootLayerTextureSize().height());
 
-#if PLATFORM(SKIA)
+#if USE(SKIA)
     PlatformContextSkia context(canvas);
 
     // PlatformGraphicsContext is actually a pointer to PlatformContextSkia