WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
56917
GPU composited content cannot be isolated from other elements on the page
https://bugs.webkit.org/show_bug.cgi?id=56917
Summary
GPU composited content cannot be isolated from other elements on the page
Paul Bakaus
Reported
2011-03-23 04:58:14 PDT
Created
attachment 86604
[details]
Testcase to show perf issue and compositing Hi everyone, at Zynga, we produce scrolling viewports with thousands of <div>'s. A couple of them feature sprite animations, and we want to accelerate them in the GPU, therefore we're adding a translate3d rule to a child node of these. The basic setup is usually a page with lots of absolutely positioned elements. The issue: If you GPU accelerate a single of the elements (or a child of it), all children with a higher z-index or implicit stack index become accelerated as well. Why is this problematic? GPU accelerated elements eat more memory, and nested GPU compositing is slowing down the page tremendously. Open the added testcase in your iPhone and try panning the viewport, which won't be snappy. Now remove the transform from the CSS, and you'll see a huge difference. This is a single element we changed, causing a huge overall performance breakdown on the page, and it will not be apparent to the standard web developer. There a a couple of implementation suggestions to effectively isolate content: 1) If the accelerated element is a child of another, check if the parent is overflow hidden, and then not accelerate anything on the same level than the parent (as nothing can really overlap anyway) 2) Add proximity to the check - if two elements are not close to each other, disable the "leaking" to other elements. I'm looking forward to more suggestions and fixes :) Thanks, Paul
Attachments
Testcase to show perf issue and compositing
(63 bytes, text/plain)
2011-03-23 04:58 PDT
,
Paul Bakaus
no flags
Details
Testcase
(1.88 KB, text/html)
2011-03-23 09:08 PDT
,
Simon Fraser (smfr)
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Simon Fraser (smfr)
Comment 1
2011-03-23 09:08:22 PDT
Created
attachment 86625
[details]
Testcase
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug