[webkit-reviews] review denied: [Bug 78404] [chromium] Replace RefPtr with OwnPtr for CCLayerImpl tree structure : [Attachment 126837] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Feb 14 00:41:01 PST 2012
James Robinson <jamesr at chromium.org> has denied Tien-Ren Chen
<trchen at chromium.org>'s request for review:
Bug 78404: [chromium] Replace RefPtr with OwnPtr for CCLayerImpl tree structure
https://bugs.webkit.org/show_bug.cgi?id=78404
Attachment 126837: Patch
https://bugs.webkit.org/attachment.cgi?id=126837&action=review
------- Additional Comments from James Robinson <jamesr at chromium.org>
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.
More information about the webkit-reviews
mailing list