Index: Source/core/frame/ImageBitmap.cpp |
diff --git a/Source/core/frame/ImageBitmap.cpp b/Source/core/frame/ImageBitmap.cpp |
index 36a602b72618d4d75743a9536b783504ad0a0acc..b537c9999fd4ef57dbdd7e6f2b412a15e5053168 100644 |
--- a/Source/core/frame/ImageBitmap.cpp |
+++ b/Source/core/frame/ImageBitmap.cpp |
@@ -8,7 +8,6 @@ |
#include "core/html/HTMLCanvasElement.h" |
#include "core/html/HTMLVideoElement.h" |
#include "core/html/ImageData.h" |
-#include "core/html/canvas/CanvasRenderingContext.h" |
#include "platform/graphics/BitmapImage.h" |
#include "platform/graphics/GraphicsContext.h" |
#include "platform/graphics/ImageBuffer.h" |
@@ -80,13 +79,10 @@ ImageBitmap::ImageBitmap(HTMLCanvasElement* canvas, const IntRect& cropRect) |
, m_cropRect(cropRect) |
, m_bitmapOffset(IntPoint()) |
{ |
- CanvasRenderingContext* sourceContext = canvas->renderingContext(); |
- if (sourceContext && sourceContext->is3d()) |
- sourceContext->paintRenderingResultsToCanvas(BackBuffer); |
- |
IntRect srcRect = intersection(cropRect, IntRect(IntPoint(), canvas->size())); |
m_bitmapRect = IntRect(IntPoint(std::max(0, -cropRect.x()), std::max(0, -cropRect.y())), srcRect.size()); |
- m_bitmap = cropImage(canvas->buffer()->copyImage(CopyBackingStore).get(), cropRect); |
dshwang
2014/12/01 14:31:12
After this CL, other classes don't use buffer() ex
|
+ ASSERT(canvas->isDrawable()); |
+ m_bitmap = cropImage(canvas->copiedImage(BackBuffer).get(), cropRect); |
} |
ImageBitmap::ImageBitmap(ImageData* data, const IntRect& cropRect) |