Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ff2d14cf13d0128a960cd64941085844014b9ef6
      
https://github.com/WebKit/WebKit/commit/ff2d14cf13d0128a960cd64941085844014b9ef6
  Author: Carlos Garcia Campos <[email protected]>
  Date:   2023-04-19 (Wed, 19 Apr 2023)

  Changed paths:
    M 
Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp
    M 
Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h
    M Source/WebKit/UIProcess/DrawingAreaProxy.h
    M Source/WebKit/UIProcess/DrawingAreaProxy.messages.in
    M Source/WebKit/UIProcess/wc/DrawingAreaProxyWC.cpp
    M 
Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp
    M 
Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.h
    M Source/WebKit/WebProcess/WebPage/DrawingArea.h
    M Source/WebKit/WebProcess/WebPage/DrawingArea.messages.in
    M Source/WebKit/WebProcess/WebPage/wc/DrawingAreaWC.cpp
    M Source/WebKit/WebProcess/WebPage/wc/DrawingAreaWC.h

  Log Message:
  -----------
  [CoordinatedGraphics] Simplify drawing area resize implementation
https://bugs.webkit.org/show_bug.cgi?id=255392

Reviewed by Žan Doberšek.

We currently have a backing store ID that we change every time the
drawing area is resized or new backing store is created and sent to the
web process waiting for a response. It can be simplified by using that
only for size changes and use an message with async reply to handle the
response.

* 
Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp:
(WebKit::DrawingAreaProxyCoordinatedGraphics::paint): Just return early if we 
don't have a backing store to paint.
(WebKit::DrawingAreaProxyCoordinatedGraphics::sizeDidChange): Call 
sendUpdateGeometry() if not already sent.
(WebKit::DrawingAreaProxyCoordinatedGraphics::deviceScaleFactorDidChange): Send 
SetDeviceScaleFactor message.
(WebKit::DrawingAreaProxyCoordinatedGraphics::update): If waiting for geometry 
update and size doesn't match just ignore the update.
(WebKit::DrawingAreaProxyCoordinatedGraphics::enterAcceleratedCompositingMode): 
backingStoreStateID is no longer used.
(WebKit::DrawingAreaProxyCoordinatedGraphics::exitAcceleratedCompositingMode): 
Ditto.
(WebKit::DrawingAreaProxyCoordinatedGraphics::updateAcceleratedCompositingMode):
 Ditto.
(WebKit::DrawingAreaProxyCoordinatedGraphics::incorporateUpdate): Create a new 
backing store if the size changed.
(WebKit::DrawingAreaProxyCoordinatedGraphics::sendUpdateGeometry): Send 
UpdateGeometry message to the web process.
(WebKit::DrawingAreaProxyCoordinatedGraphics::didUpdateGeometry): If the size 
has changed while waiting for the geometry update call
sendUpdateGeometry() again.
(WebKit::DrawingAreaProxyCoordinatedGraphics::discardBackingStore):
(WebKit::DrawingAreaProxyCoordinatedGraphics::didUpdateBackingStoreState): 
Deleted.
(WebKit::DrawingAreaProxyCoordinatedGraphics::backingStoreStateDidChange): 
Deleted.
(WebKit::DrawingAreaProxyCoordinatedGraphics::sendUpdateBackingStoreState): 
Deleted.
(WebKit::DrawingAreaProxyCoordinatedGraphics::waitForAndDispatchDidUpdateBackingStoreState):
 Deleted.
* 
Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h:
* Source/WebKit/UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::update):
(WebKit::DrawingAreaProxy::didUpdateBackingStoreStateTimeout): Deleted.
(WebKit::DrawingAreaProxy::didUpdateBackingStoreState): Deleted.
* Source/WebKit/UIProcess/DrawingAreaProxy.messages.in: Remove 
DidUpdateBackingStoreState message.
* 
Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp:
(WebKit::DrawingAreaCoordinatedGraphics::forceRepaint): We don't need to force 
repaint again after size change,
since size change already forces a repaint.
(WebKit::DrawingAreaCoordinatedGraphics::setDeviceScaleFactor): Notify the 
WebPage.
(WebKit::DrawingAreaCoordinatedGraphics::setRootCompositingLayer):
(WebKit::DrawingAreaCoordinatedGraphics::layerHostDidFlushLayers):
(WebKit::DrawingAreaCoordinatedGraphics::updateGeometry): Set the new size and 
force a repaint.
(WebKit::DrawingAreaCoordinatedGraphics::enterAcceleratedCompositingMode):
(WebKit::DrawingAreaCoordinatedGraphics::sendEnterAcceleratedCompositingModeIfNeeded):
(WebKit::DrawingAreaCoordinatedGraphics::exitAcceleratedCompositingMode):
(WebKit::DrawingAreaCoordinatedGraphics::display):
(WebKit::DrawingAreaCoordinatedGraphics::updateBackingStoreState): Deleted.
(WebKit::DrawingAreaCoordinatedGraphics::sendDidUpdateBackingStoreState): 
Deleted.
* 
Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.h:
* Source/WebKit/WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::setDeviceScaleFactor):
* Source/WebKit/WebProcess/WebPage/DrawingArea.messages.in:

Canonical link: https://commits.webkit.org/263118@main


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to