[webkit-changes] [WebKit/WebKit] ed9a48: imageBytesForSource should only copy the required ...
Alex Christensen
noreply at github.com
Mon Mar 4 20:22:36 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: ed9a48d72012671cf9e92c59f443855d48ea55e1
https://github.com/WebKit/WebKit/commit/ed9a48d72012671cf9e92c59f443855d48ea55e1
Author: Alex Christensen <achristensen at apple.com>
Date: 2024-03-04 (Mon, 04 Mar 2024)
Changed paths:
A LayoutTests/fast/webgpu/image-data-8-bytes-per-pixel-expected.txt
A LayoutTests/fast/webgpu/image-data-8-bytes-per-pixel.html
M Source/WebCore/Modules/WebGPU/GPUQueue.cpp
Log Message:
-----------
imageBytesForSource should only copy the required bytes for images with more than 4 bytes per pixel
https://bugs.webkit.org/show_bug.cgi?id=270493
rdar://123810952
Reviewed by Mike Wyrzykowski.
Also use early returns to remove deeply nested if statements.
Also use smart pointers to retain and release images while using them.
* LayoutTests/fast/webgpu/image-data-8-bytes-per-pixel-expected.txt: Added.
* LayoutTests/fast/webgpu/image-data-8-bytes-per-pixel.html: Added.
* Source/WebCore/Modules/WebGPU/GPUQueue.cpp:
(WebCore::imageBytesForSource):
Canonical link: https://commits.webkit.org/275671@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