Changeset 93679 in webkit
- Timestamp:
- Aug 23, 2011 6:18:00 PM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r93676 r93679 1 2011-08-23 Iain Merrick <husky@google.com> 2 3 [chromium] Renderer crashes when about:gpucrash is loaded 4 https://bugs.webkit.org/show_bug.cgi?id=66814 5 6 WebViewImpl::didRecreateGraphicsContext() was calling 7 setRootLayer() on the CC layer tree, but the root layer 8 doesn't actually change and the code wasn't defensive 9 against this. This CL adds some asserts to catch tree 10 corruption and removes the unnecessary calls. 11 12 Reviewed by James Robinson. 13 14 * platform/graphics/GraphicsLayer.cpp: 15 (WebCore::GraphicsLayer::setParent): 16 * platform/graphics/GraphicsLayer.h: 17 * platform/graphics/chromium/LayerChromium.cpp: 18 (WebCore::LayerChromium::setParent): 19 (WebCore::LayerChromium::hasAncestor): 20 * platform/graphics/chromium/LayerChromium.h: 21 1 22 2011-08-23 Sheriff Bot <webkit.review.bot@gmail.com> 2 23 -
trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp
r93040 r93679 91 91 removeAllChildren(); 92 92 removeFromParent(); 93 } 94 95 void GraphicsLayer::setParent(GraphicsLayer* layer) 96 { 97 ASSERT(!layer || !layer->hasAncestor(this)); 98 m_parent = layer; 93 99 } 94 100 -
trunk/Source/WebCore/platform/graphics/GraphicsLayer.h
r93040 r93679 197 197 198 198 GraphicsLayer* parent() const { return m_parent; }; 199 void setParent(GraphicsLayer* layer) { m_parent = layer; }// Internal use only.199 void setParent(GraphicsLayer*); // Internal use only. 200 200 201 201 // Returns true if the layer has the given layer as an ancestor (excluding self). -
trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.cpp
r93615 r93679 126 126 } 127 127 128 void LayerChromium::setParent(LayerChromium* layer) 129 { 130 ASSERT(!layer || !layer->hasAncestor(this)); 131 m_parent = layer; 132 } 133 134 bool LayerChromium::hasAncestor(LayerChromium* ancestor) const 135 { 136 for (LayerChromium* layer = parent(); layer; layer = layer->parent()) { 137 if (layer == ancestor) 138 return true; 139 } 140 return false; 141 } 142 128 143 void LayerChromium::addChild(PassRefPtr<LayerChromium> child) 129 144 { -
trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.h
r93615 r93679 249 249 void setNeedsCommit(); 250 250 251 void setParent(LayerChromium* parent) { m_parent = parent; } 251 void setParent(LayerChromium*); 252 bool hasAncestor(LayerChromium*) const; 252 253 253 254 size_t numChildren() const -
trunk/Source/WebKit/chromium/ChangeLog
r93654 r93679 1 2011-08-23 Iain Merrick <husky@google.com> 2 3 [chromium] Renderer crashes when about:gpucrash is loaded 4 https://bugs.webkit.org/show_bug.cgi?id=66814 5 6 WebViewImpl::didRecreateGraphicsContext() was calling 7 setRootLayer() on the CC layer tree, but the root layer 8 doesn't actually change and the code wasn't defensive 9 against this. This CL adds some asserts to catch tree 10 corruption and removes the unnecessary calls. 11 12 Reviewed by James Robinson. 13 14 * src/WebViewImpl.cpp: 15 (WebKit::WebViewImpl::didRecreateGraphicsContext): 16 1 17 2011-08-23 Dmitry Lomov <Dmitry Lomov (dslomov@google.com)> 2 18 -
trunk/Source/WebKit/chromium/src/WebViewImpl.cpp
r93625 r93679 2662 2662 void WebViewImpl::didRecreateGraphicsContext(bool success) 2663 2663 { 2664 setRootGraphicsLayer(success ? m_layerTreeHost->rootLayer() : 0); 2665 2666 if (success) { 2667 // Forces ViewHostMsg_DidActivateAcceleratedCompositing to be sent so 2668 // that the browser process can reacquire surfaces. 2669 m_client->didActivateAcceleratedCompositing(true); 2670 if (m_pageOverlay) 2671 m_pageOverlay->update(); 2672 } 2664 // Force ViewHostMsg_DidActivateAcceleratedCompositing to be sent so 2665 // that the browser process can reacquire surfaces. 2666 m_isAcceleratedCompositingActive = false; 2667 setIsAcceleratedCompositingActive(success); 2668 if (success && m_pageOverlay) 2669 m_pageOverlay->update(); 2673 2670 } 2674 2671
Note: See TracChangeset
for help on using the changeset viewer.