Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ac29a5c3090553a6fa69562670f267888d6424d5
      
https://github.com/WebKit/WebKit/commit/ac29a5c3090553a6fa69562670f267888d6424d5
  Author: Carlos Garcia Campos <cgar...@igalia.com>
  Date:   2025-03-19 (Wed, 19 Mar 2025)

  Changed paths:
    M LayoutTests/platform/glib/damage/storage-and-simplification-algorithm.html
    M Source/WebCore/platform/graphics/Damage.h
    M Tools/TestWebKitAPI/PlatformGTK.cmake
    M Tools/TestWebKitAPI/PlatformWPE.cmake
    A Tools/TestWebKitAPI/Tests/WebCore/glib/Damage.cpp

  Log Message:
  -----------
  [GTK][WPE] Wrong vector index calculated in Damage::unite()
https://bugs.webkit.org/show_bug.cgi?id=289955

Reviewed by Alejandro G. Castro.

The problem is that we are using ceiledIntPoint() resulting in cell
indices starting at 1, we should use flooredIntPoint instead to get the
right cell indices starting at 0.
This patch also includes other improvements and cleanups to Damage and a
small change in behavior, now we start doing the unite when adding a new
rectangle that would increase the vector size over the maximum instead
of when the maximum is reached.
The patch also includes a new unit test.

* LayoutTests/platform/glib/damage/storage-and-simplification-algorithm.html:
* Source/WebCore/platform/graphics/Damage.h:
(WebCore::Damage::Damage):
(WebCore::Damage::bounds const):
(WebCore::Damage::resize):
(WebCore::Damage::add):
(WebCore::Damage::uniteExistingRects):
(WebCore::Damage::tileIndexForRect const):
(WebCore::Damage::unite):
(WebCore::Damage::invalidate): Deleted.
(WebCore::Damage::shouldUnite const): Deleted.
* Tools/TestWebKitAPI/PlatformGTK.cmake:
* Tools/TestWebKitAPI/PlatformWPE.cmake:
* Tools/TestWebKitAPI/Tests/WebCore/glib/Damage.cpp: Added.
(TestWebKitAPI::TEST(Damage, Basics)):
(TestWebKitAPI::TEST(Damage, AddRect)):
(TestWebKitAPI::TEST(Damage, AddDamage)):
(TestWebKitAPI::TEST(Damage, Unite)):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to