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

Unified Diff: src/core/SkImageCacherator.h

Issue 2337803002: Don't copy image buffer when calculating size.
Patch Set: Making SkImage_Gpu always return false. Created 4 years, 1 month 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 | « include/gpu/GrContext.h ('k') | src/core/SkImageCacherator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkImageCacherator.h
diff --git a/src/core/SkImageCacherator.h b/src/core/SkImageCacherator.h
index a8a05a1f90b0adbfc6f7d433a83b098f9506b13a..63db2ed6d80d2d68890a1172f1da79508c687e59 100644
--- a/src/core/SkImageCacherator.h
+++ b/src/core/SkImageCacherator.h
@@ -69,6 +69,15 @@ public:
bool directGeneratePixels(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRB,
int srcX, int srcY);
+#if SK_SUPPORT_GPU
+ /**
+ * Returns true if the generate can efficiently return a texture (given the properties of the
+ * proxy). By default, simple codecs will usually return false, since they must be decoded
+ * on the CPU and then uploaded to become a texture.
+ */
+ bool canGenerateTexture(const GrContextThreadSafeProxy& proxy);
+#endif
+
private:
// Ref-counted tuple(SkImageGenerator, SkMutex) which allows sharing of one generator
// among several cacherators.
« no previous file with comments | « include/gpu/GrContext.h ('k') | src/core/SkImageCacherator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698