Title: [117186] trunk
Revision
117186
Author
[email protected]
Date
2012-05-15 16:51:13 -0700 (Tue, 15 May 2012)

Log Message

[chromium] Remove WEBKIT_USING_(SKIA|CG) #defines
https://bugs.webkit.org/show_bug.cgi?id=86536

Reviewed by Adam Barth.

Source/Platform:

The Chromium port always using Skia, so WEBKIT_USING_CG has been dead code for many moons.

* chromium/public/WebCommon.h:

Tools:

Deletes dead WEBKIT_USING_CG code and #ifdefs guarding it.

* DumpRenderTree/chromium/WebThemeEngineDRTMac.mm:
(WebThemeEngineDRTMac::paintHIThemeScrollbarThumb):
(WebThemeEngineDRTMac::paintNSScrollerScrollbarThumb):
* DumpRenderTree/chromium/WebViewHost.cpp:
(WebViewHost::paintPagesWithBoundaries):

Modified Paths

Diff

Modified: trunk/Source/Platform/ChangeLog (117185 => 117186)


--- trunk/Source/Platform/ChangeLog	2012-05-15 23:48:58 UTC (rev 117185)
+++ trunk/Source/Platform/ChangeLog	2012-05-15 23:51:13 UTC (rev 117186)
@@ -1,5 +1,16 @@
 2012-05-15  James Robinson  <[email protected]>
 
+        [chromium] Remove WEBKIT_USING_(SKIA|CG) #defines
+        https://bugs.webkit.org/show_bug.cgi?id=86536
+
+        Reviewed by Adam Barth.
+
+        The Chromium port always using Skia, so WEBKIT_USING_CG has been dead code for many moons.
+
+        * chromium/public/WebCommon.h:
+
+2012-05-15  James Robinson  <[email protected]>
+
         [chromium] Move createOffscreenGraphicsContext3D() from WebKitPlatformSupport to Platform
         https://bugs.webkit.org/show_bug.cgi?id=86524
 

Modified: trunk/Source/Platform/chromium/public/WebCommon.h (117185 => 117186)


--- trunk/Source/Platform/chromium/public/WebCommon.h	2012-05-15 23:48:58 UTC (rev 117185)
+++ trunk/Source/Platform/chromium/public/WebCommon.h	2012-05-15 23:51:13 UTC (rev 117186)
@@ -38,22 +38,6 @@
     #define WEBKIT_IMPLEMENTATION 0
 #endif
 
-#if !defined(WEBKIT_USING_SKIA)
-    #if !defined(__APPLE__) || defined(USE_SKIA)
-        #define WEBKIT_USING_SKIA 1
-    #else
-        #define WEBKIT_USING_SKIA 0
-    #endif
-#endif
-
-#if !defined(WEBKIT_USING_CG)
-    #if defined(__APPLE__) && !WEBKIT_USING_SKIA
-        #define WEBKIT_USING_CG 1
-    #else
-        #define WEBKIT_USING_CG 0
-    #endif
-#endif
-
 #if !defined(WEBKIT_USING_V8)
     #define WEBKIT_USING_V8 1
 #endif

Modified: trunk/Tools/ChangeLog (117185 => 117186)


--- trunk/Tools/ChangeLog	2012-05-15 23:48:58 UTC (rev 117185)
+++ trunk/Tools/ChangeLog	2012-05-15 23:51:13 UTC (rev 117186)
@@ -1,5 +1,20 @@
 2012-05-15  James Robinson  <[email protected]>
 
+        [chromium] Remove WEBKIT_USING_(SKIA|CG) #defines
+        https://bugs.webkit.org/show_bug.cgi?id=86536
+
+        Reviewed by Adam Barth.
+
+        Deletes dead WEBKIT_USING_CG code and #ifdefs guarding it.
+
+        * DumpRenderTree/chromium/WebThemeEngineDRTMac.mm:
+        (WebThemeEngineDRTMac::paintHIThemeScrollbarThumb):
+        (WebThemeEngineDRTMac::paintNSScrollerScrollbarThumb):
+        * DumpRenderTree/chromium/WebViewHost.cpp:
+        (WebViewHost::paintPagesWithBoundaries):
+
+2012-05-15  James Robinson  <[email protected]>
+
         [chromium] Unreviewed build fix.
 
         Partial revert of r117166 - it appears making DumpRenderTree depend on webkit_platform causes crashes in the

Modified: trunk/Tools/DumpRenderTree/chromium/WebThemeEngineDRTMac.mm (117185 => 117186)


--- trunk/Tools/DumpRenderTree/chromium/WebThemeEngineDRTMac.mm	2012-05-15 23:48:58 UTC (rev 117185)
+++ trunk/Tools/DumpRenderTree/chromium/WebThemeEngineDRTMac.mm	2012-05-15 23:51:13 UTC (rev 117186)
@@ -30,6 +30,7 @@
 
 #include "WebThemeEngineDRTMac.h"
 
+#include "skia/ext/skia_utils_mac.h"
 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCanvas.h"
 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h"
 #import <AppKit/NSAffineTransform.h>
@@ -38,10 +39,6 @@
 #import <AppKit/NSWindow.h>
 #include <Carbon/Carbon.h>
 
-#if WEBKIT_USING_SKIA
-#include "skia/ext/skia_utils_mac.h"
-#endif
-
 using WebKit::WebCanvas;
 using WebKit::WebRect;
 using WebKit::WebThemeEngine;
@@ -144,12 +141,8 @@
     trackInfo.trackInfo.scrollbar.pressState =
         state == WebThemeEngine::StatePressed ? kThemeThumbPressed : 0;
     trackInfo.attributes |= (kThemeTrackShowThumb | kThemeTrackHideTrack);
-#if WEBKIT_USING_SKIA
     gfx::SkiaBitLocker bitLocker(canvas);
     CGContextRef cgContext = bitLocker.cgContext();
-#else
-    CGContextRef cgContext = canvas;
-#endif
     HIThemeDrawTrack(&trackInfo, 0, cgContext, kHIThemeOrientationNormal);
 }
 
@@ -176,12 +169,8 @@
     float knobProportion = float(scrollbarInfo.visibleSize) / float(scrollbarInfo.totalSize);
     [scroller setKnobProportion: knobProportion];
 
-#if WEBKIT_USING_SKIA
     gfx::SkiaBitLocker bitLocker(canvas);
     CGContextRef cgContext = bitLocker.cgContext();
-#else
-    CGContextRef cgContext = canvas;
-#endif
     NSGraphicsContext* nsGraphicsContext = [NSGraphicsContext graphicsContextWithGraphicsPort:cgContext flipped:YES];
     [NSGraphicsContext setCurrentContext:nsGraphicsContext];
 

Modified: trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp (117185 => 117186)


--- trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp	2012-05-15 23:48:58 UTC (rev 117185)
+++ trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp	2012-05-15 23:51:13 UTC (rev 117186)
@@ -1799,21 +1799,7 @@
         return;
     }
 
-#if WEBKIT_USING_SKIA
-    WebCanvas* webCanvas = canvas();
-#elif WEBKIT_USING_CG
-    const SkBitmap& canvasBitmap = canvas()->getDevice()->accessBitmap(false);
-    WebCanvas* webCanvas = CGBitmapContextCreate(canvasBitmap.getPixels(),
-                                                 pageSizeInPixels.width, totalHeight,
-                                                 8, pageSizeInPixels.width * 4,
-                                                 CGColorSpaceCreateDeviceRGB(),
-                                                 kCGImageAlphaPremultipliedFirst |
-                                                 kCGBitmapByteOrder32Host);
-    CGContextTranslateCTM(webCanvas, 0.0, totalHeight);
-    CGContextScaleCTM(webCanvas, 1.0, -1.0f);
-#endif
-
-    webFrame->printPagesWithBoundaries(webCanvas, pageSizeInPixels);
+    webFrame->printPagesWithBoundaries(canvas(), pageSizeInPixels);
     webFrame->printEnd();
 
     m_isPainting = false;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to