Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a516b8527e73e0a16dfd0c660ca4ebd8d9b6130c
https://github.com/WebKit/WebKit/commit/a516b8527e73e0a16dfd0c660ca4ebd8d9b6130c
Author: Simon Fraser <[email protected]>
Date: 2023-01-05 (Thu, 05 Jan 2023)
Changed paths:
M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.h
M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm
M Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.cpp
M Source/WebKit/WebProcess/WebPage/mac/RemoteLayerTreeDrawingAreaMac.mm
Log Message:
-----------
Handle moving a UI-side composited window between displays with different
properties
https://bugs.webkit.org/show_bug.cgi?id=247932
rdar://102346937
Reviewed by Tim Horton
On macOS windows can be moved between displays with different colorspaces, so
with
UI-side compositing we need to ensure that we update layer backing stores with
the
new colorspace.
To fix this, add the colorspace to RemoteLayerBackingStore::Parameters, and
initialize
it in PlatformCALayerRemote::updateBackingStore() by getting the colorspace
from the
RemoteLayerTreeContext (on macOS). This allows the existing call to
`ensureBackingStore()`
to do the right thing when the colorspace changes.
We rely on the fact that moving between displays triggers repaints in all
layers already
to make sure that we hit PlatformCALayerRemote::updateBackingStore().
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.h:
(WebKit::RemoteLayerBackingStore::Parameters::operator== const):
(WebKit::RemoteLayerBackingStore::colorSpace const):
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::pixelFormat const):
(WebKit::RemoteLayerBackingStore::colorSpace const): Deleted.
* Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::updateBackingStore):
* Source/WebKit/WebProcess/WebPage/mac/RemoteLayerTreeDrawingAreaMac.mm:
(WebKit::RemoteLayerTreeDrawingAreaMac::setColorSpace):
Canonical link: https://commits.webkit.org/258486@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes