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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Feb 14 00:41:01 PST 2012


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


James Robinson <jamesr at chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #126837|review?                     |review-
               Flag|                            |




--- Comment #7 from James Robinson <jamesr at chromium.org>  2012-02-14 00:41:01 PST ---
(From update of attachment 126837)
View in context: https://bugs.webkit.org/attachment.cgi?id=126837&action=review

Unfortunately we can't change the main thread LayerList type away from RefPtr<> at this time.  This may be a show-stopper, at the least I can't think of a simple way to resolve this with the way we share templated code.  Perhaps there is a way with more template indirection but at that point the whole thing becomes less appealing.

> Source/WebCore/platform/graphics/chromium/TreeSynchronizer.h:49
> +    typedef HashMap<int, OwnPtr<CCLayerImpl> > CCLayerImplMap;
>  
> -    typedef HashMap<int, RefPtr<CCLayerImpl> > CCLayerImplMap;
> +    TreeSynchronizer(); // Not instantiable.

no reason to switch the order of these two lines

> Source/WebCore/platform/graphics/chromium/TreeSynchronizer.h:-50
> -    // Declared as static member functions so they can access functions on LayerChromium as a friend class.

I found this comment helpful - did you not?

> Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h:206
> +    typedef Vector<LayerChromium*> LayerList;

Woah - I don't think we can do this at all.  We need the LayerLists on the main thread side (such as CCLayerTreeHost::m_updateList) to retain references to their layers because calling into WebKit to paint will sometimes cause the layer tree to get mutated and we can't risk a dangling pointer.

-- 
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