[Win] Reduce the use of WKSI library calls: CoreAnimation
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 26 Nov 2018 18:26:48 +0000 (18:26 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 26 Nov 2018 18:26:48 +0000 (18:26 +0000)
https://bugs.webkit.org/show_bug.cgi?id=191777
<rdar://problem/46140542>

Reviewed by Zalan Bujtas.

Update the Windows build of WebKit to refer to the SPI headers, rather than WebKitSystemInterface.
Move a small amount of glue code from WKSI to WebCore, and remove any includes or link
directives for WebKitSystemInterface.lib.
Source/WebCore:

No new tests. No change in behavior.

* platform/graphics/BitmapImage.cpp:
* platform/graphics/ca/win/CACFLayerTreeHost.h:
* platform/graphics/ca/win/PlatformCALayerWin.cpp:
(layerTreeHostForLayer):
* platform/graphics/cg/GraphicsContextCG.cpp:
* platform/graphics/cg/PathCG.cpp:
* platform/graphics/cg/PatternCG.cpp:
* platform/graphics/win/WKCAImageQueue.cpp:

Source/WebKitLegacy:

* PlatformWin.cmake:

Source/WebKitLegacy/win:

* FullscreenVideoController.cpp:
* WebKitGraphics.cpp:
* WebPreferences.cpp:

Tools:

* TestWebKitAPI/PlatformWin.cmake:

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

16 files changed:
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/BitmapImage.cpp
Source/WebCore/platform/graphics/ca/win/CACFLayerTreeHost.h
Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.cpp
Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
Source/WebCore/platform/graphics/cg/PathCG.cpp
Source/WebCore/platform/graphics/cg/PatternCG.cpp
Source/WebCore/platform/graphics/win/WKCAImageQueue.cpp
Source/WebKitLegacy/ChangeLog
Source/WebKitLegacy/PlatformWin.cmake
Source/WebKitLegacy/win/ChangeLog
Source/WebKitLegacy/win/FullscreenVideoController.cpp
Source/WebKitLegacy/win/WebKitGraphics.cpp
Source/WebKitLegacy/win/WebPreferences.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/PlatformWin.cmake

index af819b8..d9ff50b 100644 (file)
@@ -1,3 +1,26 @@
+2018-11-26  Brent Fulgham  <bfulgham@apple.com>
+
+        [Win] Reduce the use of WKSI library calls: CoreAnimation
+        https://bugs.webkit.org/show_bug.cgi?id=191777
+        <rdar://problem/46140542>
+
+        Reviewed by Zalan Bujtas.
+
+        Update the Windows build of WebKit to refer to the SPI headers, rather than WebKitSystemInterface.
+        Move a small amount of glue code from WKSI to WebCore, and remove any includes or link
+        directives for WebKitSystemInterface.lib.
+        
+        No new tests. No change in behavior.
+
+        * platform/graphics/BitmapImage.cpp:
+        * platform/graphics/ca/win/CACFLayerTreeHost.h:
+        * platform/graphics/ca/win/PlatformCALayerWin.cpp:
+        (layerTreeHostForLayer):
+        * platform/graphics/cg/GraphicsContextCG.cpp:
+        * platform/graphics/cg/PathCG.cpp:
+        * platform/graphics/cg/PatternCG.cpp:
+        * platform/graphics/win/WKCAImageQueue.cpp:
+
 2018-11-25  Zalan Bujtas  <zalan@apple.com>
 
         [LFC][IFC] Use float box's margin box to adjust the line constraints.
index 52bf00e..614bc3f 100644 (file)
@@ -38,9 +38,6 @@
 #include <wtf/Vector.h>
 #include <wtf/text/TextStream.h>
 #include <wtf/text/WTFString.h>
-#if USE(CG) && PLATFORM(WIN)
-#include <WebKitSystemInterface/WebKitSystemInterface.h>
-#endif
 
 namespace WebCore {
 
index 5424b00..88f6c0a 100644 (file)
@@ -40,7 +40,6 @@
 #include <CoreGraphics/CGGeometry.h>
 
 interface IDirect3DDevice9;
-struct WKCACFContext;
 
 typedef struct CGImage* CGImageRef;
 
index 704bf43..669472a 100644 (file)
@@ -39,7 +39,6 @@
 #include "TileController.h"
 #include "WebTiledBackingLayerWin.h"
 #include <QuartzCore/CoreAnimationCF.h>
-#include <WebKitSystemInterface/WebKitSystemInterface.h>
 #include <wtf/text/CString.h>
 #include <wtf/text/StringBuilder.h>
 
@@ -73,7 +72,10 @@ static CFStringRef toCACFFilterType(PlatformCALayer::FilterType type)
 static AbstractCACFLayerTreeHost* layerTreeHostForLayer(const PlatformCALayer* layer)
 {
     // We need the AbstractCACFLayerTreeHost associated with this layer, which is stored in the UserData of the CACFContext
-    void* userData = wkCACFLayerGetContextUserData(layer->platformLayer());
+    void* userData = nullptr;
+    if (CACFContextRef context = CACFLayerGetContext(layer->platformLayer()))
+        userData = CACFContextGetUserData(context);
+
     if (!userData)
         return nullptr;
 
index 2253272..47929e6 100644 (file)
 #include <wtf/RetainPtr.h>
 #include <wtf/text/TextStream.h>
 
-#if PLATFORM(WIN)
-#include <WebKitSystemInterface/WebKitSystemInterface.h>
-#endif
-
 #define USE_DRAW_PATH_DIRECT (PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400))
 
 // FIXME: The following using declaration should be in <wtf/HashFunctions.h>.
index 6673b24..77aa9eb 100644 (file)
 #include <wtf/RetainPtr.h>
 #include <wtf/text/WTFString.h>
 
-#if PLATFORM(WIN)
-#include <WebKitSystemInterface/WebKitSystemInterface.h>
-#endif
-
 namespace WebCore {
 
 static size_t putBytesNowhere(void*, const void*, size_t count)
index 50b061b..cbf624f 100644 (file)
 #include <pal/spi/cg/CoreGraphicsSPI.h>
 #include <wtf/MainThread.h>
 
-#if PLATFORM(WIN)
-#include <WebKitSystemInterface/WebKitSystemInterface.h>
-#endif
-
 namespace WebCore {
 
 static void patternCallback(void* info, CGContextRef context)
index 2d20587..337faf3 100644 (file)
@@ -27,7 +27,6 @@
 #include "WKCAImageQueue.h"
 
 #include <CoreFoundation/CoreFoundation.h>
-#include <WebKitSystemInterface/WebKitSystemInterface.h>
 #include <wtf/RetainPtr.h>
 
 namespace WebCore {
index 209d625..8770729 100644 (file)
@@ -1,3 +1,17 @@
+2018-11-26  Brent Fulgham  <bfulgham@apple.com>
+
+        [Win] Reduce the use of WKSI library calls: CoreAnimation
+        https://bugs.webkit.org/show_bug.cgi?id=191777
+        <rdar://problem/46140542>
+
+        Reviewed by Zalan Bujtas.
+
+        Update the Windows build of WebKit to refer to the SPI headers, rather than WebKitSystemInterface.
+        Move a small amount of glue code from WKSI to WebCore, and remove any includes or link
+        directives for WebKitSystemInterface.lib.
+
+        * PlatformWin.cmake:
+
 2018-11-17  Devin Rousso  <drousso@apple.com>
 
         Web Inspector: Network: add button to show system certificate dialog
index aa778f1..02a0b0f 100644 (file)
@@ -24,7 +24,6 @@ else ()
         PRIVATE CoreGraphics${DEBUG_SUFFIX}
         PRIVATE CoreText${DEBUG_SUFFIX}
         PRIVATE QuartzCore${DEBUG_SUFFIX}
-        PRIVATE WebKitSystemInterface${DEBUG_SUFFIX}
         PRIVATE libdispatch${DEBUG_SUFFIX}
         PRIVATE libicuin${DEBUG_SUFFIX}
         PRIVATE libicuuc${DEBUG_SUFFIX}
index 0022f8b..fe5367d 100644 (file)
@@ -1,3 +1,19 @@
+2018-11-26  Brent Fulgham  <bfulgham@apple.com>
+
+        [Win] Reduce the use of WKSI library calls: CoreAnimation
+        https://bugs.webkit.org/show_bug.cgi?id=191777
+        <rdar://problem/46140542>
+
+        Reviewed by Zalan Bujtas.
+
+        Update the Windows build of WebKit to refer to the SPI headers, rather than WebKitSystemInterface.
+        Move a small amount of glue code from WKSI to WebCore, and remove any includes or link
+        directives for WebKitSystemInterface.lib.
+
+        * FullscreenVideoController.cpp:
+        * WebKitGraphics.cpp:
+        * WebPreferences.cpp:
+
 2018-11-22  Wenson Hsieh  <wenson_hsieh@apple.com>
 
         Address post-review feedback after r238438
index 1c76f01..994dcab 100644 (file)
@@ -39,7 +39,6 @@
 #include <WebCore/HWndDC.h>
 #include <WebCore/Page.h>
 #include <WebCore/TextRun.h>
-#include <WebKitSystemInterface/WebKitSystemInterface.h>
 #include <windowsx.h>
 #include <wtf/StdLibExtras.h>
 
index 9a210e4..ad1ab17 100644 (file)
@@ -42,8 +42,6 @@
 
 #include <CoreGraphics/CoreGraphics.h>
 
-#include <WebKitSystemInterface/WebKitSystemInterface.h>
-
 using namespace WebCore;
 
 static FontCascade makeFont(const WebFontDescription& description)
index 2234614..59be0c4 100644 (file)
@@ -33,7 +33,6 @@
 #if USE(CG)
 #include <CoreGraphics/CoreGraphics.h>
 #include <WebCore/CACFLayerTreeHost.h>
-#include <WebKitSystemInterface/WebKitSystemInterface.h>
 #endif
 
 #include <CoreFoundation/CoreFoundation.h>
index 8eeb8b2..3ecd6a0 100644 (file)
@@ -1,3 +1,17 @@
+2018-11-26  Brent Fulgham  <bfulgham@apple.com>
+
+        [Win] Reduce the use of WKSI library calls: CoreAnimation
+        https://bugs.webkit.org/show_bug.cgi?id=191777
+        <rdar://problem/46140542>
+
+        Reviewed by Zalan Bujtas.
+
+        Update the Windows build of WebKit to refer to the SPI headers, rather than WebKitSystemInterface.
+        Move a small amount of glue code from WKSI to WebCore, and remove any includes or link
+        directives for WebKitSystemInterface.lib.
+
+        * TestWebKitAPI/PlatformWin.cmake:
+
 2018-11-25  Zalan Bujtas  <zalan@apple.com>
 
         [LFC][IFC] Use float box's margin box to adjust the line constraints.
index 9bacc21..f63d7a1 100644 (file)
@@ -86,7 +86,6 @@ else ()
         CoreGraphics${DEBUG_SUFFIX}
         CoreText${DEBUG_SUFFIX}
         QuartzCore${DEBUG_SUFFIX}
-        WebKitSystemInterface${DEBUG_SUFFIX}
         WebKitQuartzCoreAdditions${DEBUG_SUFFIX}
         libdispatch${DEBUG_SUFFIX}
         libexslt${DEBUG_SUFFIX}