Changeset 126198 in webkit
- Timestamp:
- Aug 21, 2012 3:35:41 PM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r126196 r126198 1 2012-08-21 James Robinson <jamesr@chromium.org> 2 3 [chromium] Should be able to destroy a CCLayerTreeHost without manually setting the root layer 4 https://bugs.webkit.org/show_bug.cgi?id=94631 5 6 Reviewed by Adrienne Walker. 7 8 In the depths of time when dinosaurs roamed the earth, LayerChromium and CCLayerTreeHost were both reference 9 counted and there was a cycle between the root LayerChromium and CCLayerTreeHost. This required all users of 10 CCLayerTreeHost to manually break the cycle by calling setRootLayer(0) before dropping their reference to the 11 host. Nowadays, CCLayerTreeHost has a single owner and LayerChromiums only have a weak pointer to their host 12 so we should just do this cleanup ourselves instead of imposing it on callers. 13 14 Unit test added to LayerChromiumTest.cpp 15 16 * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: 17 (WebCore::CCLayerTreeHost::~CCLayerTreeHost): 18 1 19 2012-08-21 Ulan Degenbaev <ulan@chromium.org> 2 20 -
trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp
r126046 r126198 114 114 CCLayerTreeHost::~CCLayerTreeHost() 115 115 { 116 if (m_rootLayer) 117 m_rootLayer->setLayerTreeHost(0); 116 118 ASSERT(CCProxy::isMainThread()); 117 119 TRACE_EVENT0("cc", "CCLayerTreeHost::~CCLayerTreeHost"); -
trunk/Source/WebKit/chromium/ChangeLog
r126174 r126198 1 2012-08-21 James Robinson <jamesr@chromium.org> 2 3 [chromium] Should be able to destroy a CCLayerTreeHost without manually setting the root layer 4 https://bugs.webkit.org/show_bug.cgi?id=94631 5 6 Reviewed by Adrienne Walker. 7 8 Tests that destroying a CCLayerTreeHost that still points to a non-null root doesn't crash. 9 10 * tests/LayerChromiumTest.cpp: 11 1 12 2012-08-21 James Robinson <jamesr@chromium.org> 2 13 -
trunk/Source/WebKit/chromium/tests/LayerChromiumTest.cpp
r125932 r126198 804 804 } 805 805 806 TEST(LayerChromiumLayerTreeHostTest, destroyHostWithNonNullRootLayer) 807 { 808 WebKit::WebCompositor::initialize(0); 809 RefPtr<LayerChromium> root = LayerChromium::create(); 810 RefPtr<LayerChromium> child = LayerChromium::create(); 811 root->addChild(child); 812 OwnPtr<FakeCCLayerTreeHost> layerTreeHost(FakeCCLayerTreeHost::create()); 813 layerTreeHost->setRootLayer(root); 814 layerTreeHost.clear(); 815 WebKit::WebCompositor::shutdown(); 816 } 817 806 818 class MockLayerChromium : public LayerChromium { 807 819 public:
Note: See TracChangeset
for help on using the changeset viewer.