Chromium Code Reviews| Index: src/core/SkDevice.cpp |
| diff --git a/src/core/SkDevice.cpp b/src/core/SkDevice.cpp |
| index 6be9178f2386d785e5467f0b46d0aa86c343cf8a..9a43fd0e32b0ad531150f218b6919b75484548e0 100644 |
| --- a/src/core/SkDevice.cpp |
| +++ b/src/core/SkDevice.cpp |
| @@ -165,6 +165,26 @@ void SkBaseDevice::drawTextBlob(const SkDraw& draw, const SkTextBlob* blob, SkSc |
| } |
| } |
|
robertphillips
2015/05/05 18:47:56
Should this #include go at the top?
reed1
2015/05/05 19:45:15
Done.
|
| +#include "SkImage_Base.h" |
| + |
| +void SkBaseDevice::drawImage(const SkDraw& draw, const SkImage* image, SkScalar x, SkScalar y, |
|
robertphillips
2015/05/05 18:47:56
xtra spaces
reed1
2015/05/05 19:45:15
Done.
|
| + const SkPaint& paint) { |
| + // Default impl : turns everything into raster bitmap |
| + SkBitmap bm; |
| + if (as_IB(image)->getROPixels(&bm)) { |
| + this->drawBitmap(draw, bm, SkMatrix::MakeTrans(x, y), paint); |
| + } |
| +} |
| + |
| +void SkBaseDevice::drawImageRect(const SkDraw& draw, const SkImage* image, const SkRect* src, |
|
robertphillips
2015/05/05 18:47:56
xtra spaces
reed1
2015/05/05 19:45:15
Done.
|
| + const SkRect& dst, const SkPaint& paint) { |
| + // Default impl : turns everything into raster bitmap |
| + SkBitmap bm; |
| + if (as_IB(image)->getROPixels(&bm)) { |
|
robertphillips
2015/05/05 18:47:55
SkCanvas::kNone_DrawBitmapRectFlag ?
reed1
2015/05/05 19:45:15
Done.
|
| + this->drawBitmapRect(draw, bm, src, dst, paint, SkCanvas::DrawBitmapRectFlags(0)); |
| + } |
| +} |
| + |
| bool SkBaseDevice::readPixels(const SkImageInfo& info, void* dstP, size_t rowBytes, int x, int y) { |
| #ifdef SK_DEBUG |
| SkASSERT(info.width() > 0 && info.height() > 0); |