0
Files
src/third_party/blink/web_tests
Jean-Philippe Gravel 0a430386ce Fix IsAccelerated for OffscreenCanvas
IsAccelerated for OffscreenCanvas always returned false. That's
because IsAccelerated is implemented using GetRasterMode [1], and
GetRasterMode early aborts if preferred_2d_raster_mode() is
kPreferCPU. This however is the default value and the preferred
raster mode is only ever set for HTMLCanvasElement. Thus, for
OffscreenCanvas, GetRasterMode() always returns kCPU.

This CL removes the early abort in GetRasterMode, which should be a
safe since the check on preferred_2d_raster_mode() is repeated a
second time below, in ShouldTryToUseGpuRaster().

[1]: https://crsrc.org/c/third_party/blink/renderer/modules/canvas/canvas2d/canvas_2d_recorder_context.cc;l=2942;drc=e08e8c85cbaa594c61e0235319dcc08b1ed3560e
[2]: https://crsrc.org/c/third_party/blink/renderer/platform/graphics/canvas_resource_host.cc;l=101;drc=e08e8c85cbaa594c61e0235319dcc08b1ed3560e

Fixed: 403282523
Change-Id: I2ed4816edd4fc711f1a41174ab6b2bcdbd7666b9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6355067
Reviewed-by: Colin Blundell <blundell@chromium.org>
Commit-Queue: Jean-Philippe Gravel <jpgravel@chromium.org>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1433880}
2025-03-17 16:56:26 -07:00
..
2025-03-07 13:39:43 -08:00
2025-03-17 13:02:20 -07:00
2025-03-04 09:20:42 -08:00
2025-03-13 09:43:19 -07:00
2025-02-12 07:39:07 -08:00

The documentation for this directory is at:

WPT Configuration

There are some special files under this directory for adapting web platform tests for Blink:

  • web_tests/external/wpt/.config.json: wptserve configuration file for overriding default routes and ports. Note that filesystem paths are relative to blink/web_tests and will be changed to absolute path at run time for wptserve to consume. When changing the ports (HTTP/S, WS/S), make sure to also:
    • Update WPT_HOST_AND_PORTS in //third_party/blink/tools/blinkpy/web_tests/port/driver.py
    • Update WebTestContentBrowserClient::GetOriginsRequiringDedicatedProcess