Index: third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp |
diff --git a/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp |
index 105b9f0bc65b1cef6ada0c118f2a61c63433f2ed..813a0038d041df5376d1e7ae1f4ce2892b9cbdde 100644 |
--- a/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp |
+++ b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp |
@@ -74,6 +74,7 @@ |
#include "platform/graphics/StaticBitmapImage.h" |
#include "platform/graphics/UnacceleratedImageBufferSurface.h" |
#include "platform/graphics/gpu/AcceleratedImageBufferSurface.h" |
+#include "platform/graphics/gpu/SharedGpuContext.h" |
#include "platform/graphics/paint/PaintCanvas.h" |
#include "platform/image-encoders/ImageEncoderUtils.h" |
#include "platform/transforms/AffineTransform.h" |
@@ -1240,6 +1241,7 @@ void HTMLCanvasElement::DidMoveToNewDocument(Document& old_document) { |
void HTMLCanvasElement::WillDrawImageTo2DContext(CanvasImageSource* source) { |
if (ExpensiveCanvasHeuristicParameters::kEnableAccelerationToAvoidReadbacks && |
+ SharedGpuContext::AllowSoftwareToAcceleratedCanvasUpgrade() && |
source->IsAccelerated() && !Buffer()->IsAccelerated() && |
ShouldAccelerate(kIgnoreResourceLimitCriteria)) { |
OpacityMode opacity_mode = |