Open Bug 1793982 Opened 2 years ago Updated 2 years ago

A lot of time spent reading back from 2d canvas on google maps on windows

Categories

(Core :: Graphics: Canvas2D, defect, P3)

defect

Tracking

()

People

(Reporter: nical, Unassigned)

References

(Blocks 1 open bug)

Details

It looks like this is at the intersection between canvas2D and WebGL.

When profiling google maps, we found that on Windows (but not on Linux and Mac) a lot of time was spent on the content process main thread reading back a 2D canvas in GetDataSurface. We didn't delve into what exactly was causing this but our initial assumption is that a D2D canvas is used to draw some things and is read back in order to be uploaded into a WebGL texture for use in the main map rendering logic.

It would be good to confirm that, and see whether we should:

  • default to non-accelerated canvas in this specific case via a heuristic,
  • or support transparently copying a GPU-side canvas2d texture into a WebGL texture.
Summary: A lot of time spent reading back from 2d canvas on google maps → A lot of time spent reading back from 2d canvas on google maps on windows

At Nical's request, here's a profile: https://share.firefox.dev/3T3WQKJ

The getImageData chunk is very visible when using the flamegraph view on the content process main thread.

You need to log in before you can comment on or make changes to this bug.