From fa37082fbd2577e8237a70ddc8d1b5adedc0c7be Mon Sep 17 00:00:00 2001 From: Joe Conti Date: Sat, 28 Jun 2014 21:42:53 +0100 Subject: [PATCH] Update ImageBuffer.cpp Fixed issue with Ganesh texture bindings becoming corrupted Corruption occurred when a canvas was used as the source of a texImage2D --- Source/platform/graphics/ImageBuffer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/platform/graphics/ImageBuffer.cpp b/Source/platform/graphics/ImageBuffer.cpp index dc908a14d25..118c179355f 100644 --- a/Source/platform/graphics/ImageBuffer.cpp +++ b/Source/platform/graphics/ImageBuffer.cpp @@ -33,6 +33,7 @@ #include "config.h" #include "platform/graphics/ImageBuffer.h" +#include "GrContext.h" #include "platform/MIMETypeRegistry.h" #include "platform/geometry/IntRect.h" #include "platform/graphics/BitmapImage.h" @@ -185,6 +186,9 @@ bool ImageBuffer::copyToPlatformTexture(blink::WebGraphicsContext3D* context, Pl context->flush(); sharedContext->waitSyncPoint(context->insertSyncPoint()); + // Undo grContext texture binding changes introduced in this function + provider->grContext()->resetContext(kTextureBinding_GrGLBackendState); + return true; }