Index: Source/core/imagebitmap/ImageBitmapFactories.cpp |
diff --git a/Source/core/imagebitmap/ImageBitmapFactories.cpp b/Source/core/imagebitmap/ImageBitmapFactories.cpp |
index ac39e7032e001e5c89048930235a59cff6d70ac8..9dd9d6a1ee11870129e87d99cab288f7502cde72 100644 |
--- a/Source/core/imagebitmap/ImageBitmapFactories.cpp |
+++ b/Source/core/imagebitmap/ImageBitmapFactories.cpp |
@@ -178,7 +178,8 @@ ScriptPromise ImageBitmapFactories::createImageBitmap(ScriptState* scriptState, |
} |
// FIXME: make ImageBitmap creation asynchronous crbug.com/258082 |
- return fulfillImageBitmap(scriptState, canvas->buffer() ? ImageBitmap::create(canvas, IntRect(sx, sy, sw, sh)) : nullptr); |
+ RefPtr<Image> canvasImage = canvas->copiedImage(BackBuffer); |
Justin Novosad
2014/11/27 00:49:31
This seems like a step in the wrong direction. We
dshwang
2014/11/27 15:12:11
Thank you for explaining. I rollback this change.
|
+ return fulfillImageBitmap(scriptState, canvasImage ? ImageBitmap::create(canvasImage.get(), IntRect(sx, sy, sw, sh)) : nullptr); |
} |
ScriptPromise ImageBitmapFactories::createImageBitmap(ScriptState* scriptState, EventTarget& eventTarget, Blob* blob, ExceptionState& exceptionState) |