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

Unified Diff: Source/WebCore/platform/graphics/chromium/Canvas2DLayerChromium.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
Index: Source/WebCore/platform/graphics/chromium/Canvas2DLayerChromium.cpp
===================================================================
--- Source/WebCore/platform/graphics/chromium/Canvas2DLayerChromium.cpp (revision 89959)
+++ Source/WebCore/platform/graphics/chromium/Canvas2DLayerChromium.cpp (working copy)
@@ -35,6 +35,7 @@
#include "Canvas2DLayerChromium.h"
#include "DrawingBuffer.h"
+#include "Extensions3DChromium.h"
#include "GraphicsContext3D.h"
#include "LayerRendererChromium.h"
@@ -59,9 +60,17 @@
layerRenderer()->removeChildContext(m_drawingBuffer->graphicsContext3D().get());
}
+bool Canvas2DLayerChromium::drawsContent() const
+{
+ GraphicsContext3D* context;
+ return (m_drawingBuffer
+ && (context = m_drawingBuffer->graphicsContext3D().get())
+ && (context->getExtensions()->getGraphicsResetStatusARB() == GraphicsContext3D::NO_ERROR));
+}
+
void Canvas2DLayerChromium::updateCompositorResources()
{
- if (!m_contentsDirty || !m_drawingBuffer)
+ if (!m_contentsDirty || !drawsContent())
return;
if (m_textureChanged) { // We have to generate a new backing texture.
GraphicsContext3D* context = layerRendererContext();

Powered by Google App Engine
This is Rietveld 408576698