Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1571)

Unified Diff: src/image/SkImage_Raster.cpp

Issue 345463009: Deleted SkImage::newShaderClamp: not used, not implemented. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Organizing includes of SkImage.h Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/image/SkImage_Gpu.cpp ('k') | tests/ImageNewShaderTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « src/image/SkImage_Gpu.cpp ('k') | tests/ImageNewShaderTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698