[webkit-changes] [WebKit/WebKit] faf054: Add initial ImageDataArray as replacement type for...
Gerald Squelart
noreply at github.com
Tue Dec 3 15:27:26 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: faf054788cd86c2302c77d2d5368e342924f982a
https://github.com/WebKit/WebKit/commit/faf054788cd86c2302c77d2d5368e342924f982a
Author: Gerald Squelart <g_squelart at apple.com>
Date: 2024-12-03 (Tue, 03 Dec 2024)
Changed paths:
M Source/WebCore/Sources.txt
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/html/ImageData.cpp
M Source/WebCore/html/ImageData.h
A Source/WebCore/html/ImageDataArray.cpp
A Source/WebCore/html/ImageDataArray.h
Log Message:
-----------
Add initial ImageDataArray as replacement type for ImageData::m_data
https://bugs.webkit.org/show_bug.cgi?id=283939
rdar://problem/140813668
Reviewed by Said Abou-Hallawa.
Currently `ImageData::m_data` is a `Ref<JSC::Uint8ClampedArray>` (corresponding
to ImageData.idl's `attribute ImageDataArray data`), so it can only deal with
byte-sized color components like RGBA.
To allow float16 support (the idl data type will change to something like
`typedef (Uint8ClampedArray or Float16Array) ImageDataArray`), `ImageData::m_data`
should be able to hold other typed-array types, like `JSC::Float16Array`.
As a first step, we'll move the `Ref<JSC::Uint8ClampedArray>` to a separate class,
and that class will eventually handle more types.
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/html/ImageData.cpp:
(WebCore::ImageData::create):
(WebCore::ImageData::ImageData):
(WebCore::ImageData::clone const):
* Source/WebCore/html/ImageData.h:
* Source/WebCore/html/ImageDataArray.cpp: Added.
* Source/WebCore/html/ImageDataArray.h: Added.
(WebCore::ImageDataArray::ImageDataArray):
(WebCore::ImageDataArray::length const):
(WebCore::ImageDataArray::get const):
(WebCore::ImageDataArray::data const):
Canonical link: https://commits.webkit.org/287312@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list