Branch: refs/heads/webkitglib/2.46 Home: https://github.com/WebKit/WebKit Commit: 98a3e23efd46f9fc9f8910ca6b1cba7ff1ca793f https://github.com/WebKit/WebKit/commit/98a3e23efd46f9fc9f8910ca6b1cba7ff1ca793f Author: Adrian Perez de Castro <ape...@igalia.com> Date: 2024-11-19 (Tue, 19 Nov 2024)
Changed paths: M Source/WebCore/platform/graphics/skia/ImageBufferSkiaAcceleratedBackend.cpp Log Message: ----------- Cherry-pick 286795@main (3ca14e7517d7). https://bugs.webkit.org/show_bug.cgi?id=282915 [GTK][WPE][Skia] Avoid temporary copies in getImageData() https://bugs.webkit.org/show_bug.cgi?id=282915 Reviewed by Carlos Garcia Campos. Change ImageBufferSkiaAcceleratedBackend::getPixelBuffer() to avoid making a temporary scratch buffer with the same size as the canvas backing SkSurface on each canvas.getImageData() invocation. As in 285116@main, avoid using the ImageBufferBackend::getPixelBuffer() helper on a temporary buffer, bring inline the needed calculations for the source/destination areas, and wrap the PixelBuffer with a SkPixmap that then gets passed directly to Skia. This way we can always let Skia do the needed pixel format and alpha component type conversions. On top of reducing memory usage, this makes the MotionMark Canvas put/get Image Data test ~10x faster. Covered by existing layout tests. * Source/WebCore/platform/graphics/skia/ImageBufferSkiaAcceleratedBackend.cpp: (WebCore::ImageBufferSkiaAcceleratedBackend::getPixelBuffer): Canonical link: https://commits.webkit.org/286795@main Canonical link: https://commits.webkit.org/282416.289@webkitglib/2.46 To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes