Index: src/image/SkImage_Gpu.cpp |
diff --git a/src/image/SkImage_Gpu.cpp b/src/image/SkImage_Gpu.cpp |
index aa08f44260a798649c155fb1403bb5d8d277bc54..7a73c7453bc918ccf0ceb7f4e41ae02ea643e879 100644 |
--- a/src/image/SkImage_Gpu.cpp |
+++ b/src/image/SkImage_Gpu.cpp |
@@ -27,6 +27,7 @@ public: |
GrTexture* getTexture() { return fBitmap.getTexture(); } |
+ virtual SkShader* onNewShader(SkShader::TileMode, SkShader::TileMode) const SK_OVERRIDE; |
private: |
SkBitmap fBitmap; |
@@ -44,6 +45,10 @@ SkImage_Gpu::SkImage_Gpu(const SkBitmap& bitmap) |
SkImage_Gpu::~SkImage_Gpu() { |
} |
+SkShader* SkImage_Gpu::onNewShader(SkShader::TileMode tileX, SkShader::TileMode tileY) const { |
+ return SkShader::CreateBitmapShader(fBitmap, tileX, tileY, NULL); |
+} |
+ |
void SkImage_Gpu::onDraw(SkCanvas* canvas, SkScalar x, SkScalar y, |
const SkPaint* paint) { |
canvas->drawBitmap(fBitmap, x, y, paint); |