| Index: src/image/SkImage_Raster.cpp
|
| diff --git a/src/image/SkImage_Raster.cpp b/src/image/SkImage_Raster.cpp
|
| index 18d6a8cabb2bd871292021c94375becdcda4221e..5c576389ae6d6f19c5842962ec120e14697838f2 100644
|
| --- a/src/image/SkImage_Raster.cpp
|
| +++ b/src/image/SkImage_Raster.cpp
|
| @@ -11,6 +11,7 @@
|
| #include "SkCanvas.h"
|
| #include "SkData.h"
|
| #include "SkDecodingImageGenerator.h"
|
| +#include "SkSurface.h"
|
|
|
| class SkImage_Raster : public SkImage_Base {
|
| public:
|
| @@ -53,12 +54,12 @@ public:
|
| SkImage_Raster(const SkImageInfo&, SkData*, size_t rb);
|
| virtual ~SkImage_Raster();
|
|
|
| - virtual void onDraw(SkCanvas*, SkScalar, SkScalar, const SkPaint*) const SK_OVERRIDE;
|
| - virtual void onDrawRect(SkCanvas*, const SkRect*, const SkRect&,
|
| - const SkPaint*) const SK_OVERRIDE;
|
| - virtual bool onReadPixels(SkBitmap*, const SkIRect&) const SK_OVERRIDE;
|
| - virtual const void* onPeekPixels(SkImageInfo*, size_t* /*rowBytes*/) const SK_OVERRIDE;
|
| - virtual bool getROPixels(SkBitmap*) const SK_OVERRIDE;
|
| + void onDraw(SkCanvas*, SkScalar, SkScalar, const SkPaint*) const SK_OVERRIDE;
|
| + void onDrawRect(SkCanvas*, const SkRect*, const SkRect&, const SkPaint*) const SK_OVERRIDE;
|
| + SkSurface* onNewSurface(const SkImageInfo&, const SkSurfaceProps&) const SK_OVERRIDE;
|
| + bool onReadPixels(SkBitmap*, const SkIRect&) const SK_OVERRIDE;
|
| + const void* onPeekPixels(SkImageInfo*, size_t* /*rowBytes*/) const SK_OVERRIDE;
|
| + bool getROPixels(SkBitmap*) const SK_OVERRIDE;
|
|
|
| // exposed for SkSurface_Raster via SkNewImageFromPixelRef
|
| SkImage_Raster(const SkImageInfo&, SkPixelRef*, size_t rowBytes);
|
| @@ -136,6 +137,10 @@ void SkImage_Raster::onDrawRect(SkCanvas* canvas, const SkRect* src, const SkRec
|
| canvas->drawBitmapRectToRect(fBitmap, src, dst, paint);
|
| }
|
|
|
| +SkSurface* SkImage_Raster::onNewSurface(const SkImageInfo& info, const SkSurfaceProps& props) const {
|
| + return SkSurface::NewRaster(info, &props);
|
| +}
|
| +
|
| bool SkImage_Raster::onReadPixels(SkBitmap* dst, const SkIRect& subset) const {
|
| if (dst->pixelRef()) {
|
| return this->INHERITED::onReadPixels(dst, subset);
|
|
|