Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: be500683ac3fc48d208632323325e278b828a2cd
https://github.com/WebKit/WebKit/commit/be500683ac3fc48d208632323325e278b828a2cd
Author: Anthony Tarbinian <[email protected]>
Date: 2025-11-19 (Wed, 19 Nov 2025)
Changed paths:
M Source/WebCore/platform/graphics/GraphicsContext.cpp
M Source/WebCore/platform/graphics/GraphicsContext.h
M Source/WebKit/GPUProcess/graphics/RemoteImageBufferSet.cpp
Log Message:
-----------
RemoteImageBufferSet destructor should use GraphicsContext::unwindStateStack
https://bugs.webkit.org/show_bug.cgi?id=302499
rdar://164675301
Reviewed by Matt Woodrow.
This patch changes the `RemoteImageBufferSet` destructor to use
`GraphicsContext::unwindStateStack`.
Previously, it would call `GraphicsContext::restore` in a loop. However, just
calling `restore`
repeatedely doesn't take into account the different purposes each item on the
stack could have.
This could result in asserts being hit in `GraphicsContext::restore` due to
inconsistent
purposes.
Instead `unwindStateStack` performs different cleanup operations depending on
the purpose
of the item on the stack.
I also had to `WEBCORE_EXPORT` `GraphicsContext::unwindStateStack` to make the
symbol
available to the linker. I also moved it to the `.cpp` file due to an error
about
it being a weak symbol
* Source/WebCore/platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::unwindStateStack):
* Source/WebCore/platform/graphics/GraphicsContext.h:
(WebCore::GraphicsContext::unwindStateStack): Deleted.
* Source/WebKit/GPUProcess/graphics/RemoteImageBufferSet.cpp:
(WebKit::RemoteImageBufferSet::~RemoteImageBufferSet):
Canonical link: https://commits.webkit.org/303296@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications