Diff
Modified: trunk/Source/WebCore/ChangeLog (250594 => 250595)
--- trunk/Source/WebCore/ChangeLog 2019-10-02 03:48:16 UTC (rev 250594)
+++ trunk/Source/WebCore/ChangeLog 2019-10-02 06:39:07 UTC (rev 250595)
@@ -1,3 +1,40 @@
+2019-10-01 Tim Horton <timothy_hor...@apple.com>
+
+ Clean up some includes to make the build a bit faster
+ https://bugs.webkit.org/show_bug.cgi?id=202444
+
+ Reviewed by Geoff Garen.
+
+ No new tests, just reorganizing.
+
+ Apply some profile-guided optimizations to our headers.
+
+ * bindings/js/CallTracerTypes.h:
+ * css/typedom/TypedOMCSSImageValue.h:
+ * html/canvas/WebGLObject.h:
+ * html/canvas/WebGLVertexArrayObjectBase.h:
+ * inspector/InspectorInstrumentation.cpp:
+ (WebCore::InspectorInstrumentation::instrumentingAgentsForWebGPUDevice):
+ (WebCore::InspectorInstrumentation::instrumentingAgentsForWorkerGlobalScope):
+ (WebCore::InspectorInstrumentation::instrumentingAgentsForPage):
+ (WebCore::InspectorInstrumentation::instrumentingAgentsForContext):
+ * inspector/InspectorInstrumentation.h:
+ (WebCore::InspectorInstrumentation::didCreateWebGPUDevice):
+ (WebCore::InspectorInstrumentation::willDestroyWebGPUDevice):
+ (WebCore::InspectorInstrumentation::didCreateWebGPUPipeline):
+ * platform/graphics/BitmapImage.cpp:
+ * platform/graphics/Font.h:
+ * platform/graphics/cg/GraphicsContextCG.cpp:
+ (WebCore::getUserToBaseCTM):
+ * platform/graphics/cg/GraphicsContextCG.h:
+ (WebCore::getUserToBaseCTM): Deleted.
+ * platform/graphics/cg/ImageBufferCG.cpp:
+ * platform/graphics/cocoa/IOSurface.h:
+ * platform/graphics/mac/PDFDocumentImageMac.mm:
+ InspectorInstrumentation.h is one of the most expensive headers in the entire project.
+ While not included in many places (70), it is fairly straightforward to reduce
+ its per-inclusion cost by rougly 80%.
+
2019-10-01 Alex Christensen <achristen...@webkit.org>
Progress towards a functioning CMake build on Mac
Modified: trunk/Source/WebCore/bindings/js/CallTracerTypes.h (250594 => 250595)
--- trunk/Source/WebCore/bindings/js/CallTracerTypes.h 2019-10-02 03:48:16 UTC (rev 250594)
+++ trunk/Source/WebCore/bindings/js/CallTracerTypes.h 2019-10-02 06:39:07 UTC (rev 250595)
@@ -33,7 +33,6 @@
#include "HTMLCanvasElement.h"
#include "HTMLImageElement.h"
#include "HTMLVideoElement.h"
-#include "ImageBitmap.h"
#include "ImageData.h"
#include "Path2D.h"
#include "TypedOMCSSImageValue.h"
Modified: trunk/Source/WebCore/css/typedom/TypedOMCSSImageValue.h (250594 => 250595)
--- trunk/Source/WebCore/css/typedom/TypedOMCSSImageValue.h 2019-10-02 03:48:16 UTC (rev 250594)
+++ trunk/Source/WebCore/css/typedom/TypedOMCSSImageValue.h 2019-10-02 06:39:07 UTC (rev 250595)
@@ -28,8 +28,6 @@
#if ENABLE(CSS_TYPED_OM)
#include "CSSImageValue.h"
-#include "ImageBitmap.h"
-#include "RenderElement.h"
#include "TypedOMCSSStyleValue.h"
#include <wtf/RefCounted.h>
#include <wtf/text/StringConcatenateNumbers.h>
Modified: trunk/Source/WebCore/html/canvas/WebGLObject.h (250594 => 250595)
--- trunk/Source/WebCore/html/canvas/WebGLObject.h 2019-10-02 03:48:16 UTC (rev 250594)
+++ trunk/Source/WebCore/html/canvas/WebGLObject.h 2019-10-02 06:39:07 UTC (rev 250595)
@@ -27,10 +27,12 @@
#if ENABLE(WEBGL)
-#include "GraphicsContext3D.h"
+#include "GraphicsTypes3D.h"
+#include <wtf/RefCounted.h>
namespace WebCore {
+class GraphicsContext3D;
class WebGLContextGroup;
class WebGLRenderingContextBase;
Modified: trunk/Source/WebCore/html/canvas/WebGLVertexArrayObjectBase.h (250594 => 250595)
--- trunk/Source/WebCore/html/canvas/WebGLVertexArrayObjectBase.h 2019-10-02 03:48:16 UTC (rev 250594)
+++ trunk/Source/WebCore/html/canvas/WebGLVertexArrayObjectBase.h 2019-10-02 06:39:07 UTC (rev 250595)
@@ -27,6 +27,7 @@
#if ENABLE(WEBGL)
+#include "GraphicsContext3D.h"
#include "WebGLBuffer.h"
#include "WebGLContextObject.h"
Modified: trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp (250594 => 250595)
--- trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp 2019-10-02 03:48:16 UTC (rev 250594)
+++ trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp 2019-10-02 06:39:07 UTC (rev 250595)
@@ -42,6 +42,7 @@
#include "InspectorApplicationCacheAgent.h"
#include "InspectorCSSAgent.h"
#include "InspectorCanvasAgent.h"
+#include "InspectorController.h"
#include "InspectorDOMAgent.h"
#include "InspectorDOMDebuggerAgent.h"
#include "InspectorDOMStorageAgent.h"
@@ -66,7 +67,10 @@
#include "WebConsoleAgent.h"
#include "WebDebuggerAgent.h"
#include "WebGLRenderingContextBase.h"
+#include "WebGPUDevice.h"
#include "WebSocketFrame.h"
+#include "WorkerGlobalScope.h"
+#include "WorkerInspectorController.h"
#include <_javascript_Core/ConsoleMessage.h>
#include <_javascript_Core/ConsoleTypes.h>
#include <_javascript_Core/InspectorDebuggerAgent.h>
@@ -1136,6 +1140,11 @@
if (auto* canvasAgent = instrumentingAgents.inspectorCanvasAgent())
canvasAgent->willDestroyWebGPUPipeline(pipeline);
}
+
+InstrumentingAgents* InspectorInstrumentation::instrumentingAgentsForWebGPUDevice(WebGPUDevice& device)
+{
+ return instrumentingAgentsForContext(device.scriptExecutionContext());
+}
#endif
#if ENABLE(RESOURCE_USAGE)
@@ -1280,4 +1289,24 @@
layerTreeAgent->renderLayerDestroyed(renderLayer);
}
+InstrumentingAgents& InspectorInstrumentation::instrumentingAgentsForWorkerGlobalScope(WorkerGlobalScope& workerGlobalScope)
+{
+ return workerGlobalScope.inspectorController().m_instrumentingAgents;
+}
+
+InstrumentingAgents& InspectorInstrumentation::instrumentingAgentsForPage(Page& page)
+{
+ ASSERT(isMainThread());
+ return page.inspectorController().m_instrumentingAgents.get();
+}
+
+InstrumentingAgents* InspectorInstrumentation::instrumentingAgentsForContext(ScriptExecutionContext& context)
+{
+ if (is<Document>(context))
+ return instrumentingAgentsForPage(downcast<Document>(context).page());
+ if (is<WorkerGlobalScope>(context))
+ return &instrumentingAgentsForWorkerGlobalScope(downcast<WorkerGlobalScope>(context));
+ return nullptr;
+}
+
} // namespace WebCore
Modified: trunk/Source/WebCore/inspector/InspectorInstrumentation.h (250594 => 250595)
--- trunk/Source/WebCore/inspector/InspectorInstrumentation.h 2019-10-02 03:48:16 UTC (rev 250594)
+++ trunk/Source/WebCore/inspector/InspectorInstrumentation.h 2019-10-02 06:39:07 UTC (rev 250595)
@@ -42,15 +42,11 @@
#include "FormData.h"
#include "Frame.h"
#include "HitTestResult.h"
-#include "InspectorController.h"
#include "InspectorInstrumentationCookie.h"
#include "InspectorInstrumentationPublic.h"
-#include "OffscreenCanvas.h"
#include "Page.h"
#include "StorageArea.h"
-#include "WorkerGlobalScope.h"
-#include "WorkerInspectorController.h"
-#include <_javascript_Core/JSCInlines.h>
+#include <_javascript_Core/ConsoleMessage.h>
#include <initializer_list>
#include <wtf/CompletionHandler.h>
#include <wtf/MemoryPressureHandler.h>
@@ -62,7 +58,6 @@
#if ENABLE(WEBGPU)
#include "GPUCanvasContext.h"
-#include "WebGPUDevice.h"
#include "WebGPUPipeline.h"
#endif
@@ -99,6 +94,7 @@
class SharedBuffer;
class TimerBase;
class WebKitNamedFlow;
+class WorkerGlobalScope;
class WorkerInspectorProxy;
#if ENABLE(WEBGL)
@@ -106,6 +102,7 @@
#endif
#if ENABLE(WEBGPU)
+class WebGPUDevice;
class WebGPUSwapChain;
#endif
@@ -495,6 +492,7 @@
static void willConfigureSwapChainImpl(InstrumentingAgents&, GPUCanvasContext&, WebGPUSwapChain&);
static void didCreateWebGPUPipelineImpl(InstrumentingAgents&, WebGPUDevice&, WebGPUPipeline&);
static void willDestroyWebGPUPipelineImpl(InstrumentingAgents&, WebGPUPipeline&);
+ static InstrumentingAgents* instrumentingAgentsForWebGPUDevice(WebGPUDevice&);
#endif
static void layerTreeDidChangeImpl(InstrumentingAgents&);
@@ -1424,7 +1422,7 @@
inline void InspectorInstrumentation::didCreateWebGPUDevice(WebGPUDevice& device)
{
FAST_RETURN_IF_NO_FRONTENDS(void());
- if (auto* instrumentingAgents = instrumentingAgentsForContext(device.scriptExecutionContext()))
+ if (auto* instrumentingAgents = instrumentingAgentsForWebGPUDevice(device))
didCreateWebGPUDeviceImpl(*instrumentingAgents, device);
}
@@ -1431,7 +1429,7 @@
inline void InspectorInstrumentation::willDestroyWebGPUDevice(WebGPUDevice& device)
{
FAST_RETURN_IF_NO_FRONTENDS(void());
- if (auto* instrumentingAgents = instrumentingAgentsForContext(device.scriptExecutionContext()))
+ if (auto* instrumentingAgents = instrumentingAgentsForWebGPUDevice(device))
willDestroyWebGPUDeviceImpl(*instrumentingAgents, device);
}
@@ -1445,7 +1443,7 @@
inline void InspectorInstrumentation::didCreateWebGPUPipeline(WebGPUDevice& device, WebGPUPipeline& pipeline)
{
FAST_RETURN_IF_NO_FRONTENDS(void());
- if (auto* instrumentingAgents = instrumentingAgentsForContext(device.scriptExecutionContext()))
+ if (auto* instrumentingAgents = instrumentingAgentsForWebGPUDevice(device))
didCreateWebGPUPipelineImpl(*instrumentingAgents, device, pipeline);
}
@@ -1629,15 +1627,6 @@
return context ? instrumentingAgentsForContext(*context) : nullptr;
}
-inline InstrumentingAgents* InspectorInstrumentation::instrumentingAgentsForContext(ScriptExecutionContext& context)
-{
- if (is<Document>(context))
- return instrumentingAgentsForPage(downcast<Document>(context).page());
- if (is<WorkerGlobalScope>(context))
- return &instrumentingAgentsForWorkerGlobalScope(downcast<WorkerGlobalScope>(context));
- return nullptr;
-}
-
inline InstrumentingAgents* InspectorInstrumentation::instrumentingAgentsForFrame(const Frame* frame)
{
return frame ? instrumentingAgentsForFrame(*frame) : nullptr;
@@ -1666,22 +1655,11 @@
return page ? &instrumentingAgentsForPage(*page) : nullptr;
}
-inline InstrumentingAgents& InspectorInstrumentation::instrumentingAgentsForPage(Page& page)
-{
- ASSERT(isMainThread());
- return page.inspectorController().m_instrumentingAgents.get();
-}
-
inline InstrumentingAgents* InspectorInstrumentation::instrumentingAgentsForWorkerGlobalScope(WorkerGlobalScope* workerGlobalScope)
{
return workerGlobalScope ? &instrumentingAgentsForWorkerGlobalScope(*workerGlobalScope) : nullptr;
}
-inline InstrumentingAgents& InspectorInstrumentation::instrumentingAgentsForWorkerGlobalScope(WorkerGlobalScope& workerGlobalScope)
-{
- return workerGlobalScope.inspectorController().m_instrumentingAgents;
-}
-
inline void InspectorInstrumentation::frontendCreated()
{
ASSERT(isMainThread());
Modified: trunk/Source/WebCore/platform/graphics/BitmapImage.cpp (250594 => 250595)
--- trunk/Source/WebCore/platform/graphics/BitmapImage.cpp 2019-10-02 03:48:16 UTC (rev 250594)
+++ trunk/Source/WebCore/platform/graphics/BitmapImage.cpp 2019-10-02 06:39:07 UTC (rev 250595)
@@ -39,6 +39,10 @@
#include <wtf/text/TextStream.h>
#include <wtf/text/WTFString.h>
+#if USE(CG)
+#include <pal/spi/cg/CoreGraphicsSPI.h>
+#endif
+
namespace WebCore {
BitmapImage::BitmapImage(ImageObserver* observer)
Modified: trunk/Source/WebCore/platform/graphics/Font.h (250594 => 250595)
--- trunk/Source/WebCore/platform/graphics/Font.h 2019-10-02 03:48:16 UTC (rev 250594)
+++ trunk/Source/WebCore/platform/graphics/Font.h 2019-10-02 06:39:07 UTC (rev 250595)
@@ -46,10 +46,6 @@
#include <usp10.h>
#endif
-#if USE(CG)
-#include <pal/spi/cg/CoreGraphicsSPI.h>
-#endif
-
#if USE(DIRECT2D)
interface IDWriteFactory5;
interface IDWriteGdiInterop;
Modified: trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp (250594 => 250595)
--- trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp 2019-10-02 03:48:16 UTC (rev 250594)
+++ trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp 2019-10-02 06:39:07 UTC (rev 250595)
@@ -67,6 +67,11 @@
CGContextSetStrokeColorWithColor(context, cachedCGColor(color));
}
+inline CGAffineTransform getUserToBaseCTM(CGContextRef context)
+{
+ return CGAffineTransformConcat(CGContextGetCTM(context), CGAffineTransformInvert(CGContextGetBaseCTM(context)));
+}
+
CGColorSpaceRef sRGBColorSpaceRef()
{
static CGColorSpaceRef sRGBColorSpace;
Modified: trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.h (250594 => 250595)
--- trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.h 2019-10-02 03:48:16 UTC (rev 250594)
+++ trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.h 2019-10-02 06:39:07 UTC (rev 250595)
@@ -36,10 +36,7 @@
WEBCORE_EXPORT CGColorSpaceRef displayP3ColorSpaceRef();
WEBCORE_EXPORT CGColorSpaceRef linearRGBColorSpaceRef();
-inline CGAffineTransform getUserToBaseCTM(CGContextRef context)
-{
- return CGAffineTransformConcat(CGContextGetCTM(context), CGAffineTransformInvert(CGContextGetBaseCTM(context)));
-}
+CGAffineTransform getUserToBaseCTM(CGContextRef);
static inline CGColorSpaceRef cachedCGColorSpace(ColorSpace colorSpace)
{
Modified: trunk/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp (250594 => 250595)
--- trunk/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp 2019-10-02 03:48:16 UTC (rev 250594)
+++ trunk/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp 2019-10-02 06:39:07 UTC (rev 250595)
@@ -40,6 +40,7 @@
#include <math.h>
#include <CoreGraphics/CoreGraphics.h>
#include <ImageIO/ImageIO.h>
+#include <pal/spi/cg/CoreGraphicsSPI.h>
#include <wtf/Assertions.h>
#include <wtf/CheckedArithmetic.h>
#include <wtf/MainThread.h>
Modified: trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.h (250594 => 250595)
--- trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.h 2019-10-02 03:48:16 UTC (rev 250594)
+++ trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.h 2019-10-02 06:39:07 UTC (rev 250595)
@@ -28,6 +28,7 @@
#if HAVE(IOSURFACE)
#include <objc/objc.h>
+#include <pal/spi/cocoa/IOSurfaceSPI.h>
#include "GraphicsContext.h"
#include "IntSize.h"
Modified: trunk/Source/WebCore/platform/graphics/mac/PDFDocumentImageMac.mm (250594 => 250595)
--- trunk/Source/WebCore/platform/graphics/mac/PDFDocumentImageMac.mm 2019-10-02 03:48:16 UTC (rev 250594)
+++ trunk/Source/WebCore/platform/graphics/mac/PDFDocumentImageMac.mm 2019-10-02 06:39:07 UTC (rev 250595)
@@ -32,6 +32,7 @@
#import "SharedBuffer.h"
#import <Quartz/Quartz.h>
#import <objc/objc-class.h>
+#import <pal/spi/cg/CoreGraphicsSPI.h>
#import <wtf/RetainPtr.h>
#import <wtf/SoftLinking.h>
Modified: trunk/Source/WebKit/ChangeLog (250594 => 250595)
--- trunk/Source/WebKit/ChangeLog 2019-10-02 03:48:16 UTC (rev 250594)
+++ trunk/Source/WebKit/ChangeLog 2019-10-02 06:39:07 UTC (rev 250595)
@@ -1,3 +1,12 @@
+2019-10-01 Tim Horton <timothy_hor...@apple.com>
+
+ Clean up some includes to make the build a bit faster
+ https://bugs.webkit.org/show_bug.cgi?id=202444
+
+ Reviewed by Geoff Garen.
+
+ * UIProcess/API/Cocoa/_WKThumbnailView.mm:
+
2019-10-01 Alex Christensen <achristen...@webkit.org>
Progress towards a functioning CMake build on Mac
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/_WKThumbnailView.mm (250594 => 250595)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/_WKThumbnailView.mm 2019-10-02 03:48:16 UTC (rev 250594)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/_WKThumbnailView.mm 2019-10-02 06:39:07 UTC (rev 250595)
@@ -34,6 +34,7 @@
#import "WKViewInternal.h"
#import "WKWebViewInternal.h"
#import "WebPageProxy.h"
+#import <pal/spi/cg/CoreGraphicsSPI.h>
// FIXME: Make it possible to leave a snapshot of the content presented in the WKView while the thumbnail is live.
// FIXME: Don't make new speculative tiles while thumbnailed.
Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (250594 => 250595)
--- trunk/Source/WebKitLegacy/mac/ChangeLog 2019-10-02 03:48:16 UTC (rev 250594)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog 2019-10-02 06:39:07 UTC (rev 250595)
@@ -1,3 +1,13 @@
+2019-10-01 Tim Horton <timothy_hor...@apple.com>
+
+ Clean up some includes to make the build a bit faster
+ https://bugs.webkit.org/show_bug.cgi?id=202444
+
+ Reviewed by Geoff Garen.
+
+ * WebView/WebFrame.mm:
+ * WebView/WebView.mm:
+
2019-10-01 Antti Koivisto <an...@apple.com>
[CSS Shadow Parts] Parse 'part' attribute
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebFrame.mm (250594 => 250595)
--- trunk/Source/WebKitLegacy/mac/WebView/WebFrame.mm 2019-10-02 03:48:16 UTC (rev 250594)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebFrame.mm 2019-10-02 06:39:07 UTC (rev 250595)
@@ -103,6 +103,7 @@
#import <WebCore/ThreadCheck.h>
#import <WebCore/VisibleUnits.h>
#import <WebCore/markup.h>
+#import <pal/spi/cg/CoreGraphicsSPI.h>
#if PLATFORM(IOS_FAMILY)
#import "WebMailDelegate.h"
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebView.mm (250594 => 250595)
--- trunk/Source/WebKitLegacy/mac/WebView/WebView.mm 2019-10-02 03:48:16 UTC (rev 250594)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebView.mm 2019-10-02 06:39:07 UTC (rev 250595)
@@ -227,6 +227,7 @@
#import <objc/runtime.h>
#import <pal/spi/cf/CFNetworkSPI.h>
#import <pal/spi/cf/CFUtilitiesSPI.h>
+#import <pal/spi/cg/CoreGraphicsSPI.h>
#import <pal/spi/cocoa/NSTouchBarSPI.h>
#import <pal/spi/cocoa/NSURLDownloadSPI.h>
#import <pal/spi/cocoa/NSURLFileTypeMappingsSPI.h>