Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 6077d760365fd2382029143301a81e4b8b55d5f8
https://github.com/WebKit/WebKit/commit/6077d760365fd2382029143301a81e4b8b55d5f8
Author: Gerald Squelart <[email protected]>
Date: 2026-08-03 (Mon, 03 Aug 2026)
Changed paths:
M Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp
M Source/WebCore/html/canvas/CanvasRenderingContext2DBase.h
M Source/WebCore/platform/graphics/ArrayPixelBuffer.cpp
M Source/WebCore/platform/graphics/ArrayPixelBuffer.h
Log Message:
-----------
CanvasRenderingContext2DBase should cache a generic ArrayPixelBuffer
https://bugs.webkit.org/show_bug.cgi?id=320773
rdar://183778041
Reviewed by Mike Wyrzykowski.
CanvasRenderingContext2DBase could only cache RGBA8 ImageData objects.
Using an ArrayPixelBuffer allows CanvasRenderingContext2DBase to cache
float16 ImageData as well, and any future pixel format.
Covered by existing tests.
* Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp:
(WebCore::CanvasRenderingContext2DBase::CachedContentsImageData::CachedContentsImageData):
(WebCore::CanvasRenderingContext2DBase::cacheImageDataIfPossible):
(WebCore::CanvasRenderingContext2DBase::makeImageDataIfContentsCached const):
(WebCore::CanvasRenderingContext2DBase::getImageData const):
* Source/WebCore/html/canvas/CanvasRenderingContext2DBase.h:
* Source/WebCore/platform/graphics/ArrayPixelBuffer.cpp:
(WebCore::ArrayPixelBuffer::tryCreate):
* Source/WebCore/platform/graphics/ArrayPixelBuffer.h:
Canonical link: https://commits.webkit.org/318518@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications