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

Unified Diff: src/image/SkImage_Base.h

Issue 2241353002: pin as texture api (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix comments Created 4 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
« no previous file with comments | « src/image/SkImage.cpp ('k') | src/image/SkImage_Gpu.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/image/SkImage_Base.h
diff --git a/src/image/SkImage_Base.h b/src/image/SkImage_Base.h
index 1cfb7daad67e126b792e4bd500dc497a9314dc85..09971c1198de0333122fa3a9289ce7ba76009549 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;
« no previous file with comments | « src/image/SkImage.cpp ('k') | src/image/SkImage_Gpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698