[Webkit-unassigned] [Bug 78404] [chromium] Replace RefPtr with OwnPtr for CCLayerImpl tree structure

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 22 11:28:27 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=78404





--- Comment #15 from Tien-Ren Chen <trchen at chromium.org>  2012-02-22 11:28:27 PST ---
(In reply to comment #14)
> (In reply to comment #12)
> > (In reply to comment #11)
> > > (From update of attachment 127271 [details] [details] [details])
> > > View in context: https://bugs.webkit.org/attachment.cgi?id=127271&action=review
> > > 
> > > I think this is looking quite good.  I would like to see the mask/replica issue resolved and I have a style quibble with the way many of the tests have been transformed, but otherwise this looks great and I'd like to make this change ASAP.
> > > 
> > > > Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.cpp:-327
> > > > -    if (m_maskLayer == maskLayer)
> > > > -        return;
> > > > -
> > > 
> > > does this mean that we'll always call noteLayerPropertyChangedForSubtree() even if we're setting the mask layer to the same thing it used to be? that'll pretty much completely disable scissoring and any other damage tracking based optimizations for pages that have masks or replicas :/
> > > 
> > > is there any way to preserve this?  maybe use IDs instead of pointers if we need to?
> > 
> > By using PassOwnPtr/OwnPtr we automatically prevent this from happening. Comparing two own pointers should always return false because an object can't be owned by two at the same time. (wtf emits compile error if you try to compare)
> > 
> 
> I know the pointer value will not match.  That's not the point. Logically, the mask and replica layers will very frequently be the same from one tree sync to the next.  It's important for performance that we know if the mask/replicas are they same as they were on the previous frame or not.  If we don't track this, then we have to assume that it's changed and redraw the layer completely after every sync which would suck.
> 
> One potential solution since we can't rely on pointer identity with this patch would be to compare layer IDs to that on the previous frame.

Ah, I see what you mean. That's indeed a tricky problem. I think layer ID is the way to go. Will solve this in next patch.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list