Index: third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp |
diff --git a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp |
index 75de18b5922262c6f05804b5852b72ff231cf1b8..88cf799a97bbc597e27950e7dfdaf177d325f443 100644 |
--- a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp |
+++ b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp |
@@ -585,6 +585,13 @@ ImageBuffer* CanvasRenderingContext2D::imageBuffer() const |
return canvas()->buffer(); |
} |
+PassRefPtr<Image> blink::CanvasRenderingContext2D::getImage(SnapshotReason reason) const |
+{ |
+ if (!hasImageBuffer()) |
+ return nullptr; |
+ return canvas()->buffer()->newImageSnapshot(PreferAcceleration, reason); |
+} |
+ |
bool CanvasRenderingContext2D::parseColorOrCurrentColor(Color& color, const String& colorString) const |
{ |
return ::blink::parseColorOrCurrentColor(color, colorString, canvas()); |