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

Unified Diff: include/core/SkImage.h

Issue 2016593002: Add NV12 texture conversion support. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 4 years, 6 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/yuvtorgbeffect.cpp ('k') | src/gpu/GrYUVProvider.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 50a9f5761267c200442233063d5136257f28c94c..52a2bf7af76674125225ab82f17a4b84b169debd 100644
--- a/include/core/SkImage.h
+++ b/include/core/SkImage.h
@@ -138,6 +138,15 @@ public:
const SkISize yuvSizes[3],
GrSurfaceOrigin);
+ /**
+ * Create a new image by copying the pixels from the specified y and uv textures. The data
+ * from the textures is immediately ingested into the image and the textures can be modified or
+ * deleted after the function returns. The image will have the dimensions of the y texture.
+ */
+ static sk_sp<SkImage> MakeFromNV12TexturesCopy(GrContext*, SkYUVColorSpace,
+ const GrBackendObject nv12TextureHandles[2],
+ const SkISize nv12Sizes[2], GrSurfaceOrigin);
+
static sk_sp<SkImage> MakeFromPicture(sk_sp<SkPicture>, const SkISize& dimensions,
const SkMatrix*, const SkPaint*);
« no previous file with comments | « gm/yuvtorgbeffect.cpp ('k') | src/gpu/GrYUVProvider.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698