- Revision
- 275565
- Author
- [email protected]
- Date
- 2021-04-06 15:53:04 -0700 (Tue, 06 Apr 2021)
Log Message
[GPU Process] Simplify DisplayList::Iterator part 3: Reorder #include dependencies to allow for ItemBuffer{Writing,Reading}Client to know about DisplayList item types
https://bugs.webkit.org/show_bug.cgi?id=224145
Reviewed by Wenson Hsieh.
ItemBuffer{Writing,Reading}Client exists within DisplayListItemBuffer.h. The DisplayList item types exist within DisplayListItems.h.
Previously, the #include path was:
DisplayListItems.h -> DisplayList.h -> DisplayListItemBuffer.h
However, this means that DisplayListItemBuffer.h can't see what's inside DisplayListItems.h.
After this patch, the #include path is:
DisplayList.h -> DisplayListItemBuffer.h -> DisplayListItems.h
This is important because ItemBuffer{Writing,Reading}Client have encodeItem() and decodeItem() functions, which will need to know
about DisplayList item types if we want to migrate away from ItemHandle.
No new tests because there is no behavior change.
* Headers.cmake:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/displaylists/DisplayListItemBuffer.cpp:
* platform/graphics/displaylists/DisplayListItemBuffer.h:
* platform/graphics/displaylists/DisplayListItemBufferIdentifier.h: Added.
* platform/graphics/displaylists/DisplayListItems.h:
Modified Paths
Added Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (275564 => 275565)
--- trunk/Source/WebCore/ChangeLog 2021-04-06 22:38:52 UTC (rev 275564)
+++ trunk/Source/WebCore/ChangeLog 2021-04-06 22:53:04 UTC (rev 275565)
@@ -1,3 +1,32 @@
+2021-04-06 Myles C. Maxfield <[email protected]>
+
+ [GPU Process] Simplify DisplayList::Iterator part 3: Reorder #include dependencies to allow for ItemBuffer{Writing,Reading}Client to know about DisplayList item types
+ https://bugs.webkit.org/show_bug.cgi?id=224145
+
+ Reviewed by Wenson Hsieh.
+
+ ItemBuffer{Writing,Reading}Client exists within DisplayListItemBuffer.h. The DisplayList item types exist within DisplayListItems.h.
+
+ Previously, the #include path was:
+ DisplayListItems.h -> DisplayList.h -> DisplayListItemBuffer.h
+
+ However, this means that DisplayListItemBuffer.h can't see what's inside DisplayListItems.h.
+
+ After this patch, the #include path is:
+ DisplayList.h -> DisplayListItemBuffer.h -> DisplayListItems.h
+
+ This is important because ItemBuffer{Writing,Reading}Client have encodeItem() and decodeItem() functions, which will need to know
+ about DisplayList item types if we want to migrate away from ItemHandle.
+
+ No new tests because there is no behavior change.
+
+ * Headers.cmake:
+ * WebCore.xcodeproj/project.pbxproj:
+ * platform/graphics/displaylists/DisplayListItemBuffer.cpp:
+ * platform/graphics/displaylists/DisplayListItemBuffer.h:
+ * platform/graphics/displaylists/DisplayListItemBufferIdentifier.h: Added.
+ * platform/graphics/displaylists/DisplayListItems.h:
+
2021-04-06 Brent Fulgham <[email protected]>
Add additional page load diagnostic logging
Modified: trunk/Source/WebCore/Headers.cmake (275564 => 275565)
--- trunk/Source/WebCore/Headers.cmake 2021-04-06 22:38:52 UTC (rev 275564)
+++ trunk/Source/WebCore/Headers.cmake 2021-04-06 22:53:04 UTC (rev 275565)
@@ -1319,6 +1319,7 @@
platform/graphics/displaylists/DisplayListFlushIdentifier.h
platform/graphics/displaylists/DisplayListImageBuffer.h
platform/graphics/displaylists/DisplayListItemBuffer.h
+ platform/graphics/displaylists/DisplayListItemBufferIdentifier.h
platform/graphics/displaylists/DisplayListItemType.h
platform/graphics/displaylists/DisplayListItems.h
platform/graphics/displaylists/DisplayListRecorder.h
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (275564 => 275565)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2021-04-06 22:38:52 UTC (rev 275564)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2021-04-06 22:53:04 UTC (rev 275565)
@@ -644,6 +644,7 @@
1CAF56DB25301AC80017B472 /* DisplayListDrawGlyphsRecorder.h in Headers */ = {isa = PBXBuildFile; fileRef = 1CAF56D8253014570017B472 /* DisplayListDrawGlyphsRecorder.h */; settings = {ATTRIBUTES = (Private, ); }; };
1CCD81502231F83E0065FC2B /* WebCoreResourceHandleAsOperationQueueDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = E152551416FD234F003D7ADB /* WebCoreResourceHandleAsOperationQueueDelegate.mm */; };
1CCDF5BE1990332400BCEBAD /* SVGToOTFFontConversion.h in Headers */ = {isa = PBXBuildFile; fileRef = 1CCDF5BC1990332400BCEBAD /* SVGToOTFFontConversion.h */; };
+ 1CE8D12726185C0E00FC3AEF /* DisplayListItemBufferIdentifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 1CE8D12526185BD800FC3AEF /* DisplayListItemBufferIdentifier.h */; settings = {ATTRIBUTES = (Private, ); }; };
1CE8864126105BF2000C816C /* InMemoryDisplayList.h in Headers */ = {isa = PBXBuildFile; fileRef = 1CE8863F26105A5F000C816C /* InMemoryDisplayList.h */; settings = {ATTRIBUTES = (Private, ); }; };
1CFAE3230A6D6A3F0032593D /* libobjc.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 1CFAE3220A6D6A3F0032593D /* libobjc.dylib */; };
1D0026A42374D62400CA6CDF /* JSPictureInPictureWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = 1D0026A22374D62300CA6CDF /* JSPictureInPictureWindow.h */; };
@@ -6948,6 +6949,7 @@
1CDD45E40BA9C84600F90147 /* DebugRelease.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = DebugRelease.xcconfig; sourceTree = "<group>"; };
1CDD45E50BA9C84600F90147 /* WebCore.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = WebCore.xcconfig; sourceTree = "<group>"; };
1CDD45E60BA9C84600F90147 /* Base.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Base.xcconfig; sourceTree = "<group>"; };
+ 1CE8D12526185BD800FC3AEF /* DisplayListItemBufferIdentifier.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DisplayListItemBufferIdentifier.h; sourceTree = "<group>"; };
1CE8863E26105A5F000C816C /* InMemoryDisplayList.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = InMemoryDisplayList.cpp; sourceTree = "<group>"; };
1CE8863F26105A5F000C816C /* InMemoryDisplayList.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = InMemoryDisplayList.h; sourceTree = "<group>"; };
1CECB3A821F2B67300F44542 /* WHLSLStatementBehaviorChecker.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WHLSLStatementBehaviorChecker.h; sourceTree = "<group>"; };
@@ -18086,6 +18088,7 @@
72EA09F723FCCB3D008504A5 /* DisplayListImageBuffer.h */,
F422B8B6253F7065004E77E8 /* DisplayListItemBuffer.cpp */,
F422B8B5253F7065004E77E8 /* DisplayListItemBuffer.h */,
+ 1CE8D12526185BD800FC3AEF /* DisplayListItemBufferIdentifier.h */,
0FE5FBCC1C3DD51E0007A2CA /* DisplayListItems.cpp */,
0FE5FBCD1C3DD51E0007A2CA /* DisplayListItems.h */,
F4377D562551C9C60080ABFE /* DisplayListItemType.cpp */,
@@ -32149,6 +32152,7 @@
7242AC9725758FE1005A9CF1 /* DisplayListFlushIdentifier.h in Headers */,
55AD093E2408963500DE4D2F /* DisplayListImageBuffer.h in Headers */,
F4D40BC9255463BF00721349 /* DisplayListItemBuffer.h in Headers */,
+ 1CE8D12726185C0E00FC3AEF /* DisplayListItemBufferIdentifier.h in Headers */,
0FE5FBD51C3DD51E0007A2CA /* DisplayListItems.h in Headers */,
F4377D572551C9C60080ABFE /* DisplayListItemType.h in Headers */,
0FE5FBD71C3DD51E0007A2CA /* DisplayListRecorder.h in Headers */,
Modified: trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItemBuffer.cpp (275564 => 275565)
--- trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItemBuffer.cpp 2021-04-06 22:38:52 UTC (rev 275564)
+++ trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItemBuffer.cpp 2021-04-06 22:53:04 UTC (rev 275565)
@@ -26,6 +26,7 @@
#include "config.h"
#include "DisplayListItemBuffer.h"
+#include "DisplayListItemBufferIdentifier.h"
#include "DisplayListItems.h"
#include <wtf/FastMalloc.h>
Modified: trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItemBuffer.h (275564 => 275565)
--- trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItemBuffer.h 2021-04-06 22:38:52 UTC (rev 275564)
+++ trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItemBuffer.h 2021-04-06 22:53:04 UTC (rev 275565)
@@ -25,7 +25,9 @@
#pragma once
+#include "DisplayListItemBufferIdentifier.h"
#include "DisplayListItemType.h"
+#include "DisplayListItems.h"
#include "SharedBuffer.h"
#include <wtf/FastMalloc.h>
#include <wtf/ObjectIdentifier.h>
@@ -38,9 +40,6 @@
class DisplayList;
-enum ItemBufferIdentifierType { };
-using ItemBufferIdentifier = ObjectIdentifier<ItemBufferIdentifierType>;
-
// An ItemBufferHandle wraps a pointer to a buffer that contains display list item data.
struct ItemBufferHandle {
ItemBufferIdentifier identifier;
Added: trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItemBufferIdentifier.h (0 => 275565)
--- trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItemBufferIdentifier.h (rev 0)
+++ trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItemBufferIdentifier.h 2021-04-06 22:53:04 UTC (rev 275565)
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2021 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include <wtf/ObjectIdentifier.h>
+
+namespace WebCore {
+namespace DisplayList {
+
+enum ItemBufferIdentifierType { };
+using ItemBufferIdentifier = ObjectIdentifier<ItemBufferIdentifierType>;
+
+}
+}
Modified: trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.h (275564 => 275565)
--- trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.h 2021-04-06 22:38:52 UTC (rev 275564)
+++ trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.h 2021-04-06 22:53:04 UTC (rev 275565)
@@ -26,11 +26,14 @@
#pragma once
#include "AlphaPremultiplication.h"
-#include "DisplayList.h"
+#include "DisplayListFlushIdentifier.h"
+#include "DisplayListItemBufferIdentifier.h"
+#include "DisplayListItemType.h"
#include "FloatRoundedRect.h"
#include "Font.h"
#include "GlyphBuffer.h"
#include "Gradient.h"
+#include "GraphicsContext.h"
#include "Image.h"
#include "ImageData.h"
#include "MediaPlayerIdentifier.h"
@@ -38,6 +41,7 @@
#include "RenderingResourceIdentifier.h"
#include "SharedBuffer.h"
#include <wtf/TypeCasts.h>
+#include <wtf/Variant.h>
namespace WTF {
class TextStream;
@@ -51,6 +55,8 @@
namespace DisplayList {
+struct ItemHandle;
+
/* isInlineItem indicates whether the object needs to be passed through IPC::Encoder in order to serialize,
* or whether we can just use placement new and be done.
* It needs to match (1) RemoteImageBufferProxy::encodeItem(), (2) RemoteRenderingBackend::decodeItem(),