Chromium Code Reviews| Index: third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp |
| diff --git a/third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp b/third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp |
| index ccc1972b4c5258a934ce745d65d6dac9025ae82e..406c50f366cffdd860744467f4efb1f10f727acf 100644 |
| --- a/third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp |
| +++ b/third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp |
| @@ -35,6 +35,7 @@ |
| #include "gpu/command_buffer/client/gles2_interface.h" |
| #include "platform/MIMETypeRegistry.h" |
| #include "platform/geometry/IntRect.h" |
| +#include "platform/graphics/ExpensiveCanvasHeuristicParameters.h" |
| #include "platform/graphics/GraphicsContext.h" |
| #include "platform/graphics/ImageBufferClient.h" |
| #include "platform/graphics/StaticBitmapImage.h" |
| @@ -300,7 +301,8 @@ bool ImageBuffer::getImageData(Multiply multiplied, const IntRect& rect, WTF::Ar |
| } |
| ASSERT(canvas()); |
| - RefPtr<SkImage> snapshot = m_surface->newImageSnapshot(PreferNoAcceleration, SnapshotReasonGetImageData); |
| + AccelerationHint hint = ExpensiveCanvasHeuristicParameters::GetImageDataForcesNoAcceleration ? ForceNoAcceleration : PreferNoAcceleration; |
|
xidachen
2016/06/15 14:12:36
We should probably do the same thing in putImageDa
|
| + RefPtr<SkImage> snapshot = m_surface->newImageSnapshot(hint, SnapshotReasonGetImageData); |
| if (!snapshot) |
| return false; |