| Index: Source/core/page/ImageBitmap.cpp
|
| diff --git a/Source/core/page/ImageBitmap.cpp b/Source/core/page/ImageBitmap.cpp
|
| index 006594a9c0d14006d89babea9ddcc0687fc7b754..13f8debcfba3c0cd8a29e04838a7e5cdc44dc855 100644
|
| --- a/Source/core/page/ImageBitmap.cpp
|
| +++ b/Source/core/page/ImageBitmap.cpp
|
| @@ -9,6 +9,7 @@
|
| #include "core/html/HTMLImageElement.h"
|
| #include "core/html/HTMLVideoElement.h"
|
| #include "core/html/ImageData.h"
|
| +#include "core/html/canvas/CanvasRenderingContext.h"
|
| #include "core/platform/graphics/BitmapImage.h"
|
| #include "core/platform/graphics/GraphicsContext.h"
|
| #include "wtf/RefPtr.h"
|
| @@ -78,6 +79,10 @@ ImageBitmap::ImageBitmap(HTMLCanvasElement* canvas, const IntRect& cropRect)
|
| IntRect srcRect = intersection(cropRect, IntRect(IntPoint(), canvasSize));
|
| IntRect dstRect(IntPoint(), srcRect.size());
|
|
|
| + CanvasRenderingContext* sourceContext = canvas->renderingContext();
|
| + if (sourceContext && sourceContext->is3d())
|
| + sourceContext->paintRenderingResultsToCanvas();
|
| +
|
| m_buffer = ImageBuffer::create(canvasSize);
|
| m_buffer->context()->drawImageBuffer(canvas->buffer(), dstRect, srcRect);
|
| m_bitmap = m_buffer->copyImage(DontCopyBackingStore);
|
|
|