Changeset 70543 in webkit
- Timestamp:
- Oct 26, 2010 11:18:44 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r70535 r70543 1 2010-10-26 Alexey Marinichev <amarinichev@chromium.org> 2 3 Reviewed by Kenneth Russell. 4 5 [chromium] Check getGraphicsResetStatusARB and reinitialize the 6 renderer in an error is returned. 7 https://bugs.webkit.org/show_bug.cgi?id=47848 8 9 Tested by failure injection (stopping in the debugger and issuing a 10 jump as if an error has occurred). 11 12 * platform/graphics/chromium/LayerChromium.cpp: 13 (WebCore::LayerChromium::setLayerRenderer): 14 * platform/graphics/chromium/LayerRendererChromium.h: 15 (WebCore::LayerRendererChromium::transferRootLayer): added 16 1 17 2010-10-26 Pavel Feldman <pfeldman@chromium.org> 2 18 -
trunk/WebCore/platform/graphics/chromium/LayerChromium.cpp
r70010 r70543 177 177 // If we're changing layer renderers then we need to free up any resources 178 178 // allocated by the old renderer. 179 if (layerRenderer() && layerRenderer() != renderer) 179 if (layerRenderer() && layerRenderer() != renderer) { 180 180 cleanupResources(); 181 setNeedsDisplay(); 182 } 181 183 182 184 m_layerRenderer = renderer; -
trunk/WebCore/platform/graphics/chromium/LayerRendererChromium.h
r70010 r70543 83 83 void setRootLayer(PassRefPtr<LayerChromium> layer) { m_rootLayer = layer; } 84 84 LayerChromium* rootLayer() { return m_rootLayer.get(); } 85 void transferRootLayer(LayerRendererChromium* other) { other->m_rootLayer = m_rootLayer.release(); } 85 86 86 87 bool hardwareCompositing() const { return m_hardwareCompositing; } -
trunk/WebKit/chromium/ChangeLog
r70534 r70543 1 2010-10-26 Alexey Marinichev <amarinichev@chromium.org> 2 3 Reviewed by Kenneth Russell. 4 5 [chromium] Check getGraphicsResetStatusARB and reinitialize the 6 renderer in an error is returned. 7 https://bugs.webkit.org/show_bug.cgi?id=47848 8 9 * src/WebViewImpl.cpp: 10 (WebKit::WebViewImpl::composite): added getGraphicsResetStatusARB check 11 (WebKit::WebViewImpl::reallocateRenderer): added 12 * src/WebViewImpl.h: 13 1 14 2010-10-26 Kenneth Russell <kbr@google.com> 2 15 -
trunk/WebKit/chromium/src/WebViewImpl.cpp
r70302 r70543 1047 1047 // Put result onscreen. 1048 1048 m_layerRenderer->present(); 1049 1050 GraphicsContext3D* context = m_layerRenderer->context(); 1051 if (context->getGraphicsResetStatusARB() != GraphicsContext3D::NO_ERROR) 1052 reallocateRenderer(); 1049 1053 #endif 1050 1054 } … … 2489 2493 m_layerRenderer->drawLayers(visibleRect, contentRect); 2490 2494 } 2495 2496 void WebViewImpl::reallocateRenderer() 2497 { 2498 GraphicsContext3D* context = m_layerRenderer->context(); 2499 RefPtr<GraphicsContext3D> newContext = GraphicsContext3D::create(context->getContextAttributes(), m_page->chrome(), GraphicsContext3D::RenderDirectlyToHostWindow); 2500 // GraphicsContext3D::create might fail and return 0, in that case LayerRendererChromium::create will also return 0. 2501 RefPtr<LayerRendererChromium> layerRenderer = LayerRendererChromium::create(newContext); 2502 2503 // Reattach the root layer. Child layers will get reattached as a side effect of updateLayersRecursive. 2504 if (layerRenderer) 2505 m_layerRenderer->transferRootLayer(layerRenderer.get()); 2506 m_layerRenderer = layerRenderer; 2507 2508 // Enable or disable accelerated compositing and request a refresh. 2509 setRootGraphicsLayer(m_layerRenderer ? m_layerRenderer->rootLayer() : 0); 2510 } 2491 2511 #endif 2492 2512 -
trunk/WebKit/chromium/src/WebViewImpl.h
r70302 r70543 411 411 void doComposite(); 412 412 void doPixelReadbackToCanvas(WebCanvas*, const WebCore::IntRect&); 413 void reallocateRenderer(); 413 414 #endif 414 415
Note: See TracChangeset
for help on using the changeset viewer.