Closed Bug 1177149 Opened 4 years ago Closed 4 years ago
Look at why this text effect is slow
This demo runs > 40fps in Chrome, < 1fps in Firefox: http://codepen.io/lbebber/pen/QbMZqO
We repaint the whole layer contents when transform-origin is updated, and painting the layer contents is expensive because it's using opacity. We should stop repainting the layer. Commenting out these lines of code makes it run quite smoothly: https://dxr.mozilla.org/mozilla-central/source/layout/style/nsStyleStruct.cpp#2837-2841
Don't we want nsChangeHint_UpdateTransformLayer|nsChangeHint_UpdatePostTransformOverflow?
Sounds good to me. You know the implications of that better than I do. Want to fix?
Assignee: nobody → matt.woodrow
Attachment #8625969 - Flags: review?(dbaron)
This seems fine for transform-origin, but I'm worried about perspective-origin. We don't use these hints for 'perspective' itself... it's not clear to me that they'll do the right thing for perspective-origin. (For example, would they even be sent to the right frame?)
That's a good point, let's not bother with perspective-origin for now and we can look at solving that properly later.
Attachment #8626212 - Flags: review?(dbaron) → review+
You need to log in before you can comment on or make changes to this bug.