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

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

Issue 7671031: Merge 92520 - [chromium] Accelerated canvas breaks when moving canvases or resources between Pages (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/835/
Patch Set: Created 9 years, 4 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/DrawingBufferChromium.cpp
===================================================================
--- Source/WebCore/platform/graphics/chromium/DrawingBufferChromium.cpp (revision 93254)
+++ Source/WebCore/platform/graphics/chromium/DrawingBufferChromium.cpp (working copy)
@@ -32,9 +32,7 @@
#include "DrawingBuffer.h"
-#include "Extensions3DChromium.h"
#include "GraphicsContext3D.h"
-
#if USE(SKIA)
#include "GrContext.h"
#endif
@@ -62,7 +60,6 @@
return offscreenColorTexture;
}
-
DrawingBuffer::DrawingBuffer(GraphicsContext3D* context,
const IntSize& size,
bool multisampleExtensionSupported,
@@ -82,10 +79,6 @@
, m_grContext(0)
#endif
{
- if (!m_context->getExtensions()->supports("GL_CHROMIUM_copy_texture_to_parent_texture")) {
- m_context.clear();
- return;
- }
m_fbo = context->createFramebuffer();
context->bindFramebuffer(GraphicsContext3D::FRAMEBUFFER, m_fbo);
m_colorBuffer = generateColorTexture(context, size);
@@ -115,33 +108,18 @@
if (!m_context)
return;
- if (m_callback)
- m_callback->willPublish();
if (multisample())
commit();
- unsigned parentTexture = m_platformLayer->textureId();
- // We do the copy in the canvas' (child) context so that it executes in the correct order relative to
- // other commands in the child context. This ensures that the parent texture always contains a complete
- // frame and not some intermediate result.
m_context->makeContextCurrent();
#if USE(SKIA)
if (m_grContext)
m_grContext->flush(0);
#endif
- static_cast<Extensions3DChromium*>(m_context->getExtensions())->copyTextureToParentTextureCHROMIUM(m_colorBuffer, parentTexture);
m_context->flush();
}
#endif
-void DrawingBuffer::didReset()
-{
#if USE(ACCELERATED_COMPOSITING)
- if (m_platformLayer)
- m_platformLayer->setTextureChanged();
-#endif
-}
-
-#if USE(ACCELERATED_COMPOSITING)
PlatformLayer* DrawingBuffer::platformLayer()
{
if (!m_platformLayer)

Powered by Google App Engine
This is Rietveld 408576698