Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: fea3b372b1651a492a3a7f314b3120b5da15518b https://github.com/WebKit/WebKit/commit/fea3b372b1651a492a3a7f314b3120b5da15518b Author: Carlos Garcia Campos <cgar...@igalia.com> Date: 2024-04-15 (Mon, 15 Apr 2024)
Changed paths: M LayoutTests/TestExpectations A LayoutTests/fast/canvas/canvas-will-read-frequently-expected.txt A LayoutTests/fast/canvas/canvas-will-read-frequently.html M LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d-getcontext-options.any-expected.txt M LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d-getcontext-options.any.worker-expected.txt M LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d-getcontext-options-expected.txt M LayoutTests/inspector/canvas/recording-2d-frameCount-expected.txt M LayoutTests/inspector/canvas/recording-2d-full-expected.txt M LayoutTests/inspector/canvas/recording-2d-memoryLimit-expected.txt M LayoutTests/inspector/canvas/recording-offscreen-canvas-2d-frameCount-expected.txt M LayoutTests/inspector/canvas/recording-offscreen-canvas-2d-full-expected.txt M LayoutTests/inspector/canvas/recording-offscreen-canvas-2d-memoryLimit-expected.txt M LayoutTests/platform/glib/TestExpectations M LayoutTests/platform/gtk/inspector/canvas/context-attributes-expected.txt A PerformanceTests/Canvas/getImageDataCPU.html A PerformanceTests/Canvas/getImageDataGPU.html M Source/JavaScriptCore/inspector/protocol/Canvas.json M Source/WebCore/html/CanvasBase.cpp M Source/WebCore/html/canvas/CanvasRenderingContext.cpp M Source/WebCore/html/canvas/CanvasRenderingContext.h M Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp M Source/WebCore/html/canvas/CanvasRenderingContext2DBase.h M Source/WebCore/html/canvas/CanvasRenderingContext2DSettings.h M Source/WebCore/html/canvas/CanvasRenderingContext2DSettings.idl M Source/WebCore/inspector/InspectorCanvas.cpp Log Message: ----------- Support willReadFrequently for CanvasRenderingContext2D https://bugs.webkit.org/show_bug.cgi?id=244117 Reviewed by Darin Adler. It's used to indicate there will be frequent get image data operations, in which case an accelerated canvas can be slower than unaccelerated one. This patch turns off hardware acceleration for the 2D canvas when willReadFrequently is true in settings. See https://html.spec.whatwg.org/multipage/canvas.html#concept-canvas-will-read-frequently Test: fast/canvas/canvas-will-read-frequently.html * LayoutTests/TestExpectations: Skip the test in all platforms. * LayoutTests/fast/canvas/canvas-will-read-frequently-expected.txt: Added. * LayoutTests/fast/canvas/canvas-will-read-frequently.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d-getcontext-options.any-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d-getcontext-options.any.worker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d-getcontext-options-expected.txt: * LayoutTests/inspector/canvas/recording-2d-frameCount-expected.txt: * LayoutTests/inspector/canvas/recording-2d-full-expected.txt: * LayoutTests/inspector/canvas/recording-2d-memoryLimit-expected.txt: * LayoutTests/inspector/canvas/recording-offscreen-canvas-2d-frameCount-expected.txt: * LayoutTests/inspector/canvas/recording-offscreen-canvas-2d-full-expected.txt: * LayoutTests/inspector/canvas/recording-offscreen-canvas-2d-memoryLimit-expected.txt: * LayoutTests/platform/glib/TestExpectations: * LayoutTests/platform/gtk/inspector/canvas/context-attributes-expected.txt: * PerformanceTests/Canvas/getImageDataCPU.html: Added. * PerformanceTests/Canvas/getImageDataGPU.html: Added. * Source/JavaScriptCore/inspector/protocol/Canvas.json: * Source/WebCore/html/CanvasBase.cpp: (WebCore::CanvasBase::allocateImageBuffer const): * Source/WebCore/html/canvas/CanvasRenderingContext.cpp: (WebCore::CanvasRenderingContext::willReadFrequently const): * Source/WebCore/html/canvas/CanvasRenderingContext.h: * Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp: (WebCore::CanvasRenderingContext2DBase::willReadFrequently const): * Source/WebCore/html/canvas/CanvasRenderingContext2DBase.h: * Source/WebCore/html/canvas/CanvasRenderingContext2DSettings.h: * Source/WebCore/html/canvas/CanvasRenderingContext2DSettings.idl: * Source/WebCore/inspector/InspectorCanvas.cpp: (WebCore::buildObjectForCanvasContextAttributes): Canonical link: https://commits.webkit.org/277494@main 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