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

Unified Diff: src/image/SkImage_Gpu.cpp

Issue 1355863002: Revert of add ImageShader, sharing code with its Bitmap cousin (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 3 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.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 527bcc3ef558924d7a7aa753d4e62fea1e390eb2..163e62e02df540362952e9b55be47d3284d886a7 100644
--- a/src/image/SkImage_Gpu.cpp
+++ b/src/image/SkImage_Gpu.cpp
@@ -47,6 +47,13 @@
if (as_IB(image)->getTexture()) {
((SkImage_Gpu*)image)->applyBudgetDecision();
}
+}
+
+SkShader* SkImage_Gpu::onNewShader(SkShader::TileMode tileX, SkShader::TileMode tileY,
+ const SkMatrix* localMatrix) const {
+ SkBitmap bm;
+ GrWrapTextureInBitmap(fTexture, this->width(), this->height(), this->isOpaque(), &bm);
+ return SkShader::CreateBitmapShader(bm, tileX, tileY, localMatrix);
}
bool SkImage_Gpu::getROPixels(SkBitmap* dst) const {
« no previous file with comments | « src/image/SkImage_Gpu.h ('k') | src/image/SkImage_Raster.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698