diff --git a/content/canvas/src/Makefile.in b/content/canvas/src/Makefile.in index b03f5e1d149c..c555c153cffe 100644 --- a/content/canvas/src/Makefile.in +++ b/content/canvas/src/Makefile.in @@ -79,14 +79,24 @@ CPPSRCS += \ NativeJSContext.cpp \ $(NULL) +# We can't build ANGLE on linux-64 until build bug 560894 and related +# are fixed. +ifneq ($(OS_ARCH)_$(OS_TEST),Linux_x86_64) +DEFINES += -DUSE_ANGLE +endif + ifndef MOZ_ENABLE_LIBXUL +ifdef USE_ANGLE + SHARED_LIBRARY_LIBS += \ $(DEPTH)/gfx/angle/$(LIB_PREFIX)angle.$(LIB_SUFFIX) \ $(NULL) endif +endif + else CPPSRCS += WebGLContextNotSupported.cpp diff --git a/content/canvas/src/WebGLContextGL.cpp b/content/canvas/src/WebGLContextGL.cpp index bb2882db367e..799aab0792d7 100644 --- a/content/canvas/src/WebGLContextGL.cpp +++ b/content/canvas/src/WebGLContextGL.cpp @@ -56,7 +56,7 @@ #include "jstypedarray.h" -#ifndef USE_GLES2 +#if !defined(USE_GLES2) && defined(USE_ANGLE) // shader translator #include "angle/ShaderLang.h" #endif @@ -2831,7 +2831,7 @@ WebGLContext::CompileShader(nsIWebGLShader *sobj) MakeContextCurrent(); -#ifndef USE_GLES2 +#if !defined(USE_GLES2) && defined(USE_ANGLE) if (shader->NeedsTranslation() && mShaderValidation) { ShHandle compiler = 0; int debugFlags = 0; diff --git a/content/canvas/src/WebGLContextValidate.cpp b/content/canvas/src/WebGLContextValidate.cpp index ea549be742f3..8567e31c7426 100644 --- a/content/canvas/src/WebGLContextValidate.cpp +++ b/content/canvas/src/WebGLContextValidate.cpp @@ -41,7 +41,7 @@ #include "CheckedInt.h" -#ifndef USE_GLES2 +#if !defined(USE_GLES2) && defined(USE_ANGLE) #include "angle/ShaderLang.h" #endif @@ -419,7 +419,9 @@ WebGLContext::InitAndValidateGL() // gl_PointSize is always available in ES2 GLSL, but has to be // specifically enabled on desktop GLSL. gl->fEnable(LOCAL_GL_VERTEX_PROGRAM_POINT_SIZE); +#endif +#if !defined(USE_GLES2) && defined(USE_ANGLE) // initialize shader translator static bool didTranslatorInit = false; if (!didTranslatorInit && mShaderValidation) { diff --git a/gfx/Makefile.in b/gfx/Makefile.in index 4335300ef2d0..61b625dee8e4 100644 --- a/gfx/Makefile.in +++ b/gfx/Makefile.in @@ -56,7 +56,9 @@ ifndef BUILD_STATIC_LIBS DIRS += ycbcr endif +ifneq ($(OS_ARCH)$(OS_TEST),Linuxx86_64) DIRS += angle +endif DIRS += src qcms layers harfbuzz/src thebes src/thebes diff --git a/toolkit/library/libxul-config.mk b/toolkit/library/libxul-config.mk index dc879512bf19..5405f068c48c 100644 --- a/toolkit/library/libxul-config.mk +++ b/toolkit/library/libxul-config.mk @@ -301,7 +301,12 @@ ifeq ($(MOZ_WIDGET_TOOLKIT),android) COMPONENT_LIBS += widget_android endif -STATIC_LIBS += thebes ycbcr angle +STATIC_LIBS += thebes ycbcr + +ifneq ($(OS_ARCH)_$(OS_TEST),Linux_x86_64) +STATIC_LIBS += angle +endif + COMPONENT_LIBS += gkgfxthebes ifeq (windows,$(MOZ_WIDGET_TOOLKIT))