Index: Source/core/frame/ImageBitmap.cpp |
diff --git a/Source/core/frame/ImageBitmap.cpp b/Source/core/frame/ImageBitmap.cpp |
index 50290cbbeced454f1e425d3d0bf3966b3e73ba75..789b861c9e2a1b8f1bec8e32ba72f057ff50bfb0 100644 |
--- a/Source/core/frame/ImageBitmap.cpp |
+++ b/Source/core/frame/ImageBitmap.cpp |
@@ -5,10 +5,8 @@ |
#include "config.h" |
#include "core/frame/ImageBitmap.h" |
-#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" |
@@ -75,20 +73,6 @@ ImageBitmap::ImageBitmap(HTMLVideoElement* video, const IntRect& cropRect) |
m_bitmapRect = IntRect(IntPoint(std::max(0, -cropRect.x()), std::max(0, -cropRect.y())), srcRect.size()); |
} |
-ImageBitmap::ImageBitmap(HTMLCanvasElement* canvas, const IntRect& cropRect) |
- : m_imageElement(nullptr) |
- , 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); |
-} |
- |
ImageBitmap::ImageBitmap(ImageData* data, const IntRect& cropRect) |
: m_imageElement(nullptr) |
, m_cropRect(cropRect) |
@@ -154,12 +138,6 @@ PassRefPtrWillBeRawPtr<ImageBitmap> ImageBitmap::create(HTMLVideoElement* video, |
return adoptRefWillBeNoop(new ImageBitmap(video, normalizedCropRect)); |
} |
-PassRefPtrWillBeRawPtr<ImageBitmap> ImageBitmap::create(HTMLCanvasElement* canvas, const IntRect& cropRect) |
-{ |
- IntRect normalizedCropRect = normalizeRect(cropRect); |
- return adoptRefWillBeNoop(new ImageBitmap(canvas, normalizedCropRect)); |
-} |
- |
PassRefPtrWillBeRawPtr<ImageBitmap> ImageBitmap::create(ImageData* data, const IntRect& cropRect) |
{ |
IntRect normalizedCropRect = normalizeRect(cropRect); |