From 56dc04bdc160b71a1e77fdb9e30fde4e860077ae Mon Sep 17 00:00:00 2001 From: Brian Salomon Date: Mon, 19 Mar 2018 16:26:03 -0400 Subject: [PATCH] Remove deprecated versions of YUV texture SkImage factories Bug: skia:6718 Change-Id: I856b64192e1b797f60b833dd58014e058ea351b3 Reviewed-on: https://skia-review.googlesource.com/115124 Reviewed-by: Greg Daniel Commit-Queue: Brian Salomon --- docs/SkImage_Reference.bmh | 21 --------------------- include/core/SkImage.h | 13 ------------- src/image/SkImage.cpp | 16 ---------------- src/image/SkImage_Gpu.cpp | 29 ----------------------------- 4 files changed, 79 deletions(-) diff --git a/docs/SkImage_Reference.bmh b/docs/SkImage_Reference.bmh index e5e16af1f1..893eb8571b 100644 --- a/docs/SkImage_Reference.bmh +++ b/docs/SkImage_Reference.bmh @@ -680,16 +680,6 @@ should this be moved to chrome only? # ------------------------------------------------------------------------------ -#Method static sk_sp MakeFromYUVTexturesCopy(GrContext* context, SkYUVColorSpace yuvColorSpace, - const GrBackendTexture yuvTextures[3], - const SkISize yuvSizes[3], - GrSurfaceOrigin surfaceOrigin, - sk_sp colorSpace = nullptr) -#Deprecated -#Method ## - -# ------------------------------------------------------------------------------ - #Method static sk_sp MakeFromNV12TexturesCopy(GrContext* context, SkYUVColorSpace yuvColorSpace, const GrBackendTexture nv12Textures[2], @@ -729,17 +719,6 @@ should this be moved to chrome only? # ------------------------------------------------------------------------------ -#Method static sk_sp MakeFromNV12TexturesCopy(GrContext* context, - SkYUVColorSpace yuvColorSpace, - const GrBackendTexture nv12Textures[2], - const SkISize nv12Sizes[2], - GrSurfaceOrigin surfaceOrigin, - sk_sp colorSpace = nullptr) -#Deprecated -#Method ## - -# ------------------------------------------------------------------------------ - # currently uncalled by any test or client ## #Bug 7424 diff --git a/include/core/SkImage.h b/include/core/SkImage.h index c404643171..7c865f7633 100644 --- a/include/core/SkImage.h +++ b/include/core/SkImage.h @@ -343,12 +343,6 @@ public: const GrBackendTexture yuvTextures[3], GrSurfaceOrigin surfaceOrigin, sk_sp colorSpace = nullptr); - /** Deprecated version that takes a redunant array of sizes of the textures. */ - static sk_sp MakeFromYUVTexturesCopy(GrContext* context, SkYUVColorSpace yuvColorSpace, - const GrBackendTexture yuvTextures[3], - const SkISize yuvSizes[3], - GrSurfaceOrigin surfaceOrigin, - sk_sp colorSpace = nullptr); /** Creates SkImage from copy of nv12TextureHandles, an array of textures on GPU. yuvTextures[0] contains pixels for YUV_Component_Y plane. @@ -370,13 +364,6 @@ public: const GrBackendTexture nv12Textures[2], GrSurfaceOrigin surfaceOrigin, sk_sp colorSpace = nullptr); - /** Deprecated version that takes a redunant array of sizes of the textures. */ - static sk_sp MakeFromNV12TexturesCopy(GrContext* context, - SkYUVColorSpace yuvColorSpace, - const GrBackendTexture nv12Textures[2], - const SkISize nv12Sizes[2], - GrSurfaceOrigin surfaceOrigin, - sk_sp colorSpace = nullptr); enum class BitDepth { kU8, //!< Use 8 bits per ARGB component using unsigned integer format. diff --git a/src/image/SkImage.cpp b/src/image/SkImage.cpp index 2bea441f48..0373398644 100644 --- a/src/image/SkImage.cpp +++ b/src/image/SkImage.cpp @@ -376,22 +376,6 @@ sk_sp SkImage::MakeFromAdoptedTexture(GrContext* ctx, sk_sp SkImage::MakeFromYUVTexturesCopy(GrContext* ctx, SkYUVColorSpace space, const GrBackendTexture[3], - const SkISize[3], - GrSurfaceOrigin origin, - sk_sp imageColorSpace) { - return nullptr; -} - -sk_sp SkImage::MakeFromYUVTexturesCopy(GrContext* ctx, SkYUVColorSpace space, - const GrBackendTexture[3], - GrSurfaceOrigin origin, - sk_sp imageColorSpace) { - return nullptr; -} - -sk_sp SkImage::MakeFromNV12TexturesCopy(GrContext* ctx, SkYUVColorSpace space, - const GrBackendTexture[2], - const SkISize[2], GrSurfaceOrigin origin, sk_sp imageColorSpace) { return nullptr; diff --git a/src/image/SkImage_Gpu.cpp b/src/image/SkImage_Gpu.cpp index 83c94093ac..b8a5bc4953 100644 --- a/src/image/SkImage_Gpu.cpp +++ b/src/image/SkImage_Gpu.cpp @@ -457,20 +457,6 @@ sk_sp SkImage::MakeFromYUVTexturesCopy(GrContext* ctx, SkYUVColorSpace origin, std::move(imageColorSpace)); } -sk_sp SkImage::MakeFromYUVTexturesCopy(GrContext* ctx, SkYUVColorSpace colorSpace, - const GrBackendTexture yuvTextures[3], - const SkISize yuvSizes[3], GrSurfaceOrigin origin, - sk_sp imageColorSpace) { - for (int i = 0; i < 3; ++i) { - if (yuvSizes[i].fWidth != yuvTextures[i].width() || - yuvSizes[i].fHeight != yuvTextures[i].height()) { - return nullptr; - } - } - return SkImage::MakeFromYUVTexturesCopy(ctx, colorSpace, yuvTextures, origin, - std::move(imageColorSpace)); -} - sk_sp SkImage::MakeFromNV12TexturesCopy(GrContext* ctx, SkYUVColorSpace colorSpace, const GrBackendTexture nv12Textures[2], GrSurfaceOrigin origin, @@ -479,21 +465,6 @@ sk_sp SkImage::MakeFromNV12TexturesCopy(GrContext* ctx, SkYUVColorSpace origin, std::move(imageColorSpace)); } -sk_sp SkImage::MakeFromNV12TexturesCopy(GrContext* ctx, SkYUVColorSpace colorSpace, - const GrBackendTexture nv12Textures[2], - const SkISize yuvSizes[2], - GrSurfaceOrigin origin, - sk_sp imageColorSpace) { - for (int i = 0; i < 2; ++i) { - if (yuvSizes[i].fWidth != nv12Textures[i].width() || - yuvSizes[i].fHeight != nv12Textures[i].height()) { - return nullptr; - } - } - return SkImage_Gpu::MakeFromNV12TexturesCopy(ctx, colorSpace, nv12Textures, origin, - std::move(imageColorSpace)); -} - static sk_sp create_image_from_maker(GrContext* context, GrTextureMaker* maker, SkAlphaType at, uint32_t id, SkColorSpace* dstColorSpace) {