diff options
author | reed <reed@google.com> | 2016-08-17 11:12:33 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-08-17 11:12:33 -0700 |
commit | 2d5b7147032e3806b5895667a899440119707c2d (patch) | |
tree | 001be10772ac20d1f28861776cbf81aa2ce6fcc5 /src/image/SkImage_Base.h | |
parent | 4f81caf16995679adc05131823e209bf12844d3c (diff) |
pin as texture api
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2241353002
Review-Url: https://codereview.chromium.org/2241353002
Diffstat (limited to 'src/image/SkImage_Base.h')
-rw-r--r-- | src/image/SkImage_Base.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/image/SkImage_Base.h b/src/image/SkImage_Base.h index 1cfb7daad6..09971c1198 100644 --- a/src/image/SkImage_Base.h +++ b/src/image/SkImage_Base.h @@ -8,6 +8,7 @@ #ifndef SkImage_Base_DEFINED #define SkImage_Base_DEFINED +#include "GrTexture.h" #include "SkAtomics.h" #include "SkImage.h" #include "SkSurface.h" @@ -40,6 +41,7 @@ public: int srcX, int srcY, CachingHint) const; virtual GrTexture* peekTexture() const { return nullptr; } + virtual sk_sp<GrTexture> refPinnedTexture(uint32_t* uniqueID) const { return nullptr; } virtual SkImageCacherator* peekCacherator() const { return nullptr; } // return a read-only copy of the pixels. We promise to not modify them, @@ -69,6 +71,9 @@ public: fAddedToCache.store(true); } + virtual void onPinAsTexture(GrContext*) const {} + virtual void onUnpinAsTexture(GrContext*) const {} + private: // Set true by caches when they cache content that's derived from the current pixels. mutable SkAtomic<bool> fAddedToCache; |