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

Unified Diff: include/core/SkImage.h

Issue 1631053003: Add SkImage factory method that forces image to be resolved to a texture. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: static->class method Created 4 years, 11 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 | « gm/image.cpp ('k') | src/image/SkImage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkImage.h
diff --git a/include/core/SkImage.h b/include/core/SkImage.h
index 62a9e9cf426bc132ded0e4fad45aa76306361b0f..e60902fc07419acc8fc7006c6c67f773a427a758 100644
--- a/include/core/SkImage.h
+++ b/include/core/SkImage.h
@@ -300,6 +300,13 @@ public:
*/
SkImage* newSubset(const SkIRect& subset) const;
+ /**
+ * Ensures that an image is backed by a texture (when GrContext is non-null). If no
+ * transformation is required, the returned image may be the same as this image. If the this
+ * image is from a different GrContext, this will fail.
+ */
+ SkImage* newTextureImage(GrContext*) const;
+
// Helper functions to convert to SkBitmap
enum LegacyBitmapMode {
« no previous file with comments | « gm/image.cpp ('k') | src/image/SkImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698