Index: third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp |
diff --git a/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp b/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp |
index 526b9fb656f544c1aa9ecb33fb014edb31cc774f..b5f8febd6e7bfcd7f93520e4634a53b70aa5fd7f 100644 |
--- a/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp |
+++ b/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp |
@@ -61,6 +61,23 @@ ImageBitmap* OffscreenCanvas::transferToImageBitmap(ExceptionState& exceptionSta |
return image; |
} |
+PassRefPtr<Image> OffscreenCanvas::getSourceImageForCanvas(SourceImageStatus* status, AccelerationHint, SnapshotReason reason, const FloatSize&) const |
+{ |
+ if (!m_context) { |
+ *status = InvalidSourceImageStatus; |
+ return nullptr; |
+ } |
+ *status = NormalSourceImageStatus; |
+ return m_context->getImage(reason); |
+} |
+ |
+bool OffscreenCanvas::isOpaque() const |
+{ |
+ if (!m_context) |
+ return false; |
+ return !m_context->creationAttributes().hasAlpha(); |
+} |
+ |
CanvasRenderingContext* OffscreenCanvas::getCanvasRenderingContext(ScriptState* scriptState, const String& id, const CanvasContextCreationAttributes& attributes) |
{ |
CanvasRenderingContext::ContextType contextType = CanvasRenderingContext::contextTypeFromId(id); |