0
Files
src/third_party
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-13 02:02:44 -07:00
2025-02-28 12:22:34 -08:00
2025-03-06 15:55:16 -08:00
2025-03-13 14:05:24 -07:00
2025-03-06 14:47:39 -08:00
2025-03-06 14:47:39 -08:00
2025-03-06 12:18:47 -08:00
2025-03-06 14:48:34 -08:00
2025-03-06 14:47:25 -08:00
2025-03-06 14:48:51 -08:00
2025-03-05 23:21:21 -08:00
2025-03-13 14:05:24 -07:00
2025-03-17 13:42:48 -07:00
2025-03-03 10:31:09 -08:00
2025-03-04 07:48:08 -08:00
2025-03-13 14:05:24 -07:00

The third_party directory contains sources from other projects.

For guidelines on adding a new package to the third_party directory can be found at //docs/adding_to_third_party.md