2d offscreen canvas causes GPU switch on macbook |
|||
Issue descriptionhttps://static-misc.glitch.me/offscreen-rotate/ This demo gets pixel data for a rotated large bitmap. On a 2017 Macbook pro, performing the operation locally takes 220ms. Performing the operation on an offscreen canvas takes 1400ms, as it causes a GPU switch. To recreate the issue, you need to start with the integrated GPU active. In our use-case (squoosh.app), we want to perform image processing in a worker, and kill the worker if it's idle. In our case, switching GPU is unnecessary (it just wastes the user's battery) and causes major jank during the switch. I've attached a trace where I click each button, first performing the operation on a local canvas, then an offscreen canvas.
,
Nov 19
,
Nov 29
Another use-case on the same site (https://squoosh.app): With large images, canvas.putImageData is becoming a bit of a main thread bottleneck for us. Obviously the answer is offscreen canvas, but we can't use it since the GPU-switch jank is worse than the jank we're trying to avoid.
,
Nov 30
I could reproduce it. We shouldn't be doing this. fserb@ could you please take a look? |
|||
►
Sign in to add a comment |
|||
Comment 1 by masonfreed@chromium.org
, Nov 19Status: Assigned (was: Untriaged)