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

Unified Diff: src/image/SkImage_Gpu.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 | « src/image/SkImage_Generator.cpp ('k') | src/image/SkImage_Gpu.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/image/SkImage_Gpu.h
diff --git a/src/image/SkImage_Gpu.h b/src/image/SkImage_Gpu.h
index 13c1e306dc93b95b66ac4611733a90371354f547..76d8a7f6437f1403c0e3a7e4f273e007704ffc17 100644
--- a/src/image/SkImage_Gpu.h
+++ b/src/image/SkImage_Gpu.h
@@ -50,6 +50,18 @@ public:
}
bool onReadPixels(const SkImageInfo&, void* dstPixels, size_t dstRowBytes,
int srcX, int srcY, CachingHint) const override;
+#if SK_SUPPORT_GPU
+ bool canGenerateTexture(const GrContextThreadSafeProxy& proxy) const override
+ {
+ return false;
+ /*
+ if (fTexture) {
+ return fTexture->getContext()->uniqueID() == proxy.uniqueID();
+ }
+ return false;
+ */
+ }
+#endif
private:
sk_sp<GrTexture> fTexture;
« no previous file with comments | « src/image/SkImage_Generator.cpp ('k') | src/image/SkImage_Gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698