Build failure in WebGL2 when Video feature is disabled
authortimothy@hatcher.name <timothy@hatcher.name@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Dec 2017 22:36:21 +0000 (22:36 +0000)
committertimothy@hatcher.name <timothy@hatcher.name@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Dec 2017 22:36:21 +0000 (22:36 +0000)
https://bugs.webkit.org/show_bug.cgi?id=180946

Reviewed by Brian Burg.

* html/canvas/WebGL2RenderingContext.h: Make TexImageSource conditional on ENABLE(VIDEO).
* html/canvas/WebGL2RenderingContext.idl: Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@226142 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/html/canvas/WebGL2RenderingContext.h
Source/WebCore/html/canvas/WebGL2RenderingContext.idl

index 93ca8d4..0966695 100644 (file)
@@ -1,3 +1,13 @@
+2017-12-19  Timothy Hatcher  <timothy@hatcher.name>
+
+        Build failure in WebGL2 when Video feature is disabled
+        https://bugs.webkit.org/show_bug.cgi?id=180946
+
+        Reviewed by Brian Burg.
+
+        * html/canvas/WebGL2RenderingContext.h: Make TexImageSource conditional on ENABLE(VIDEO).
+        * html/canvas/WebGL2RenderingContext.idl: Ditto.
+
 2017-12-19  Chris Dumez  <cdumez@apple.com>
 
         scopeURL should start with the provided scriptURL
index d3337da..a1760d9 100644 (file)
@@ -66,6 +66,12 @@ public:
     void texStorage2D(GC3Denum target, GC3Dsizei levels, GC3Denum internalFormat, GC3Dsizei width, GC3Dsizei height);
     void texStorage3D(GC3Denum target, GC3Dsizei levels, GC3Denum internalFormat, GC3Dsizei width, GC3Dsizei height, GC3Dsizei depth);
 
+#if ENABLE(VIDEO)
+    using TexImageSource = WTF::Variant<RefPtr<ImageData>, RefPtr<HTMLImageElement>, RefPtr<HTMLCanvasElement>, RefPtr<HTMLVideoElement>>;
+#else
+    using TexImageSource = WTF::Variant<RefPtr<ImageData>, RefPtr<HTMLImageElement>, RefPtr<HTMLCanvasElement>>;
+#endif
+
     using WebGLRenderingContextBase::texImage2D;
     void texImage2D(GC3Denum target, GC3Dint level, GC3Dint internalformat, GC3Dsizei width, GC3Dsizei height, GC3Dint border, GC3Denum format, GC3Denum type, GC3Dint64 pboOffset);
     void texImage2D(GC3Denum target, GC3Dint level, GC3Dint internalformat, GC3Dsizei width, GC3Dsizei height, GC3Dint border, GC3Denum format, GC3Denum type, TexImageSource&&);
@@ -83,7 +89,6 @@ public:
 
     void texSubImage3D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset, GC3Dint zoffset, GC3Dsizei width, GC3Dsizei height, GC3Dsizei depth, GC3Denum format, GC3Denum type, GC3Dint64 pboOffset);
     void texSubImage3D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset, GC3Dint zoffset, GC3Dsizei width, GC3Dsizei height, GC3Dsizei depth, GC3Denum format, GC3Denum type, RefPtr<ArrayBufferView>&& pixels, GC3Duint srcOffset);
-    using TexImageSource = WTF::Variant<RefPtr<ImageData>, RefPtr<HTMLImageElement>, RefPtr<HTMLCanvasElement>, RefPtr<HTMLVideoElement>>;
     void texSubImage3D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset, GC3Dint zoffset, GC3Dsizei width, GC3Dsizei height, GC3Dsizei depth, GC3Denum format, GC3Denum type, TexImageSource&&);
 
     void copyTexSubImage3D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset, GC3Dint zoffset, GC3Dint x, GC3Dint y, GC3Dsizei width, GC3Dsizei height);
index 023b1f6..9656e31 100644 (file)
@@ -45,7 +45,11 @@ typedef (Int32Array or sequence<GLint>) Int32List;
 typedef (Uint32Array or sequence<GLuint>) Uint32List;
 
 // FIXME: Should allow ImageBitmap too.
+#ifdef ENABLE_VIDEO
 typedef (ImageData or HTMLImageElement or HTMLCanvasElement or HTMLVideoElement) TexImageSource;
+#else
+typedef (ImageData or HTMLImageElement or HTMLCanvasElement) TexImageSource;
+#endif
 
 [
     Conditional=WEBGL2,