[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
commit-queue at webkit.org
commit-queue at webkit.org
Wed Dec 22 14:58:11 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 3bbba2ea348af58efa42ff235b13b0c38de21353
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Oct 26 18:18:44 2010 +0000
2010-10-26 Alexey Marinichev <amarinichev at chromium.org>
Reviewed by Kenneth Russell.
[chromium] Check getGraphicsResetStatusARB and reinitialize the
renderer in an error is returned.
https://bugs.webkit.org/show_bug.cgi?id=47848
Tested by failure injection (stopping in the debugger and issuing a
jump as if an error has occurred).
* platform/graphics/chromium/LayerChromium.cpp:
(WebCore::LayerChromium::setLayerRenderer):
* platform/graphics/chromium/LayerRendererChromium.h:
(WebCore::LayerRendererChromium::transferRootLayer): added
2010-10-26 Alexey Marinichev <amarinichev at chromium.org>
Reviewed by Kenneth Russell.
[chromium] Check getGraphicsResetStatusARB and reinitialize the
renderer in an error is returned.
https://bugs.webkit.org/show_bug.cgi?id=47848
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::composite): added getGraphicsResetStatusARB check
(WebKit::WebViewImpl::reallocateRenderer): added
* src/WebViewImpl.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70543 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index f590d16..d7eff38 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-10-26 Alexey Marinichev <amarinichev at chromium.org>
+
+ Reviewed by Kenneth Russell.
+
+ [chromium] Check getGraphicsResetStatusARB and reinitialize the
+ renderer in an error is returned.
+ https://bugs.webkit.org/show_bug.cgi?id=47848
+
+ Tested by failure injection (stopping in the debugger and issuing a
+ jump as if an error has occurred).
+
+ * platform/graphics/chromium/LayerChromium.cpp:
+ (WebCore::LayerChromium::setLayerRenderer):
+ * platform/graphics/chromium/LayerRendererChromium.h:
+ (WebCore::LayerRendererChromium::transferRootLayer): added
+
2010-10-26 Pavel Feldman <pfeldman at chromium.org>
Not reviewed. Touching inspector controller to kick gtk build, removing comments.
diff --git a/WebCore/platform/graphics/chromium/LayerChromium.cpp b/WebCore/platform/graphics/chromium/LayerChromium.cpp
index 79f18f0..f668bbf 100644
--- a/WebCore/platform/graphics/chromium/LayerChromium.cpp
+++ b/WebCore/platform/graphics/chromium/LayerChromium.cpp
@@ -176,8 +176,10 @@ void LayerChromium::setLayerRenderer(LayerRendererChromium* renderer)
{
// If we're changing layer renderers then we need to free up any resources
// allocated by the old renderer.
- if (layerRenderer() && layerRenderer() != renderer)
+ if (layerRenderer() && layerRenderer() != renderer) {
cleanupResources();
+ setNeedsDisplay();
+ }
m_layerRenderer = renderer;
}
diff --git a/WebCore/platform/graphics/chromium/LayerRendererChromium.h b/WebCore/platform/graphics/chromium/LayerRendererChromium.h
index 6a06105..b2a32ee 100644
--- a/WebCore/platform/graphics/chromium/LayerRendererChromium.h
+++ b/WebCore/platform/graphics/chromium/LayerRendererChromium.h
@@ -82,6 +82,7 @@ public:
void setRootLayer(PassRefPtr<LayerChromium> layer) { m_rootLayer = layer; }
LayerChromium* rootLayer() { return m_rootLayer.get(); }
+ void transferRootLayer(LayerRendererChromium* other) { other->m_rootLayer = m_rootLayer.release(); }
bool hardwareCompositing() const { return m_hardwareCompositing; }
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 95fa816..b610602 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,16 @@
+2010-10-26 Alexey Marinichev <amarinichev at chromium.org>
+
+ Reviewed by Kenneth Russell.
+
+ [chromium] Check getGraphicsResetStatusARB and reinitialize the
+ renderer in an error is returned.
+ https://bugs.webkit.org/show_bug.cgi?id=47848
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::composite): added getGraphicsResetStatusARB check
+ (WebKit::WebViewImpl::reallocateRenderer): added
+ * src/WebViewImpl.h:
+
2010-10-26 Kenneth Russell <kbr at google.com>
Reviewed by Andreas Kling.
diff --git a/WebKit/chromium/src/WebViewImpl.cpp b/WebKit/chromium/src/WebViewImpl.cpp
index 929f91a..a062bd3 100644
--- a/WebKit/chromium/src/WebViewImpl.cpp
+++ b/WebKit/chromium/src/WebViewImpl.cpp
@@ -1046,6 +1046,10 @@ void WebViewImpl::composite(bool finish)
// Put result onscreen.
m_layerRenderer->present();
+
+ GraphicsContext3D* context = m_layerRenderer->context();
+ if (context->getGraphicsResetStatusARB() != GraphicsContext3D::NO_ERROR)
+ reallocateRenderer();
#endif
}
@@ -2488,6 +2492,22 @@ void WebViewImpl::doComposite()
// Draw the actual layers...
m_layerRenderer->drawLayers(visibleRect, contentRect);
}
+
+void WebViewImpl::reallocateRenderer()
+{
+ GraphicsContext3D* context = m_layerRenderer->context();
+ RefPtr<GraphicsContext3D> newContext = GraphicsContext3D::create(context->getContextAttributes(), m_page->chrome(), GraphicsContext3D::RenderDirectlyToHostWindow);
+ // GraphicsContext3D::create might fail and return 0, in that case LayerRendererChromium::create will also return 0.
+ RefPtr<LayerRendererChromium> layerRenderer = LayerRendererChromium::create(newContext);
+
+ // Reattach the root layer. Child layers will get reattached as a side effect of updateLayersRecursive.
+ if (layerRenderer)
+ m_layerRenderer->transferRootLayer(layerRenderer.get());
+ m_layerRenderer = layerRenderer;
+
+ // Enable or disable accelerated compositing and request a refresh.
+ setRootGraphicsLayer(m_layerRenderer ? m_layerRenderer->rootLayer() : 0);
+}
#endif
diff --git a/WebKit/chromium/src/WebViewImpl.h b/WebKit/chromium/src/WebViewImpl.h
index 8410ebd..c3fd39e 100644
--- a/WebKit/chromium/src/WebViewImpl.h
+++ b/WebKit/chromium/src/WebViewImpl.h
@@ -410,6 +410,7 @@ private:
void updateRootLayerContents(const WebCore::IntRect&);
void doComposite();
void doPixelReadbackToCanvas(WebCanvas*, const WebCore::IntRect&);
+ void reallocateRenderer();
#endif
WebViewClient* m_client;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list