Find a new way to implement rounded corners |
|||||
Issue descriptionA lot of animation jank seems to be coming from the use of Mask Layers to create rounded corners. This combined with background blur adds a lot of additional steps in the paint/rendering pipeline. The performance (fps increase) and memory improvement (tiles dont get discarded and we actually see the content) is quite significant on Nocturne Celeron when rounded corners are removed. Copying notes from the discussion thread on how rounded corners can be implemented differently: Enne-> (1) composite to a render pass, raster a mask, apply mask to render pass texture when drawing (current approach) (2) composite to a render pass, apply mask to render pass via shader when drawing (3) apply mask to to individual quads via shader when drawing, assuming no other reasons for a render pass Approach #3 will have incorrect blending if any of the quads overlap underneath one of the rounded corners. #3 also drops the intermediate texture use. It seems like something that ui code could opt into, and maybe something we could detect / see how it looks for the web in general if this was something we wanted to explore there as well as an optimization. Oshima-> It would be great if we can clip the layer instead of using a mask. The clipping can reduce intermediate texture usage and can also support animations(similar to android animation) which are currently blocked because there is no optimal way to achieve it right now.
,
Nov 13
I have recorded traces with and without rounded corner masks but I am not sure what I am looking for. Trace categories recorded: benchmark, GPU, toplevel, ui
,
Nov 13
I don't see any gpu trace in the WithMask trace. Could we also add gpu_decoder, gpu.device and gpu.service so we can get an idea of the cost on the GPU. It'd be also nice if you could close your tabs before taking a trace, we're not interested in your browsing habits. :)
,
Nov 13
> I don't see any gpu trace in the WithMask trace. I must have missed it. Uploading them again with gpu, gpu.service, gpu_decoder and gpu.device. Both traces were run with the same windows open and the same operations were performed. (Record -> Go to Overview mode -> Pick a window -> Swipe down from top-> Pick window that is running Trace -> Stop Tracing) > It'd be also nice if you could close your tabs before taking a trace, we're not interested in your browsing habits I needed different webpages to create windows for analyzing window animations that use rounded corners. Used only 4 windows this time.
,
Nov 13
Actually attaching the trace
,
Nov 14
More traces. Without mask means commenting out a call to ui::Layer::SetLayerMask() whereever the mask layer being set was for generating a rounded corner.
,
Nov 14
,
Nov 14
Can you summarize the trace results here?
,
Dec 7
,
Dec 9
>The performance (fps increase) and memory improvement (tiles dont get discarded and we actually see the content) is quite significant on Nocturne Celeron when rounded corners are removed. Would you consider disabling rounded corners until this is worked out? Why make people suffer, especially since overview mode is the primary way to switch windows in tablet mode?
,
Dec 10
#10 The rounded corners are currently disabled during most of overview animations.
,
Dec 10
#11 which CrOS version are they disabled on, because on my i7/16 GB eve running Version 71.0.3578.85 (Official Build) beta (64-bit), overview mode stutters when rendering, and the render is full of errors. See attached.
,
Dec 10
That's known issue and will be addressed separately. While disabling will improve the situation, it won't fix the root cause. (it exceeds GPU memory limit we impose)
,
Dec 31
Am having an issue with game performance as well due most likely to this same problem. Samsung Chromebook Plus 2017 version (KEVIN) Device internals contained in attached PDF. Multiple feedbacks sent.
,
Jan 10
In addition here are some further GPU specs relating to poor GPU performance that may assist you.
,
Jan 10
,
Today
(7 hours ago)
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by dcasta...@chromium.org
, Nov 8