Index: sky/engine/core/painting/Canvas.cpp |
diff --git a/sky/engine/core/painting/Canvas.cpp b/sky/engine/core/painting/Canvas.cpp |
index 4bf9d3473e064ec92fb040f9140ea4f25139b520..632694969249ee9e680402d1172a4c9a16a356d2 100644 |
--- a/sky/engine/core/painting/Canvas.cpp |
+++ b/sky/engine/core/painting/Canvas.cpp |
@@ -7,9 +7,11 @@ |
#include "sky/engine/core/dom/Document.h" |
#include "sky/engine/core/dom/Element.h" |
+#include "sky/engine/core/painting/CanvasImage.h" |
#include "sky/engine/core/painting/PaintingTasks.h" |
#include "sky/engine/platform/geometry/IntRect.h" |
#include "third_party/skia/include/core/SkCanvas.h" |
+#include "third_party/skia/include/core/SkBitmap.h" |
namespace blink { |
@@ -155,6 +157,15 @@ void Canvas::drawPath(const CanvasPath* path, const Paint* paint) |
m_canvas->drawPath(path->path(), paint->paint()); |
} |
+void Canvas::drawImage(const CanvasImage* image, float x, float y, const Paint* paint) |
+{ |
+ if (!m_canvas) |
+ return; |
+ ASSERT(image); |
+ ASSERT(m_displayList->isRecording()); |
+ m_canvas->drawBitmap(image->bitmap(), x, y, &paint->paint()); |
+} |
+ |
PassRefPtr<DisplayList> Canvas::finishRecording() |
{ |
if (!isRecording()) |