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

Unified Diff: src/image/SkImage_Gpu.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_Base.h ('k') | src/image/SkImage_Raster.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « src/image/SkImage_Base.h ('k') | src/image/SkImage_Raster.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698