Index: src/image/SkImage_Raster.cpp |
diff --git a/src/image/SkImage_Raster.cpp b/src/image/SkImage_Raster.cpp |
index 68fc1b32e6d269209b9815ac4d204b0e405097b0..464a4ba7a4177829d0382d89c05f97c6ace3ee5a 100644 |
--- a/src/image/SkImage_Raster.cpp |
+++ b/src/image/SkImage_Raster.cpp |
@@ -64,6 +64,8 @@ public: |
SkPixelRef* getPixelRef() const { return fBitmap.pixelRef(); } |
+ virtual SkShader* onNewShader(SkShader::TileMode, SkShader::TileMode) const SK_OVERRIDE; |
+ |
private: |
SkImage_Raster() : INHERITED(0, 0) {} |
@@ -111,6 +113,10 @@ SkImage_Raster::SkImage_Raster(const Info& info, SkPixelRef* pr, size_t rowBytes |
SkImage_Raster::~SkImage_Raster() {} |
+SkShader* SkImage_Raster::onNewShader(SkShader::TileMode tileX, SkShader::TileMode tileY) const { |
+ return SkShader::CreateBitmapShader(fBitmap, tileX, tileY, NULL); |
+} |
+ |
void SkImage_Raster::onDraw(SkCanvas* canvas, SkScalar x, SkScalar y, const SkPaint* paint) { |
canvas->drawBitmap(fBitmap, x, y, paint); |
} |