Currently we recompute isSelfPaintingLayer() every time the function is called. I have seen this function showing up on some benchmarks when scrolling on big tables such as http://dglazkov.github.com/performance-tests/biggrid.html. The painting code checks this boolean several time per paint phase so it should help both the self-painting and the non-self-painting layers. Patch forthcoming.
Created attachment 146132 [details] Proposed change.
Comment on attachment 146132 [details] Proposed change. View in context: https://bugs.webkit.org/attachment.cgi?id=146132&action=review > Source/WebCore/rendering/RenderLayer.cpp:4667 > || renderer()->hasReflection() can this change after the RenderLayer is created?
Comment on attachment 146132 [details] Proposed change. Seems like hasMask() could also change, as well as some of the isNormalFlowOnly() criteria.
You could cache it between styleChanged() calls maybe.
Ah, I see you've hooked styleChanged.
Comment on attachment 146132 [details] Proposed change. Oh, I see you update it in styleChanged(). Should be OK. I guess you could assert that m_isSelfPaintingLayer == shouldBeSelfPaintingLayer() in painting, but that's probably overkill.
Please no fighting, style change is covered! :) (In reply to comment #6) > (From update of attachment 146132 [details]) > Oh, I see you update it in styleChanged(). Should be OK. I guess you could assert that m_isSelfPaintingLayer == shouldBeSelfPaintingLayer() in painting, but that's probably overkill. It's possible but if this were to happen I would expect a lot of the code to break pretty badly (it would mean we start mutating the style without notifying us). Also shouldBeNormalFlowOnly has been working pretty well for some time without bug that I know of.
Comment on attachment 146132 [details] Proposed change. Clearing flags on attachment: 146132 Committed r119676: <http://trac.webkit.org/changeset/119676>
All reviewed patches have been landed. Closing bug.