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

Unified Diff: src/image/SkImage_Gpu.cpp

Issue 1282363002: Use SkImageCacherator in SkImages (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: now with mutex safeness Created 5 years, 4 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
Index: src/image/SkImage_Gpu.cpp
diff --git a/src/image/SkImage_Gpu.cpp b/src/image/SkImage_Gpu.cpp
index d172df829ea1e811405e536c894efd82295eb07f..40a2dea96e6963c27558e2c248585fcf492f4f12 100644
--- a/src/image/SkImage_Gpu.cpp
+++ b/src/image/SkImage_Gpu.cpp
@@ -79,6 +79,11 @@ bool SkImage_Gpu::getROPixels(SkBitmap* dst) const {
return true;
}
+GrTexture* SkImage_Gpu::asTextureRef(GrContext* ctx, SkImageUsageType usage) const {
+ fTexture->ref();
+ return fTexture;
+}
+
bool SkImage_Gpu::isOpaque() const {
return GrPixelConfigIsOpaque(fTexture->config()) || fAlphaType == kOpaque_SkAlphaType;
}

Powered by Google App Engine
This is Rietveld 408576698