-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[Nicosia] Simplify NicosiaPlatformLayer #19637
[Nicosia] Simplify NicosiaPlatformLayer #19637
Conversation
EWS run on current version of this PR (hash 14e74c3) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Great simplification of the code.
https://bugs.webkit.org/show_bug.cgi?id=263775 Reviewed by Alejandro G. Castro. We currently have generic classes that are created with a factory that creates the actual implementation. We only have one implementation, so we can just remove the unnecessary abstraction to save heap allocations, avoid casts and make the code easier to read. There's no change in behavior. * Source/WebCore/page/scrolling/nicosia/ScrollingTreeFixedNodeNicosia.cpp: * Source/WebCore/page/scrolling/nicosia/ScrollingTreeFixedNodeNicosia.h: * Source/WebCore/page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp: * Source/WebCore/page/scrolling/nicosia/ScrollingTreeNicosia.cpp: * Source/WebCore/page/scrolling/nicosia/ScrollingTreeOverflowScrollProxyNodeNicosia.cpp: * Source/WebCore/page/scrolling/nicosia/ScrollingTreeOverflowScrollProxyNodeNicosia.h: * Source/WebCore/page/scrolling/nicosia/ScrollingTreePositionedNodeNicosia.cpp: * Source/WebCore/page/scrolling/nicosia/ScrollingTreePositionedNodeNicosia.h: * Source/WebCore/page/scrolling/nicosia/ScrollingTreeStickyNodeNicosia.h: * Source/WebCore/platform/TextureMapper.cmake: * Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer): (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer): (WebCore::MediaPlayerPrivateGStreamer::pushTextureToCompositor): (WebCore::MediaPlayerPrivateGStreamer::pushDMABufToCompositor): (WebCore::MediaPlayerPrivateGStreamer::triggerRepaint): (WebCore::MediaPlayerPrivateGStreamer::flushCurrentBuffer): (WebCore::MediaPlayerPrivateGStreamer::pushNextHolePunchBuffer): * Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: * Source/WebCore/platform/graphics/nicosia/NicosiaBackingStore.cpp: Renamed from Source/WebCore/platform/graphics/nicosia/texmap/NicosiaBackingStoreTextureMapperImpl.cpp. (Nicosia::BackingStore::tiledBackingStoreHasPendingTileCreation): (Nicosia::BackingStore::createTile): (Nicosia::BackingStore::updateTile): (Nicosia::BackingStore::removeTile): (Nicosia::BackingStore::flushUpdate): (Nicosia::BackingStore::takeUpdate): * Source/WebCore/platform/graphics/nicosia/NicosiaBackingStore.h: Renamed from Source/WebCore/platform/graphics/nicosia/texmap/NicosiaBackingStoreTextureMapperImpl.h. * Source/WebCore/platform/graphics/nicosia/NicosiaCompositionLayer.h: Copied from Source/WebCore/platform/graphics/nicosia/NicosiaPlatformLayer.h. * Source/WebCore/platform/graphics/nicosia/NicosiaContentLayer.cpp: Renamed from Source/WebCore/platform/graphics/nicosia/texmap/NicosiaContentLayerTextureMapperImpl.cpp. (Nicosia::ContentLayer::create): (Nicosia::ContentLayer::ContentLayer): (Nicosia::ContentLayer::~ContentLayer): (Nicosia::ContentLayer::invalidateClient): (Nicosia::ContentLayer::flushUpdate): (Nicosia::ContentLayer::swapBuffersIfNeeded): * Source/WebCore/platform/graphics/nicosia/NicosiaContentLayer.h: Renamed from Source/WebCore/platform/graphics/nicosia/texmap/NicosiaContentLayerTextureMapperImpl.h. * Source/WebCore/platform/graphics/nicosia/NicosiaGCGLANGLELayer.cpp: Renamed from Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLANGLELayer.cpp. (Nicosia::GCGLANGLELayer::swapBuffersIfNeeded): (Nicosia::GCGLANGLELayer::GCGLANGLELayer): (Nicosia::GCGLANGLELayer::~GCGLANGLELayer): * Source/WebCore/platform/graphics/nicosia/NicosiaGCGLANGLELayer.h: Renamed from Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLANGLELayer.h. * Source/WebCore/platform/graphics/nicosia/NicosiaImageBacking.cpp: Renamed from Source/WebCore/platform/graphics/nicosia/texmap/NicosiaImageBackingTextureMapperImpl.cpp. (Nicosia::ImageBacking::flushUpdate): (Nicosia::ImageBacking::takeUpdate): * Source/WebCore/platform/graphics/nicosia/NicosiaImageBacking.h: Renamed from Source/WebCore/platform/graphics/nicosia/texmap/NicosiaImageBackingTextureMapperImpl.h. (Nicosia::ImageBacking::create): (Nicosia::ImageBacking::layerState): (Nicosia::ImageBacking::compositionState): * Source/WebCore/platform/graphics/nicosia/NicosiaImageBackingStore.cpp: Renamed from Source/WebCore/platform/graphics/nicosia/texmap/NicosiaImageBackingStore.cpp. * Source/WebCore/platform/graphics/nicosia/NicosiaImageBackingStore.h: Renamed from Source/WebCore/platform/graphics/nicosia/texmap/NicosiaImageBackingStore.h. (Nicosia::ImageBackingStore::backingStoreState): (Nicosia::ImageBackingStore::CompositionState::CompositionState): (Nicosia::ImageBackingStore::compositionState): * Source/WebCore/platform/graphics/nicosia/NicosiaImageBufferPipe.cpp: (Nicosia::NicosiaImageBufferPipeSource::NicosiaImageBufferPipeSource): (Nicosia::NicosiaImageBufferPipeSource::~NicosiaImageBufferPipeSource): (Nicosia::NicosiaImageBufferPipeSource::handle): * Source/WebCore/platform/graphics/nicosia/NicosiaImageBufferPipe.h: * Source/WebCore/platform/graphics/nicosia/NicosiaPlatformLayer.cpp: Removed. * Source/WebCore/platform/graphics/nicosia/NicosiaPlatformLayer.h: (Nicosia::PlatformLayer::PlatformLayer): (Nicosia::CompositionLayer::Impl::isTextureMapperImpl const): Deleted. (Nicosia::CompositionLayer::create): Deleted. (Nicosia::CompositionLayer::impl const): Deleted. (Nicosia::CompositionLayer::LayerState::Flags::Flags): Deleted. (Nicosia::CompositionLayer::flushState): Deleted. (Nicosia::CompositionLayer::commitState): Deleted. (Nicosia::CompositionLayer::accessPending): Deleted. (Nicosia::CompositionLayer::accessCommitted): Deleted. (Nicosia::ContentLayer::Impl::isTextureMapperImpl const): Deleted. (Nicosia::ContentLayer::create): Deleted. (Nicosia::ContentLayer::impl const): Deleted. (Nicosia::BackingStore::Impl::isTextureMapperImpl const): Deleted. (Nicosia::BackingStore::create): Deleted. (Nicosia::BackingStore::impl const): Deleted. (Nicosia::ImageBacking::Impl::isTextureMapperImpl const): Deleted. (Nicosia::ImageBacking::create): Deleted. (Nicosia::ImageBacking::impl const): Deleted. * Source/WebCore/platform/graphics/nicosia/NicosiaScene.cpp: * Source/WebCore/platform/graphics/nicosia/NicosiaSceneIntegration.cpp: * Source/WebCore/platform/graphics/nicosia/texmap/NicosiaCompositionLayerTextureMapperImpl.cpp: Removed. * Source/WebCore/platform/graphics/nicosia/texmap/NicosiaCompositionLayerTextureMapperImpl.h: Removed. * Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer): (WebCore::CoordinatedGraphicsLayer::updatePlatformLayer): (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly): (WebCore::CoordinatedGraphicsLayer::updateContentBuffers): (WebCore::CoordinatedGraphicsLayer::purgeBackingStores): * Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h: * Source/WebKit/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp: (WebKit::texmapLayer): (WebKit::updateBackingStore): (WebKit::updateImageBacking): (WebKit::removeLayer): (WebKit::CoordinatedGraphicsScene::updateSceneState): (WebKit::compositionLayerImpl): Deleted. (WebKit::contentLayerImpl): Deleted. (WebKit::backingStoreImpl): Deleted. (WebKit::imageBackingImpl): Deleted. * Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp: (WebKit::CompositingCoordinator::flushPendingLayerChanges): Canonical link: https://commits.webkit.org/269998@main
14e74c3
to
ee8fbcb
Compare
Committed 269998@main (ee8fbcb): https://commits.webkit.org/269998@main Reviewed commits have been landed. Closing PR #19637 and removing active labels. |
Thanks @carlosgcampos - much easier to follow. |
ee8fbcb
14e74c3