Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Break cyclic dependency between GraphicsLayer and GraphicsLayerContentsDisplayDelegate #6140

Conversation

mwyrzykowski
Copy link
Contributor

@mwyrzykowski mwyrzykowski commented Nov 4, 2022

4c22fa0

Break cyclic dependency between GraphicsLayer and GraphicsLayerContentsDisplayDelegate
https://bugs.webkit.org/show_bug.cgi?id=247494
<radar://101965027>

Reviewed by NOBODY (OOPS!).

GraphicsLayer.h uses a RefPtr<ContentsDisplayDelegate> which requires the full definition on windows,
but ContentsDisplayDelegate includes GraphicsLayer.h for the purpose of using a nested enum.

Break this by moving the enum class to its own header file.

* Source/WebCore/Headers.cmake:
Add new files.

* Source/WebCore/platform/graphics/CompositingCoordinatesOrientation.h: Copied from Source/WebCore/platform/graphics/GraphicsLayerContentsDisplayDelegate.cpp.
Move enum class to its own header file.

* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::setContentsOrientation):
(WebCore::GraphicsLayer::contentsOrientation const):
* Source/WebCore/platform/graphics/GraphicsLayerContentsDisplayDelegate.cpp:
(WebCore::GraphicsLayerContentsDisplayDelegate::orientation const):
* Source/WebCore/platform/graphics/GraphicsLayerContentsDisplayDelegate.h:
* Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:
* Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h:
* Source/WebCore/platform/graphics/ca/PlatformCALayerClient.h:
(WebCore::PlatformCALayerClient::platformCALayerContentsOrientation const):
* Source/WebCore/platform/graphics/ca/TileCoverageMap.h:
* Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
(WebCore::PlatformCALayer::drawLayerContents):
* Source/WebCore/platform/graphics/cocoa/WebProcessGraphicsContextGLCocoa.mm:
* Source/WebKit/WebProcess/GPU/graphics/cocoa/RemoteGraphicsContextGLProxyCocoa.mm:
Rename nested enum.

4c22fa0

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe   πŸ›  πŸ§ͺ win
βœ… πŸ§ͺ bindings βœ… πŸ›  ios-sim   πŸ›  mac-debug βœ… πŸ›  gtk   πŸ›  wincairo
βœ… πŸ§ͺ webkitperl   πŸ§ͺ ios-wk2 βœ… πŸ›  mac-AS-debug   πŸ§ͺ gtk-wk2
  πŸ§ͺ api-ios   πŸ§ͺ api-mac   πŸ§ͺ api-gtk
  πŸ›  tv   πŸ§ͺ mac-wk1
  πŸ›  tv-sim   πŸ§ͺ mac-wk2
  πŸ›  watch   πŸ§ͺ mac-AS-debug-wk2
  πŸ›  watch-sim   πŸ§ͺ mac-wk2-stress

@mwyrzykowski mwyrzykowski self-assigned this Nov 4, 2022
@mwyrzykowski mwyrzykowski added Layout and Rendering For bugs with layout and rendering of Web pages. Other labels Nov 4, 2022
#pragma once

namespace WebCore {
enum class GraphicsLayerCompositingCoordinatesOrientation : uint8_t { TopDown, BottomUp };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be OK omitting the "GraphicsLayer" prefix.

…tsDisplayDelegate

https://bugs.webkit.org/show_bug.cgi?id=247494
<radar://101965027>

Reviewed by NOBODY (OOPS!).

GraphicsLayer.h uses a RefPtr<ContentsDisplayDelegate> which requires the full definition on windows,
but ContentsDisplayDelegate includes GraphicsLayer.h for the purpose of using a nested enum.

Break this by moving the enum class to its own header file.

* Source/WebCore/Headers.cmake:
Add new files.

* Source/WebCore/platform/graphics/CompositingCoordinatesOrientation.h: Copied from Source/WebCore/platform/graphics/GraphicsLayerContentsDisplayDelegate.cpp.
Move enum class to its own header file.

* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::setContentsOrientation):
(WebCore::GraphicsLayer::contentsOrientation const):
* Source/WebCore/platform/graphics/GraphicsLayerContentsDisplayDelegate.cpp:
(WebCore::GraphicsLayerContentsDisplayDelegate::orientation const):
* Source/WebCore/platform/graphics/GraphicsLayerContentsDisplayDelegate.h:
* Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:
* Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h:
* Source/WebCore/platform/graphics/ca/PlatformCALayerClient.h:
(WebCore::PlatformCALayerClient::platformCALayerContentsOrientation const):
* Source/WebCore/platform/graphics/ca/TileCoverageMap.h:
* Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
(WebCore::PlatformCALayer::drawLayerContents):
* Source/WebCore/platform/graphics/cocoa/WebProcessGraphicsContextGLCocoa.mm:
* Source/WebKit/WebProcess/GPU/graphics/cocoa/RemoteGraphicsContextGLProxyCocoa.mm:
Rename nested enum.
@mwyrzykowski mwyrzykowski force-pushed the eng/Break-cyclic-dependency-between-GraphicsLayer-and-GraphicsLayerContentsDisplayDelegate branch from fb938f4 to 4c22fa0 Compare November 4, 2022 18:21
@mwyrzykowski mwyrzykowski marked this pull request as draft November 4, 2022 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Layout and Rendering For bugs with layout and rendering of Web pages.
Projects
None yet
3 participants