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 142aeed0e4480d3f0133ad2a143ae2408516d452..e1e6594446fd3a19eab30a2ec3c252379061f794 100644 |
--- a/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp |
+++ b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp |
@@ -1099,7 +1099,8 @@ void HTMLCanvasElement::ensureUnacceleratedImageBuffer() { |
PassRefPtr<Image> HTMLCanvasElement::copiedImage( |
SourceDrawingBuffer sourceBuffer, |
- AccelerationHint hint) const { |
+ AccelerationHint hint, |
+ SnapshotReason snapshotReason) const { |
if (!isPaintable()) |
return nullptr; |
if (!m_context) |
@@ -1107,10 +1108,9 @@ PassRefPtr<Image> HTMLCanvasElement::copiedImage( |
if (m_context->getContextType() == |
CanvasRenderingContext::ContextImageBitmap) { |
- RefPtr<Image> image = |
- m_context->getImage(hint, SnapshotReasonGetCopiedImage); |
+ RefPtr<Image> image = m_context->getImage(hint, snapshotReason); |
if (image) |
- return m_context->getImage(hint, SnapshotReasonGetCopiedImage); |
+ return m_context->getImage(hint, snapshotReason); |
// Special case: transferFromImageBitmap is not yet called. |
sk_sp<SkSurface> surface = |
SkSurface::MakeRasterN32Premul(width(), height()); |
@@ -1122,8 +1122,7 @@ PassRefPtr<Image> HTMLCanvasElement::copiedImage( |
if (m_context->is3d()) |
needToUpdate |= m_context->paintRenderingResultsToCanvas(sourceBuffer); |
if (needToUpdate && buffer()) { |
- m_copiedImage = |
- buffer()->newImageSnapshot(hint, SnapshotReasonGetCopiedImage); |
+ m_copiedImage = buffer()->newImageSnapshot(hint, snapshotReason); |
updateExternallyAllocatedMemory(); |
} |
return m_copiedImage; |