b=1052518; remove --disable-webgl; r=jgilbert
authorVladimir Vukicevic <vladimir@pobox.com>
Tue, 12 Aug 2014 12:04:36 -0400
changeset 199027 50282184d46b74598021121b4ce11d5bd599c1d3
parent 199026 0f471ba800e1cace433237f434be481f6275eb05
child 199028 6f6e5610d6a82f3155a27ff426d9d256b5f81eb6
push id47560
push uservladimir@pobox.com
push dateTue, 12 Aug 2014 16:05:07 +0000
treeherdermozilla-inbound@50282184d46b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgilbert
bugs1052518
milestone34.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
b=1052518; remove --disable-webgl; r=jgilbert
configure.in
content/html/content/src/HTMLCanvasElement.cpp
dom/canvas/moz.build
dom/webidl/moz.build
gfx/gl/GLLibraryEGL.cpp
--- a/configure.in
+++ b/configure.in
@@ -4136,30 +4136,28 @@ dnl = Enable the toolkit as needed      
 dnl ========================================================
 
 MOZ_WIDGET_GTK=
 
 case "$MOZ_WIDGET_TOOLKIT" in
 
 cairo-windows)
     MOZ_WIDGET_TOOLKIT=windows
-    MOZ_WEBGL=1
     MOZ_PDF_PRINTING=1
     MOZ_INSTRUMENT_EVENT_LOOP=1
     if test -n "$GNU_CC"; then
         MOZ_FOLD_LIBS=
     fi
     ;;
 
 cairo-gtk3)
     MOZ_WIDGET_TOOLKIT=gtk3
     MOZ_ENABLE_GTK=1
     MOZ_ENABLE_GTK3=1
     MOZ_ENABLE_XREMOTE=1
-    MOZ_WEBGL=1
     MOZ_GL_DEFAULT_PROVIDER=GLX
 
     AC_DEFINE(MOZ_X11)
     MOZ_X11=1
     USE_FC_FREETYPE=1
 
     TK_CFLAGS='$(MOZ_GTK3_CFLAGS)'
     TK_LIBS='$(MOZ_GTK3_LIBS)'
@@ -4169,17 +4167,16 @@ cairo-gtk3)
     MOZ_INSTRUMENT_EVENT_LOOP=1
     ;;
 
 cairo-gtk2|cairo-gtk2-x11)
     MOZ_WIDGET_TOOLKIT=gtk2
     MOZ_ENABLE_GTK=1
     MOZ_ENABLE_GTK2=1
     MOZ_ENABLE_XREMOTE=1
-    MOZ_WEBGL=1
     MOZ_GL_DEFAULT_PROVIDER=GLX
 
     AC_DEFINE(MOZ_X11)
     MOZ_X11=1
     USE_FC_FREETYPE=1
 
     TK_CFLAGS='$(MOZ_GTK2_CFLAGS)'
     TK_LIBS='$(MOZ_GTK2_LIBS)'
@@ -4196,17 +4193,16 @@ cairo-qt)
     if test -z "$WITHOUT_X11"; then
       MOZ_ENABLE_XREMOTE=1
       MOZ_GL_DEFAULT_PROVIDER=GLX
       MOZ_X11=1
       AC_DEFINE(MOZ_X11)
       XT_LIBS=
     fi
 
-    MOZ_WEBGL=1
     USE_FC_FREETYPE=1
     TK_CFLAGS='$(MOZ_QT_CFLAGS)'
     TK_LIBS='$(MOZ_QT_LIBS)'
     AC_DEFINE(MOZ_WIDGET_QT)
     MOZ_PDF_PRINTING=1
     AC_DEFINE(QT_NO_KEYWORDS)
     ;;
 
@@ -4217,17 +4213,16 @@ cairo-cocoa)
     # Use -Wl as a trick to avoid -framework and framework names from
     # being separated by AC_SUBST_LIST.
     TK_LIBS='-Wl,-framework,CoreLocation -Wl,-framework,QuartzCore -Wl,-framework,Carbon -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,AddressBook -Wl,-framework,OpenGL'
     TK_CFLAGS="-DNO_X11"
     CFLAGS="$CFLAGS $TK_CFLAGS"
     CXXFLAGS="$CXXFLAGS $TK_CFLAGS"
     MOZ_USER_DIR="Mozilla"
     MOZ_FS_LAYOUT=bundle
-    MOZ_WEBGL=1
     MOZ_INSTRUMENT_EVENT_LOOP=1
     ;;
 
 cairo-uikit)
     MOZ_WIDGET_TOOLKIT=uikit
     AC_DEFINE(MOZ_WIDGET_UIKIT)
     LDFLAGS="$LDFLAGS -framework UIKit -lobjc"
     TK_CFLAGS="-DNO_X11"
@@ -4238,28 +4233,26 @@ cairo-uikit)
     MOZ_FS_LAYOUT=bundle
     ;;
 
 cairo-android)
     AC_DEFINE(MOZ_WIDGET_ANDROID)
     MOZ_WIDGET_TOOLKIT=android
     TK_CFLAGS='$(MOZ_CAIRO_CFLAGS) $(MOZ_PIXMAN_CFLAGS)'
     TK_LIBS='$(MOZ_CAIRO_LIBS) $(MOZ_PIXMAN_LIBS)'
-    MOZ_WEBGL=1
     MOZ_PDF_PRINTING=1
     MOZ_INSTRUMENT_EVENT_LOOP=1
     ;;
 
 cairo-gonk)
     AC_DEFINE(MOZ_WIDGET_GONK)
     AC_DEFINE(MOZ_TOUCH)
     MOZ_WIDGET_TOOLKIT=gonk
     TK_CFLAGS='$(MOZ_CAIRO_CFLAGS) $(MOZ_PIXMAN_CFLAGS)'
     TK_LIBS='$(MOZ_CAIRO_LIBS) $(MOZ_PIXMAN_LIBS)'
-    MOZ_WEBGL=1
     MOZ_PDF_PRINTING=1
     MOZ_TOUCH=1
     MOZ_INSTRUMENT_EVENT_LOOP=1
     ;;
 
 esac
 
 AC_SUBST(MOZ_PDF_PRINTING)
@@ -5667,35 +5660,24 @@ case "${target_cpu}" in
 i*86)
   MOZ_D3D_CPU_SUFFIX=x86
   ;;
 x86_64)
   MOZ_D3D_CPU_SUFFIX=x64
   ;;
 esac
 
-MOZ_ARG_DISABLE_BOOL(webgl,
-[  --disable-webgl     Disable building of the WebGL implementation],
-    MOZ_WEBGL_DISABLED=1,
-    MOZ_WEBGL_DISABLED=)
-
 MOZ_ARG_ENABLE_BOOL(require-all-d3dc-versions,
 [  --enable-require-all-d3dc-versions Require all versions of the D3D compiler needed for supported Windows systems.],
     MOZ_REQUIRE_ALL_D3DCS=1,
     MOZ_REQUIRE_ALL_D3DCS=)
 
-if test -n "$MOZ_WEBGL_DISABLED"; then
-  MOZ_WEBGL=
-  MOZ_ANGLE_RENDERER=
-fi
-
-if test -n "$MOZ_WEBGL"; then
-  AC_DEFINE(MOZ_WEBGL)
-fi
-
+# This is potentially set in external mozconfig files; if it's set,
+# then the build exposes the "webgl" context name, which is reserved
+# for conformant implementations.
 if test -n "$MOZ_WEBGL_CONFORMANT"; then
   AC_DEFINE(MOZ_WEBGL_CONFORMANT)
 fi
 
 dnl ========================================================
 dnl D3D compiler DLL
 dnl ========================================================
 MOZ_FOUND_D3D_COMPILERS=
@@ -8387,17 +8369,16 @@ AC_SUBST(MOZ_CALLGRIND)
 AC_SUBST(MOZ_VTUNE)
 AC_SUBST(MOZ_PROFILING)
 AC_SUBST(LIBICONV)
 AC_SUBST(MOZ_PLACES)
 AC_SUBST(MOZ_SOCIAL)
 AC_SUBST(MOZ_TOOLKIT_SEARCH)
 AC_SUBST(MOZ_FEEDS)
 AC_SUBST(NS_PRINTING)
-AC_SUBST(MOZ_WEBGL)
 AC_SUBST(MOZ_HELP_VIEWER)
 AC_SUBST(TOOLCHAIN_PREFIX)
 
 AC_SUBST(JAVA)
 AC_SUBST(JAVAC)
 AC_SUBST(JAVAH)
 AC_SUBST(JAR)
 AC_SUBST(JARSIGNER)
--- a/content/html/content/src/HTMLCanvasElement.cpp
+++ b/content/html/content/src/HTMLCanvasElement.cpp
@@ -30,20 +30,17 @@
 #include "nsIWritablePropertyBag2.h"
 #include "nsIXPConnect.h"
 #include "nsJSUtils.h"
 #include "nsLayoutUtils.h"
 #include "nsMathUtils.h"
 #include "nsNetUtil.h"
 #include "nsStreamUtils.h"
 #include "ActiveLayerTracker.h"
-
-#ifdef MOZ_WEBGL
 #include "WebGL2Context.h"
-#endif
 
 using namespace mozilla::layers;
 using namespace mozilla::gfx;
 
 NS_IMPL_NS_NEW_HTML_ELEMENT(Canvas)
 
 namespace {
 
@@ -631,32 +628,31 @@ HTMLCanvasElement::GetContextHelper(cons
     Telemetry::Accumulate(Telemetry::CANVAS_2D_USED, 1);
     nsRefPtr<CanvasRenderingContext2D> ctx =
       new CanvasRenderingContext2D();
 
     ctx->SetCanvasElement(this);
     ctx.forget(aContext);
     return NS_OK;
   }
-#ifdef MOZ_WEBGL
+
   if (WebGL2Context::IsSupported() &&
       aContextId.EqualsLiteral("experimental-webgl2"))
   {
     Telemetry::Accumulate(Telemetry::CANVAS_WEBGL_USED, 1);
     nsRefPtr<WebGL2Context> ctx = WebGL2Context::Create();
 
     if (ctx == nullptr) {
       return NS_ERROR_NOT_IMPLEMENTED;
     }
 
     ctx->SetCanvasElement(this);
     ctx.forget(aContext);
     return NS_OK;
   }
-#endif
 
   NS_ConvertUTF16toUTF8 ctxId(aContextId);
 
   // check that ctxId is clamped to A-Za-z0-9_-
   for (uint32_t i = 0; i < ctxId.Length(); i++) {
     if ((ctxId[i] < 'A' || ctxId[i] > 'Z') &&
         (ctxId[i] < 'a' || ctxId[i] > 'z') &&
         (ctxId[i] < '0' || ctxId[i] > '9') &&
--- a/dom/canvas/moz.build
+++ b/dom/canvas/moz.build
@@ -20,96 +20,93 @@ EXPORTS.mozilla.dom += [
     'CanvasGradient.h',
     'CanvasPattern.h',
     'CanvasRenderingContext2D.h',
     'CanvasUtils.h',
     'ImageData.h',
     'TextMetrics.h',
 ]
 
+# Canvas 2D and common sources
 UNIFIED_SOURCES += [
     'CanvasImageCache.cpp',
     'CanvasRenderingContext2D.cpp',
     'CanvasUtils.cpp',
     'DocumentRendererChild.cpp',
     'DocumentRendererParent.cpp',
     'ImageData.cpp',
     'ImageEncoder.cpp',
 ]
 
-if CONFIG['MOZ_WEBGL']:
-    UNIFIED_SOURCES += [
-        'MurmurHash3.cpp',
-        'WebGL1Context.cpp',
-        'WebGL2Context.cpp',
-        'WebGLActiveInfo.cpp',
-        'WebGLBindableName.cpp',
-        'WebGLBuffer.cpp',
-        'WebGLContext.cpp',
-        'WebGLContextAsyncQueries.cpp',
-        'WebGLContextBuffers.cpp',
-        'WebGLContextDraw.cpp',
-        'WebGLContextExtensions.cpp',
-        'WebGLContextFramebufferOperations.cpp',
-        'WebGLContextGL.cpp',
-        'WebGLContextLossTimer.cpp',
-        'WebGLContextReporter.cpp',
-        'WebGLContextState.cpp',
-        'WebGLContextUtils.cpp',
-        'WebGLContextValidate.cpp',
-        'WebGLContextVertexArray.cpp',
-        'WebGLContextVertices.cpp',
-        'WebGLElementArrayCache.cpp',
-        'WebGLExtensionBase.cpp',
-        'WebGLExtensionBlendMinMax.cpp',
-        'WebGLExtensionColorBufferFloat.cpp',
-        'WebGLExtensionColorBufferHalfFloat.cpp',
-        'WebGLExtensionCompressedTextureATC.cpp',
-        'WebGLExtensionCompressedTextureETC1.cpp',
-        'WebGLExtensionCompressedTexturePVRTC.cpp',
-        'WebGLExtensionCompressedTextureS3TC.cpp',
-        'WebGLExtensionDebugRendererInfo.cpp',
-        'WebGLExtensionDebugShaders.cpp',
-        'WebGLExtensionDepthTexture.cpp',
-        'WebGLExtensionDrawBuffers.cpp',
-        'WebGLExtensionElementIndexUint.cpp',
-        'WebGLExtensionFragDepth.cpp',
-        'WebGLExtensionInstancedArrays.cpp',
-        'WebGLExtensionLoseContext.cpp',
-        'WebGLExtensionShaderTextureLod.cpp',
-        'WebGLExtensionSRGB.cpp',
-        'WebGLExtensionStandardDerivatives.cpp',
-        'WebGLExtensionTextureFilterAnisotropic.cpp',
-        'WebGLExtensionTextureFloat.cpp',
-        'WebGLExtensionTextureFloatLinear.cpp',
-        'WebGLExtensionTextureHalfFloat.cpp',
-        'WebGLExtensionTextureHalfFloatLinear.cpp',
-        'WebGLExtensionVertexArray.cpp',
-        'WebGLFramebuffer.cpp',
-        'WebGLFramebufferAttachable.cpp',
-        'WebGLObjectModel.cpp',
-        'WebGLProgram.cpp',
-        'WebGLQuery.cpp',
-        'WebGLRenderbuffer.cpp',
-        'WebGLShader.cpp',
-        'WebGLShaderPrecisionFormat.cpp',
-        'WebGLTexelConversions.cpp',
-        'WebGLTexture.cpp',
-        'WebGLUniformLocation.cpp',
-        'WebGLVertexArray.cpp',
-        'WebGLVertexArrayFake.cpp',
-        'WebGLVertexArrayGL.cpp',
-    ]
-    LOCAL_INCLUDES += [
-        '/js/xpconnect/wrappers',
-    ]
-else:
-    UNIFIED_SOURCES += [
-        'WebGLContextNotSupported.cpp',
-    ]
+# WebGL Sources
+UNIFIED_SOURCES += [
+    'MurmurHash3.cpp',
+    'WebGL1Context.cpp',
+    'WebGL2Context.cpp',
+    'WebGLActiveInfo.cpp',
+    'WebGLBindableName.cpp',
+    'WebGLBuffer.cpp',
+    'WebGLContext.cpp',
+    'WebGLContextAsyncQueries.cpp',
+    'WebGLContextBuffers.cpp',
+    'WebGLContextDraw.cpp',
+    'WebGLContextExtensions.cpp',
+    'WebGLContextFramebufferOperations.cpp',
+    'WebGLContextGL.cpp',
+    'WebGLContextLossTimer.cpp',
+    'WebGLContextReporter.cpp',
+    'WebGLContextState.cpp',
+    'WebGLContextUtils.cpp',
+    'WebGLContextValidate.cpp',
+    'WebGLContextVertexArray.cpp',
+    'WebGLContextVertices.cpp',
+    'WebGLElementArrayCache.cpp',
+    'WebGLExtensionBase.cpp',
+    'WebGLExtensionBlendMinMax.cpp',
+    'WebGLExtensionColorBufferFloat.cpp',
+    'WebGLExtensionColorBufferHalfFloat.cpp',
+    'WebGLExtensionCompressedTextureATC.cpp',
+    'WebGLExtensionCompressedTextureETC1.cpp',
+    'WebGLExtensionCompressedTexturePVRTC.cpp',
+    'WebGLExtensionCompressedTextureS3TC.cpp',
+    'WebGLExtensionDebugRendererInfo.cpp',
+    'WebGLExtensionDebugShaders.cpp',
+    'WebGLExtensionDepthTexture.cpp',
+    'WebGLExtensionDrawBuffers.cpp',
+    'WebGLExtensionElementIndexUint.cpp',
+    'WebGLExtensionFragDepth.cpp',
+    'WebGLExtensionInstancedArrays.cpp',
+    'WebGLExtensionLoseContext.cpp',
+    'WebGLExtensionShaderTextureLod.cpp',
+    'WebGLExtensionSRGB.cpp',
+    'WebGLExtensionStandardDerivatives.cpp',
+    'WebGLExtensionTextureFilterAnisotropic.cpp',
+    'WebGLExtensionTextureFloat.cpp',
+    'WebGLExtensionTextureFloatLinear.cpp',
+    'WebGLExtensionTextureHalfFloat.cpp',
+    'WebGLExtensionTextureHalfFloatLinear.cpp',
+    'WebGLExtensionVertexArray.cpp',
+    'WebGLFramebuffer.cpp',
+    'WebGLFramebufferAttachable.cpp',
+    'WebGLObjectModel.cpp',
+    'WebGLProgram.cpp',
+    'WebGLQuery.cpp',
+    'WebGLRenderbuffer.cpp',
+    'WebGLShader.cpp',
+    'WebGLShaderPrecisionFormat.cpp',
+    'WebGLTexelConversions.cpp',
+    'WebGLTexture.cpp',
+    'WebGLUniformLocation.cpp',
+    'WebGLVertexArray.cpp',
+    'WebGLVertexArrayFake.cpp',
+    'WebGLVertexArrayGL.cpp',
+]
+LOCAL_INCLUDES += [
+    '/js/xpconnect/wrappers',
+]
 
 FAIL_ON_WARNINGS = True
 
 MSVC_ENABLE_PGO = True
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
--- a/dom/webidl/moz.build
+++ b/dom/webidl/moz.build
@@ -473,16 +473,18 @@ WEBIDL_FILES = [
     'VideoPlaybackQuality.webidl',
     'VideoStreamTrack.webidl',
     'VideoTrack.webidl',
     'VideoTrackList.webidl',
     'VTTCue.webidl',
     'VTTRegion.webidl',
     'WaveShaperNode.webidl',
     'WebComponents.webidl',
+    'WebGL2RenderingContext.webidl',
+    'WebGLRenderingContext.webidl',
     'WebSocket.webidl',
     'WheelEvent.webidl',
     'WifiOptions.webidl',
     'Worker.webidl',
     'WorkerGlobalScope.webidl',
     'WorkerLocation.webidl',
     'WorkerNavigator.webidl',
     'XMLDocument.webidl',
@@ -499,22 +501,16 @@ WEBIDL_FILES = [
     'XULElement.webidl',
 ]
 
 if CONFIG['MOZ_AUDIO_CHANNEL_MANAGER']:
     WEBIDL_FILES += [
         'AudioChannelManager.webidl',
     ]
 
-if CONFIG['MOZ_WEBGL']:
-    WEBIDL_FILES += [
-        'WebGL2RenderingContext.webidl',
-        'WebGLRenderingContext.webidl',
-    ]
-
 if CONFIG['MOZ_WEBRTC']:
     WEBIDL_FILES += [
         'DataChannel.webidl',
         'MediaStreamList.webidl',
         'PeerConnectionImpl.webidl',
         'PeerConnectionImplEnums.webidl',
         'PeerConnectionObserver.webidl',
         'PeerConnectionObserverEnums.webidl',
--- a/gfx/gl/GLLibraryEGL.cpp
+++ b/gfx/gl/GLLibraryEGL.cpp
@@ -109,17 +109,16 @@ GLLibraryEGL::EnsureInitialized()
     mozilla::ScopedGfxFeatureReporter reporter("EGL");
 
 #ifdef MOZ_B2G
     if (!sCurrentContext.init())
 	    MOZ_CRASH("Tls init failed");
 #endif
 
 #ifdef XP_WIN
-#ifdef MOZ_WEBGL
     if (!mEGLLibrary) {
         // On Windows, the GLESv2, EGL and DXSDK libraries are shipped with libxul and
         // we should look for them there. We have to load the libs in this
         // order, because libEGL.dll depends on libGLESv2.dll which depends on the DXSDK
         // libraries. This matters especially for WebRT apps which are in a different directory.
         // See bug 760323 and bug 749459
 
         // Also note that we intentionally leak the libs we load.
@@ -148,17 +147,17 @@ GLLibraryEGL::EnsureInitialized()
 
         LoadLibraryForEGLOnWindows(NS_LITERAL_STRING("libGLESv2.dll"));
 
         mEGLLibrary = LoadLibraryForEGLOnWindows(NS_LITERAL_STRING("libEGL.dll"));
 
         if (!mEGLLibrary)
             return false;
     }
-#endif // MOZ_WEBGL
+
 #else // !Windows
 
     // On non-Windows (Android) we use system copies of libEGL. We look for
     // the APITrace lib, libEGL.so, and libEGL.so.1 in that order.
 
 #if defined(ANDROID)
     if (!mEGLLibrary)
         mEGLLibrary = LoadApitraceLibrary();