Bug 806094 - Remove USE_ANGLE - r=jgilbert
authorBenoit Jacob <bjacob@mozilla.com>
Fri, 09 Nov 2012 17:04:43 -0500
changeset 112884 a47525b9352836b35eca12470c9d1f29e2779894
parent 112883 28469cfc8eecaa9e3b5d19970a408012ff49fd53
child 112885 ecf947ebf44f0159f3c9def224c68553235a84e9
push id17815
push userbjacob@mozilla.com
push dateFri, 09 Nov 2012 22:04:59 +0000
treeherdermozilla-inbound@a47525b93528 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgilbert
bugs806094
milestone19.0a1
first release with
nightly linux32
a47525b93528 / 19.0a1 / 20121110030714 / files
nightly linux64
a47525b93528 / 19.0a1 / 20121110030714 / files
nightly mac
a47525b93528 / 19.0a1 / 20121110030714 / files
nightly win32
a47525b93528 / 19.0a1 / 20121110030714 / files
nightly win64
a47525b93528 / 19.0a1 / 20121110030714 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 806094 - Remove USE_ANGLE - r=jgilbert
content/canvas/src/Makefile.in
content/canvas/src/WebGLContextGL.cpp
content/canvas/src/WebGLContextValidate.cpp
--- a/content/canvas/src/Makefile.in
+++ b/content/canvas/src/Makefile.in
@@ -58,19 +58,16 @@ CPPSRCS += \
 	WebGLRenderbuffer.cpp \
 	WebGLShader.cpp \
 	WebGLShaderPrecisionFormat.cpp \
 	WebGLTexelConversions.cpp \
 	WebGLTexture.cpp \
 	WebGLUniformLocation.cpp \
 	$(NULL)
 
-DEFINES += -DUSE_ANGLE
-USE_ANGLE=1
-
 LOCAL_INCLUDES += \
 	-I$(topsrcdir)/js/xpconnect/wrappers \
 	$(NULL)
 
 else
 
 CPPSRCS += WebGLContextNotSupported.cpp
 
--- a/content/canvas/src/WebGLContextGL.cpp
+++ b/content/canvas/src/WebGLContextGL.cpp
@@ -4129,17 +4129,16 @@ WebGLContext::CompileShader(WebGLShader 
 
     shader->SetCompileStatus(false);
 
     MakeContextCurrent();
 
     ShShaderOutput targetShaderSourceLanguage = gl->IsGLES2() ? SH_ESSL_OUTPUT : SH_GLSL_OUTPUT;
     bool useShaderSourceTranslation = true;
 
-#if defined(USE_ANGLE)
     if (shader->NeedsTranslation() && mShaderValidation) {
         ShHandle compiler = 0;
         ShBuiltInResources resources;
         memset(&resources, 0, sizeof(ShBuiltInResources));
 
         resources.MaxVertexAttribs = mGLMaxVertexAttribs;
         resources.MaxVertexUniformVectors = mGLMaxVertexUniformVectors;
         resources.MaxVaryingVectors = mGLMaxVaryingVectors;
@@ -4298,17 +4297,16 @@ WebGLContext::CompileShader(WebGLShader 
 
         ShDestruct(compiler);
 
         gl->fCompileShader(shadername);
         GLint ok;
         gl->fGetShaderiv(shadername, LOCAL_GL_COMPILE_STATUS, &ok);
         shader->SetCompileStatus(ok);
     }
-#endif
 }
 
 void
 WebGLContext::CompressedTexImage2D(WebGLenum target, WebGLint level, WebGLenum internalformat,
                                    WebGLsizei width, WebGLsizei height, WebGLint border,
                                    ArrayBufferView& view)
 {
     if (!IsContextStable()) {
--- a/content/canvas/src/WebGLContextValidate.cpp
+++ b/content/canvas/src/WebGLContextValidate.cpp
@@ -6,19 +6,17 @@
 #include "WebGLContext.h"
 
 #include "mozilla/CheckedInt.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/Services.h"
 
 #include "jsfriendapi.h"
 
-#if defined(USE_ANGLE)
 #include "angle/ShaderLang.h"
-#endif
 
 #include <algorithm>
 
 #include "mozilla/Services.h"
 #include "nsIObserverService.h"
 
 using namespace mozilla;
 
@@ -996,25 +994,23 @@ WebGLContext::InitAndValidateGL()
 #endif
 
     // Check the shader validator pref
     NS_ENSURE_TRUE(Preferences::GetRootBranch(), false);
 
     mShaderValidation =
         Preferences::GetBool("webgl.shader_validator", mShaderValidation);
 
-#if defined(USE_ANGLE)
     // initialize shader translator
     if (mShaderValidation) {
         if (!ShInitialize()) {
             GenerateWarning("GLSL translator initialization failed!");
             return false;
         }
     }
-#endif
 
     // Mesa can only be detected with the GL_VERSION string, of the form "2.1 Mesa 7.11.0"
     mIsMesa = strstr((const char *)(gl->fGetString(LOCAL_GL_VERSION)), "Mesa");
 
     // notice that the point of calling GetAndClearError here is not only to check for error,
     // it is also to reset the error flags so that a subsequent WebGL getError call will give the correct result.
     error = gl->GetAndClearError();
     if (error != LOCAL_GL_NO_ERROR) {