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

Unified Diff: src/image/SkImage_Base.h

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_Base.h
diff --git a/src/image/SkImage_Base.h b/src/image/SkImage_Base.h
index 46cd3de3dbdde6b608da9425172831fcf85135d0..121da3f5a5e56e5aa3e43ff1563455d2b937dd23 100644
--- a/src/image/SkImage_Base.h
+++ b/src/image/SkImage_Base.h
@@ -52,7 +52,7 @@ public:
virtual bool onReadPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRowBytes,
int srcX, int srcY) const;
- virtual GrTexture* getTexture() const { return NULL; }
+ virtual GrTexture* peekTexture() const { return NULL; }
// return a read-only copy of the pixels. We promise to not modify them,
// but only inspect them (or encode them).
@@ -71,6 +71,9 @@ public:
virtual bool onIsLazyGenerated() const { return false; }
+ // Caller must call unref when they are done.
+ virtual GrTexture* asTextureRef(GrContext*, SkImageUsageType) const { return nullptr; }
+
private:
const SkSurfaceProps fProps;

Powered by Google App Engine
This is Rietveld 408576698