WEBGL_video_texture : sharing texture prototype in skia

Bug: 776222

Change-Id: I84c81bdaa6dc0b5548f116a28c6319e601effb32
Reviewed-on: https://skia-review.googlesource.com/146695
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Kenneth Russell <kbr@google.com>
diff --git a/src/image/SkImage_Gpu.h b/src/image/SkImage_Gpu.h
index 56238da..b7febb5 100644
--- a/src/image/SkImage_Gpu.h
+++ b/src/image/SkImage_Gpu.h
@@ -131,6 +131,18 @@
                                                        GrSurfaceOrigin origin,
                                                        sk_sp<SkColorSpace> imageColorSpace);
 
+    /** Implementation of MakeFromYUVTexturesCopyWithExternalBackend and
+        MakeFromNV12TexturesCopyWithExternalBackend */
+    static sk_sp<SkImage> MakeFromYUVATexturesCopyWithExternalBackendImpl(
+            GrContext* ctx,
+            SkYUVColorSpace colorSpace,
+            const GrBackendTexture yuvaTextures[],
+            SkYUVAIndex yuvaIndices[4],
+            SkISize size,
+            GrSurfaceOrigin origin,
+            const GrBackendTexture backendTexture,
+            sk_sp<SkColorSpace> imageColorSpace);
+
     bool onIsValid(GrContext*) const override;
 
     void resetContext(sk_sp<GrContext> newContext) {
@@ -139,6 +151,11 @@
     }
 
 private:
+    static sk_sp<SkImage> ConvertYUVATexturesToRGB(
+            GrContext* ctx, SkYUVColorSpace colorSpace, const GrBackendTexture yuvaTextures[],
+            SkYUVAIndex yuvaIndices[4], SkISize size, GrSurfaceOrigin origin,
+            SkBudgeted isBudgeted, GrRenderTargetContext* renderTargetContext);
+
     sk_sp<GrContext>      fContext;
     sk_sp<GrTextureProxy> fProxy;
     const SkAlphaType     fAlphaType;