[Blink] CHECK context is composited when creating CC layer in canvas HTMLCanvasElement::GetOrCreateCcLayerIfNeeded() currently short-circuits out if IsCompositedForCanvas2D() is false. Its one production callsite is here [1]. That method in turn is called in production for Canvas2D only in these two places [2][3], both of which are guarded by CanvasRenderingContext2D::IsComposited() being true. The latter method returning true implies that IsCompositedForCanvas2D() is also true [4], so we can replace this early-out with a CHECK. [1] https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.cc;l=1007;drc=fd05369b5220d9daae714f450e099d070a841262;bpv=1;bpt=1 [2] https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/html/canvas/html_canvas_element.cc;l=2187-2188;drc=fd05369b5220d9daae714f450e099d070a841262 [3] https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/layout/layout_html_canvas.cc;l=84;drc=fd05369b5220d9daae714f450e099d070a841262 [4] https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.cc;l=209;drc=fd05369b5220d9daae714f450e099d070a841262;bpv=1;bpt=1 Bug: 352263194 Change-Id: Ib53818d60a14fccac7b0bcde247dcf380c6f31e8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6798013 Commit-Queue: Colin Blundell <blundell@chromium.org> Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org> Cr-Commit-Position: refs/heads/main@{#1494630}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure.
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.