[webkit-changes] [WebKit/WebKit] 379280: [CoordinatedGraphics] Simplify CoordinatedBackingS...

Carlos Garcia Campos noreply at github.com
Thu Oct 24 05:32:36 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 37928048f89d8d8cd14c6b322a9bc7fbdbd78e01
      https://github.com/WebKit/WebKit/commit/37928048f89d8d8cd14c6b322a9bc7fbdbd78e01
  Author: Carlos Garcia Campos <cgarcia at igalia.com>
  Date:   2024-10-24 (Thu, 24 Oct 2024)

  Changed paths:
    M Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedBackingStoreProxy.cpp
    M Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedBackingStoreProxy.h

  Log Message:
  -----------
  [CoordinatedGraphics] Simplify CoordinatedBackingStoreProxy
https://bugs.webkit.org/show_bug.cgi?id=282035

Reviewed by Miguel Gomez.

This patch includes several improvements:

 - Removes the m_previousContentsRect since we already check if the
   contents rect changed.
 - Rename createTiles as createOrDestroyTiles since it also destroys
   tiles.
 - Use HashMap::removeIf when destroying tiles to avoid iterating twice.
 - Remove setCoverRect() and just set the m_coverRect when needed.
 - Remove setKeepRect() and drop the tiles outsice the new keep rect
   after the value is changed.
 - Remove resizeEdgeTiles() and do the iteration to remove or resize the
   tiles when contents rect changes.
 - Change computeCoverAndKeepRect() to return a std::pair.
 - Remove tileDistance and use a lambda doing the visible center
   position calculation once.

* Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedBackingStoreProxy.cpp:
(WebCore::CoordinatedBackingStoreProxy::setContentsScale):
(WebCore::CoordinatedBackingStoreProxy::updateIfNeeded):
(WebCore::CoordinatedBackingStoreProxy::createOrDestroyTiles):
(WebCore::CoordinatedBackingStoreProxy::computeCoverAndKeepRect const):
(WebCore::CoordinatedBackingStoreProxy::tileDistance const): Deleted.
(WebCore::CoordinatedBackingStoreProxy::createTiles): Deleted.
(WebCore::CoordinatedBackingStoreProxy::resizeEdgeTiles): Deleted.
(WebCore::CoordinatedBackingStoreProxy::setKeepRect): Deleted.
* Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedBackingStoreProxy.h:
(WebCore::CoordinatedBackingStoreProxy::setCoverRect): Deleted.

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list