Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(265)

Unified Diff: Source/WebCore/platform/graphics/chromium/WebGLLayerChromium.cpp

Issue 7274032: Merge 89635 - 2011-06-23 John Bates <jbates@google.com> (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/782/
Patch Set: Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebCore/platform/graphics/chromium/WebGLLayerChromium.h ('k') | Source/WebKit/chromium/ChangeLog » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/platform/graphics/chromium/WebGLLayerChromium.cpp
===================================================================
--- Source/WebCore/platform/graphics/chromium/WebGLLayerChromium.cpp (revision 89959)
+++ Source/WebCore/platform/graphics/chromium/WebGLLayerChromium.cpp (working copy)
@@ -61,9 +61,14 @@
layerRenderer()->removeChildContext(m_context);
}
+bool WebGLLayerChromium::drawsContent() const
+{
+ return (m_context && m_context->getExtensions()->getGraphicsResetStatusARB() == GraphicsContext3D::NO_ERROR);
+}
+
void WebGLLayerChromium::updateCompositorResources()
{
- if (!m_context)
+ if (!drawsContent())
return;
if (!m_contentsDirty)
@@ -103,7 +108,8 @@
void WebGLLayerChromium::setContext(const GraphicsContext3D* context)
{
- if (m_context != context && layerRenderer()) {
+ bool contextChanged = (m_context != context);
+ if (contextChanged && layerRenderer()) {
if (m_context)
layerRenderer()->removeChildContext(m_context);
if (context)
@@ -116,7 +122,7 @@
return;
unsigned int textureId = m_context->platformTexture();
- if (textureId != m_textureId) {
+ if (textureId != m_textureId || contextChanged) {
m_textureChanged = true;
m_textureUpdated = true;
}
« no previous file with comments | « Source/WebCore/platform/graphics/chromium/WebGLLayerChromium.h ('k') | Source/WebKit/chromium/ChangeLog » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698