Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 778bd4f4d7c38ce8a9cb0b2882d80697abc5eb6a
      
https://github.com/WebKit/WebKit/commit/778bd4f4d7c38ce8a9cb0b2882d80697abc5eb6a
  Author: Kimmo Kinnunen <[email protected]>
  Date:   2025-04-11 (Fri, 11 Apr 2025)

  Changed paths:
    M Source/WebCore/platform/graphics/Color.cpp
    M Source/WebCore/platform/graphics/Color.h
    M Tools/TestWebKitAPI/Tests/WebCore/ColorTests.cpp

  Log Message:
  -----------
  GPUP: Frequent draw state changes spend time in Color copying
https://bugs.webkit.org/show_bug.cgi?id=291360
rdar://148979107

Reviewed by Sam Weinig.

Inline Color copy and move operations. They show up in traces that do
frequent drawing and state changes. GraphicsContext state holds Color
instances.

Fix a subtle bug with operator=(Color&&), where the moved-from source
was intended to be invalidated but in some cases was not.

Fix a bug in ColorTests where MoveAssignment test tested move
construction.

Changes the perf profile of operator=(const Color&), where only
bytewise equal instances skip ref/unref. Ref/unref on equal but distinct
out-of-line pointers is guessed to be faster than deep equality compare
of out-of-line colors.

* Source/WebCore/platform/graphics/Color.cpp:
(WebCore::Color::operator=): Deleted.
* Source/WebCore/platform/graphics/Color.h:
(WebCore::Color::Color):
(WebCore::Color::operator=):
* Tools/TestWebKitAPI/Tests/WebCore/ColorTests.cpp:
(TestWebKitAPI::TEST(Color, MoveAssignment)):

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



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

Reply via email to