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

Unified Diff: src/core/SkImageCacherator.h

Issue 2337803002: Don't copy image buffer when calculating size.
Patch Set: Updating tests. Created 4 years, 2 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 | « no previous file | src/core/SkImageCacherator.cpp » ('j') | tests/ImageTest.cpp » ('J')
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 3be69a5785686e811e2a0c2e4c151d6cbeeaf95c..9a9cf8d50ae362b346bad73f09289ea4867bca4e 100644
--- a/src/core/SkImageCacherator.h
+++ b/src/core/SkImageCacherator.h
@@ -67,6 +67,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:
SkImageCacherator(SkImageGenerator*, const SkImageInfo&, const SkIPoint&, uint32_t uniqueID);
« no previous file with comments | « no previous file | src/core/SkImageCacherator.cpp » ('j') | tests/ImageTest.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698