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

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: Remove non-GPU implementation and rename 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..43bfeadf688e99996cf5b5c63b7851395406707c 100644
--- a/include/core/SkImage.h
+++ b/include/core/SkImage.h
@@ -142,6 +142,13 @@ public:
const SkISize yuvSizes[3],
GrSurfaceOrigin);
+ /**
+ * 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 the one passed in.
+ * If the input image is from a different GrContext, this will fail.
+ */
+ static SkImage* NewTextureImageFromImage(GrContext*, SkImage*);
reed1 2016/01/29 17:19:10 nit: SkImage* newTextureImage(GrContext*) const;
+
static SkImage* NewFromPicture(const SkPicture*, const SkISize& dimensions,
const SkMatrix*, const SkPaint*);
« 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