Branch: refs/heads/webkitglib/2.48
Home: https://github.com/WebKit/WebKit
Commit: 21ecb44b467c0f4face8e5d639bdde7ec78efcdd
https://github.com/WebKit/WebKit/commit/21ecb44b467c0f4face8e5d639bdde7ec78efcdd
Author: Mihaela Dumitru <[email protected]>
Date: 2025-09-12 (Fri, 12 Sep 2025)
Changed paths:
M Source/WebCore/platform/graphics/Gradient.h
M Source/WebCore/platform/graphics/skia/GradientSkia.cpp
Log Message:
-----------
Cherry-pick 299797@main (22cffb4048e7).
https://bugs.webkit.org/show_bug.cgi?id=298220
Don't use m_shader cache and create a new one for each draw
https://bugs.webkit.org/show_bug.cgi?id=298220
Reviewed by Carlos Garcia Campos.
The usage of `m_shader` doesn't seem to be safe. It seems to me that a
Gradient
might be used by different threads. They both can check that the shader is
not set and then try to create it. The first one creates it and then tries
to
use it and the second one will then create a new one and free the first one.
I could see two threads that use `WebCore::Gradient::fill()` which ended
up in `SkShaderBase::makeContext()` crash.
This commit removes the `m_shader` cache and always creates a new shader for
each draw. This is probably more expensive, but maybe not that much.
If I remove the use of the shader cache, the crash goes away.
* Source/WebCore/platform/graphics/Gradient.h:
* Source/WebCore/platform/graphics/skia/GradientSkia.cpp:
(Gradient::shader): Modified
Canonical link: https://commits.webkit.org/299797@main
Canonical link: https://commits.webkit.org/290945.371@webkitglib/2.48
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