Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: cc9c3b0efd451fe6af9db9ff55dc20ad660cabe3
https://github.com/WebKit/WebKit/commit/cc9c3b0efd451fe6af9db9ff55dc20ad660cabe3
Author: Ahmad Saleem <[email protected]>
Date: 2026-08-24 (Mon, 24 Aug 2026)
Changed paths:
M Source/WebCore/html/CanvasBase.cpp
M Source/WebCore/html/CanvasBase.h
Log Message:
-----------
CanvasBase::postProcessPixelBufferResults() takes an rvalue Ref<PixelBuffer>
it never moves
https://bugs.webkit.org/show_bug.cgi?id=322376
rdar://185660088
Reviewed by Gerald Squelart.
postProcessPixelBufferResults() took Ref<PixelBuffer>&& but never moved or
stored it: it forwarded to
CanvasNoiseInjection::postProcessPixelBufferResults(),
which takes PixelBuffer&. std::forward on the non-deduced Ref<PixelBuffer> was
just a cast to rvalue reference. The sole caller passes a PixelBuffer&, so
every WebGL getImageData() materialized a temporary Ref for the duration of
the call, paying a ref()/deref() pair for nothing.
Take PixelBuffer& instead. No behavior change.
* Source/WebCore/html/CanvasBase.cpp:
(WebCore::CanvasBase::postProcessPixelBufferResults const):
* Source/WebCore/html/CanvasBase.h:
Canonical link: https://commits.webkit.org/319739@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications