Title: [116689] trunk/Source
Revision
116689
Author
[email protected]
Date
2012-05-10 14:44:03 -0700 (Thu, 10 May 2012)

Log Message

[Chromium] Remove WEBKIT_USING_SKIA ifdefs that are always true
https://bugs.webkit.org/show_bug.cgi?id=86121

Reviewed by Adam Barth.

Chromium always uses Skia now, so this just removes the barriers
around code that was previously #if'd.

Source/Platform:

* chromium/public/WebCanvas.h:
(WebKit):
* chromium/public/WebGraphicsContext3D.h:
(WebGraphicsContext3D):
(WebKit::WebGraphicsContext3D::onCreateGrGLInterface):
* chromium/public/WebImage.h:
(WebImage):

Source/WebKit/chromium:

* README:
* src/DragClientImpl.cpp:
(WebKit::DragClientImpl::startDrag):
* src/PageOverlay.cpp:
* src/PlatformSupport.cpp:
(WebCore::PlatformSupport::clipboardWriteImage):
(WebCore::PlatformSupport::paintScrollbarThumb):
* src/WebContentLayerImpl.cpp:
(WebKit::WebContentLayerImpl::paintContents):
* src/WebFontImpl.cpp:
(WebKit::WebFontImpl::drawText):
* src/WebFrameImpl.cpp:
(WebKit::WebFrameImpl::printPage):
(WebKit::WebFrameImpl::printPagesWithBoundaries):
* src/WebGraphicsContext3D.cpp:
(WebKit::WebGraphicsContext3D::createGrGLInterface):
* src/WebImageDecoder.cpp:
(WebKit::WebImageDecoder::getFrameAtIndex):
* src/WebPluginContainerImpl.cpp:
(WebKit::WebPluginContainerImpl::paint):
(WebKit::WebPluginContainerImpl::printPage):
* src/painting/GraphicsContextBuilder.h:
(WebKit):

Modified Paths

Diff

Modified: trunk/Source/Platform/ChangeLog (116688 => 116689)


--- trunk/Source/Platform/ChangeLog	2012-05-10 21:37:46 UTC (rev 116688)
+++ trunk/Source/Platform/ChangeLog	2012-05-10 21:44:03 UTC (rev 116689)
@@ -1,5 +1,23 @@
 2012-05-10  Mark Pilgrim  <[email protected]>
 
+        [Chromium] Remove WEBKIT_USING_SKIA ifdefs that are always true
+        https://bugs.webkit.org/show_bug.cgi?id=86121
+
+        Reviewed by Adam Barth.
+
+        Chromium always uses Skia now, so this just removes the barriers
+        around code that was previously #if'd.
+
+        * chromium/public/WebCanvas.h:
+        (WebKit):
+        * chromium/public/WebGraphicsContext3D.h:
+        (WebGraphicsContext3D):
+        (WebKit::WebGraphicsContext3D::onCreateGrGLInterface):
+        * chromium/public/WebImage.h:
+        (WebImage):
+
+2012-05-10  Mark Pilgrim  <[email protected]>
+
         [Chromium] Remove dead code behind unused WEBKIT_USING_CG
         https://bugs.webkit.org/show_bug.cgi?id=86018
 

Modified: trunk/Source/Platform/chromium/public/WebCanvas.h (116688 => 116689)


--- trunk/Source/Platform/chromium/public/WebCanvas.h	2012-05-10 21:37:46 UTC (rev 116688)
+++ trunk/Source/Platform/chromium/public/WebCanvas.h	2012-05-10 21:44:03 UTC (rev 116689)
@@ -33,17 +33,11 @@
 
 #include "WebCommon.h"
 
-#if WEBKIT_USING_SKIA
 class SkCanvas;
-#endif
 
 namespace WebKit {
 
-#if WEBKIT_USING_SKIA
 typedef SkCanvas WebCanvas;
-#else
-#error "Need to define WebCanvas"
-#endif
 
 } // namespace WebKit
 

Modified: trunk/Source/Platform/chromium/public/WebGraphicsContext3D.h (116688 => 116689)


--- trunk/Source/Platform/chromium/public/WebGraphicsContext3D.h	2012-05-10 21:37:46 UTC (rev 116688)
+++ trunk/Source/Platform/chromium/public/WebGraphicsContext3D.h	2012-05-10 21:44:03 UTC (rev 116689)
@@ -38,9 +38,7 @@
 
 #define USE_WGC3D_TYPES
 
-#if WEBKIT_USING_SKIA
 struct GrGLInterface;
-#endif
 
 namespace WebKit {
 
@@ -413,14 +411,10 @@
     virtual void getQueryivEXT(WGC3Denum target, WGC3Denum pname, WGC3Dint* params) { }
     virtual void getQueryObjectuivEXT(WebGLId query, WGC3Denum pname, WGC3Duint* params) { }
 
-#if WEBKIT_USING_SKIA
     GrGLInterface* createGrGLInterface();
-#endif
 
 protected:
-#if WEBKIT_USING_SKIA
     virtual GrGLInterface* onCreateGrGLInterface() { return 0; }
-#endif
 
 };
 

Modified: trunk/Source/Platform/chromium/public/WebImage.h (116688 => 116689)


--- trunk/Source/Platform/chromium/public/WebImage.h	2012-05-10 21:37:46 UTC (rev 116688)
+++ trunk/Source/Platform/chromium/public/WebImage.h	2012-05-10 21:44:03 UTC (rev 116689)
@@ -33,9 +33,7 @@
 
 #include "WebCommon.h"
 
-#if WEBKIT_USING_SKIA
 #include <SkBitmap.h>
-#endif
 
 #if WEBKIT_IMPLEMENTATION
 namespace WebCore { class Image; }
@@ -81,7 +79,6 @@
     WebImage& operator=(const WTF::PassRefPtr<WebCore::Image>&);
 #endif
 
-#if WEBKIT_USING_SKIA
     WebImage(const SkBitmap& bitmap) : m_bitmap(bitmap) { }
 
     WebImage& operator=(const SkBitmap& bitmap)
@@ -97,7 +94,6 @@
     void init() { }
     SkBitmap m_bitmap;
 
-#endif
 };
 
 } // namespace WebKit

Modified: trunk/Source/WebKit/chromium/ChangeLog (116688 => 116689)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-05-10 21:37:46 UTC (rev 116688)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-05-10 21:44:03 UTC (rev 116689)
@@ -1,3 +1,37 @@
+2012-05-10  Mark Pilgrim  <[email protected]>
+
+        [Chromium] Remove WEBKIT_USING_SKIA ifdefs that are always true
+        https://bugs.webkit.org/show_bug.cgi?id=86121
+
+        Reviewed by Adam Barth.
+
+        Chromium always uses Skia now, so this just removes the barriers
+        around code that was previously #if'd.
+
+        * README:
+        * src/DragClientImpl.cpp:
+        (WebKit::DragClientImpl::startDrag):
+        * src/PageOverlay.cpp:
+        * src/PlatformSupport.cpp:
+        (WebCore::PlatformSupport::clipboardWriteImage):
+        (WebCore::PlatformSupport::paintScrollbarThumb):
+        * src/WebContentLayerImpl.cpp:
+        (WebKit::WebContentLayerImpl::paintContents):
+        * src/WebFontImpl.cpp:
+        (WebKit::WebFontImpl::drawText):
+        * src/WebFrameImpl.cpp:
+        (WebKit::WebFrameImpl::printPage):
+        (WebKit::WebFrameImpl::printPagesWithBoundaries):
+        * src/WebGraphicsContext3D.cpp:
+        (WebKit::WebGraphicsContext3D::createGrGLInterface):
+        * src/WebImageDecoder.cpp:
+        (WebKit::WebImageDecoder::getFrameAtIndex):
+        * src/WebPluginContainerImpl.cpp:
+        (WebKit::WebPluginContainerImpl::paint):
+        (WebKit::WebPluginContainerImpl::printPage):
+        * src/painting/GraphicsContextBuilder.h:
+        (WebKit):
+
 2012-05-10  Tom Sepez  <[email protected]>
 
         [Chromium] WebFrameTest.ChromePageNoJavascript isn't catching regressions

Modified: trunk/Source/WebKit/chromium/README (116688 => 116689)


--- trunk/Source/WebKit/chromium/README	2012-05-10 21:37:46 UTC (rev 116688)
+++ trunk/Source/WebKit/chromium/README	2012-05-10 21:44:03 UTC (rev 116689)
@@ -35,8 +35,6 @@
   called by a public inline-defined method should be annotated with
   WEBKIT_EXPORT.  WEBKIT_EXPORT is not used to export whole classes.
 
-  WEBKIT_USING_SKIA is defined when using Skia as the graphics library.
-
   WEBKIT_USING_V8 is defined when using V8 as the _javascript_ library.
 
   WEBKIT_USING_JSC is defined when using JSC as the _javascript_ library.

Modified: trunk/Source/WebKit/chromium/src/DragClientImpl.cpp (116688 => 116689)


--- trunk/Source/WebKit/chromium/src/DragClientImpl.cpp	2012-05-10 21:37:46 UTC (rev 116688)
+++ trunk/Source/WebKit/chromium/src/DragClientImpl.cpp	2012-05-10 21:44:03 UTC (rev 116689)
@@ -89,11 +89,7 @@
     WebPoint offsetPoint(offsetSize.width(), offsetSize.height());
     m_webView->startDragging(
         dragData, static_cast<WebDragOperationsMask>(dragOperationMask),
-#if WEBKIT_USING_SKIA
         dragImage ? WebImage(*dragImage) : WebImage(),
-#else
-        dragImage ? WebImage(dragImage) : WebImage(),
-#endif
         offsetPoint);
 }
 

Modified: trunk/Source/WebKit/chromium/src/PageOverlay.cpp (116688 => 116689)


--- trunk/Source/WebKit/chromium/src/PageOverlay.cpp	2012-05-10 21:37:46 UTC (rev 116688)
+++ trunk/Source/WebKit/chromium/src/PageOverlay.cpp	2012-05-10 21:44:03 UTC (rev 116689)
@@ -46,9 +46,7 @@
 
 WebCanvas* ToWebCanvas(GraphicsContext* gc)
 {
-#if WEBKIT_USING_SKIA
     return gc->platformContext()->canvas();
-#endif
 }
 
 } // namespace

Modified: trunk/Source/WebKit/chromium/src/PlatformSupport.cpp (116688 => 116689)


--- trunk/Source/WebKit/chromium/src/PlatformSupport.cpp	2012-05-10 21:37:46 UTC (rev 116688)
+++ trunk/Source/WebKit/chromium/src/PlatformSupport.cpp	2012-05-10 21:44:03 UTC (rev 116689)
@@ -80,9 +80,7 @@
 #include "platform/android/WebThemeEngine.h"
 #endif
 
-#if WEBKIT_USING_SKIA
 #include "NativeImageSkia.h"
-#endif
 
 #include "AsyncFileSystemChromium.h"
 #include "BitmapImage.h"
@@ -224,11 +222,7 @@
                                          const KURL& sourceURL,
                                          const String& title)
 {
-#if WEBKIT_USING_SKIA
     WebImage webImage(image->bitmap());
-#else
-    WebImage webImage(image);
-#endif
     webKitPlatformSupport()->clipboard()->writeImage(webImage, sourceURL, title);
 }
 
@@ -672,11 +666,7 @@
     webThemeScrollbarInfo.visibleSize = scrollbarInfo.visibleSize;
     webThemeScrollbarInfo.totalSize = scrollbarInfo.totalSize;
 
-#if WEBKIT_USING_SKIA
     WebKit::WebCanvas* webCanvas = gc->platformContext()->canvas();
-#else
-    WebKit::WebCanvas* webCanvas = gc->platformContext();
-#endif
     webKitPlatformSupport()->themeEngine()->paintScrollbarThumb(
         webCanvas,
         static_cast<WebThemeEngine::State>(state),

Modified: trunk/Source/WebKit/chromium/src/WebContentLayerImpl.cpp (116688 => 116689)


--- trunk/Source/WebKit/chromium/src/WebContentLayerImpl.cpp	2012-05-10 21:37:46 UTC (rev 116688)
+++ trunk/Source/WebKit/chromium/src/WebContentLayerImpl.cpp	2012-05-10 21:44:03 UTC (rev 116689)
@@ -30,9 +30,7 @@
 #include "platform/WebRect.h"
 #include "GraphicsContext.h"
 #include "platform/WebCanvas.h"
-#if WEBKIT_USING_SKIA
 #include "PlatformContextSkia.h"
-#endif
 
 using namespace WebCore;
 
@@ -64,9 +62,7 @@
 {
     if (!m_contentClient)
         return;
-#if WEBKIT_USING_SKIA
     WebCanvas* canvas = gc.platformContext()->canvas();
-#endif
     m_contentClient->paintContents(canvas, WebRect(clip));
 }
 

Modified: trunk/Source/WebKit/chromium/src/WebFontImpl.cpp (116688 => 116689)


--- trunk/Source/WebKit/chromium/src/WebFontImpl.cpp	2012-05-10 21:37:46 UTC (rev 116688)
+++ trunk/Source/WebKit/chromium/src/WebFontImpl.cpp	2012-05-10 21:44:03 UTC (rev 116689)
@@ -99,9 +99,7 @@
     GraphicsContextBuilder builder(canvas);
     GraphicsContext& gc = builder.context();
 
-#if WEBKIT_USING_SKIA
     gc.platformContext()->setDrawingToImageBuffer(!canvasIsOpaque);
-#endif
 
     gc.save();
     gc.setFillColor(color, ColorSpaceDeviceRGB);

Modified: trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp (116688 => 116689)


--- trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp	2012-05-10 21:37:46 UTC (rev 116688)
+++ trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp	2012-05-10 21:44:03 UTC (rev 116689)
@@ -1493,9 +1493,7 @@
 
     GraphicsContextBuilder builder(canvas);
     GraphicsContext& gc = builder.context();
-#if WEBKIT_USING_SKIA
     gc.platformContext()->setPrinting(true);
-#endif
 
     return m_printContext->spoolPage(gc, page);
 }
@@ -1971,9 +1969,7 @@
 
     GraphicsContextBuilder builder(canvas);
     GraphicsContext& graphicsContext = builder.context();
-#if WEBKIT_USING_SKIA
     graphicsContext.platformContext()->setPrinting(true);
-#endif
 
     m_printContext->spoolAllPagesWithBoundaries(graphicsContext,
         FloatSize(pageSizeInPixels.width, pageSizeInPixels.height));

Modified: trunk/Source/WebKit/chromium/src/WebGraphicsContext3D.cpp (116688 => 116689)


--- trunk/Source/WebKit/chromium/src/WebGraphicsContext3D.cpp	2012-05-10 21:37:46 UTC (rev 116688)
+++ trunk/Source/WebKit/chromium/src/WebGraphicsContext3D.cpp	2012-05-10 21:44:03 UTC (rev 116689)
@@ -30,8 +30,6 @@
 
 namespace WebKit {
 
-#if WEBKIT_USING_SKIA
-
 namespace {
     void bindWebGraphicsContext3DGLContextCallback(const GrGLInterface* interface)
     {
@@ -49,6 +47,4 @@
     return interface;
 }
 
-#endif
-
 } // namespace WebKit

Modified: trunk/Source/WebKit/chromium/src/WebImageDecoder.cpp (116688 => 116689)


--- trunk/Source/WebKit/chromium/src/WebImageDecoder.cpp	2012-05-10 21:37:46 UTC (rev 116688)
+++ trunk/Source/WebKit/chromium/src/WebImageDecoder.cpp	2012-05-10 21:44:03 UTC (rev 116689)
@@ -39,10 +39,8 @@
 
 #include <public/WebImage.h>
 
-#if WEBKIT_USING_SKIA
 #include <wtf/OwnPtr.h>
 #include <wtf/PassOwnPtr.h>
-#endif
 
 #include <wtf/PassRefPtr.h>
 
@@ -112,10 +110,8 @@
     ImageFrame* const frameBuffer = m_private->frameBufferAtIndex(index);
     if (!frameBuffer)
         return WebImage();
-#if WEBKIT_USING_SKIA
     OwnPtr<NativeImageSkia> image = adoptPtr(frameBuffer->asNewNativeImage());
     return WebImage(image->bitmap());
-#endif
 }
 
 } // namespace WebKit

Modified: trunk/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp (116688 => 116689)


--- trunk/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp	2012-05-10 21:37:46 UTC (rev 116688)
+++ trunk/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp	2012-05-10 21:44:03 UTC (rev 116689)
@@ -80,9 +80,7 @@
 #include "PlatformGestureEvent.h"
 #endif
 
-#if WEBKIT_USING_SKIA
 #include "PlatformContextSkia.h"
-#endif
 
 using namespace WebCore;
 
@@ -126,9 +124,7 @@
     IntPoint origin = view->windowToContents(IntPoint(0, 0));
     gc->translate(static_cast<float>(origin.x()), static_cast<float>(origin.y()));
 
-#if WEBKIT_USING_SKIA
     WebCanvas* canvas = gc->platformContext()->canvas();
-#endif
 
     IntRect windowRect =
         IntRect(view->contentsToWindow(damageRect.location()), damageRect.size());
@@ -257,9 +253,7 @@
                                        WebCore::GraphicsContext* gc)
 {
     gc->save();
-#if WEBKIT_USING_SKIA
     WebCanvas* canvas = gc->platformContext()->canvas();
-#endif
     bool ret = m_webPlugin->printPage(pageNumber, canvas);
     gc->restore();
     return ret;

Modified: trunk/Source/WebKit/chromium/src/painting/GraphicsContextBuilder.h (116688 => 116689)


--- trunk/Source/WebKit/chromium/src/painting/GraphicsContextBuilder.h	2012-05-10 21:37:46 UTC (rev 116688)
+++ trunk/Source/WebKit/chromium/src/painting/GraphicsContextBuilder.h	2012-05-10 21:44:03 UTC (rev 116689)
@@ -33,14 +33,10 @@
 
 #include "GraphicsContext.h"
 
-#if WEBKIT_USING_SKIA
 #include "PlatformContextSkia.h"
-#endif
 
 namespace WebKit {
 
-#if WEBKIT_USING_SKIA
-
 class GraphicsContextBuilder {
 public:
     GraphicsContextBuilder(WebCanvas* canvas)
@@ -56,10 +52,6 @@
     WebCore::GraphicsContext m_graphicsContext;
 };
 
-#else
-#error "Need to define GraphicsContextBuilder!"
-#endif
-
 } // namespace WebKit
 
 #endif
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to