diff options
author | 2017-12-13 09:22:45 -0500 | |
---|---|---|
committer | 2017-12-13 15:20:12 +0000 | |
commit | c25db637532cd10dde7855d868c0d033e96f61f2 (patch) | |
tree | 63a14b28af84ebf7f2bee6eef63db3de6623a811 /include/core | |
parent | 2a3009931d7bb0f5ca31490c4cf19eef205e4e7a (diff) |
Update SkImage::MakeFromYUVTexturesCopy to GrBackendTexture
Change-Id: I7ba030c5d7856309709e892a2b1b625cf74c70b8
Reviewed-on: https://skia-review.googlesource.com/82823
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'include/core')
-rw-r--r-- | include/core/SkImage.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/core/SkImage.h b/include/core/SkImage.h index b2468e011e..454c5e4b7b 100644 --- a/include/core/SkImage.h +++ b/include/core/SkImage.h @@ -189,6 +189,29 @@ public: GrSurfaceOrigin surfaceOrigin, sk_sp<SkColorSpace> colorSpace = nullptr); + /** + * Create a new image by copying the pixels from the specified y, u, v 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> MakeFromYUVTexturesCopy(GrContext* context, SkYUVColorSpace yuvColorSpace, + const GrBackendTexture yuvTextureHandles[3], + const SkISize yuvSizes[3], + GrSurfaceOrigin surfaceOrigin, + sk_sp<SkColorSpace> colorSpace = nullptr); + + /** + * 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* context, + SkYUVColorSpace yuvColorSpace, + const GrBackendTexture nv12TextureHandles[2], + const SkISize nv12Sizes[2], + GrSurfaceOrigin surfaceOrigin, + sk_sp<SkColorSpace> colorSpace = nullptr); + enum class BitDepth { kU8, kF16, |