From d023bfc631565dae67907de8261f44289ddd96e2 Mon Sep 17 00:00:00 2001 From: Vladimir Vukicevic Date: Fri, 18 Sep 2009 16:48:35 -0700 Subject: [PATCH] b=517557; remove --enable-canvas; r=ted --- config/autoconf.mk.in | 2 -- configure.in | 20 -------------------- content/canvas/public/Makefile.in | 7 +------ content/canvas/src/Makefile.in | 4 ++-- dom/base/nsDOMClassInfo.cpp | 16 ++-------------- dom/base/nsDOMClassInfoID.h | 6 ++---- dom/interfaces/canvas/Makefile.in | 9 ++++----- layout/build/Makefile.in | 5 ----- layout/build/nsLayoutModule.cpp | 16 ---------------- toolkit/library/libxul-config.mk | 3 --- toolkit/library/libxul-rules.mk | 2 -- 11 files changed, 11 insertions(+), 79 deletions(-) diff --git a/config/autoconf.mk.in b/config/autoconf.mk.in index 0c8a585972cf..06541364dcc5 100644 --- a/config/autoconf.mk.in +++ b/config/autoconf.mk.in @@ -232,8 +232,6 @@ MOZ_PERMISSIONS = @MOZ_PERMISSIONS@ MOZ_XTF = @MOZ_XTF@ MOZ_NO_INSPECTOR_APIS = @MOZ_NO_INSPECTOR_APIS@ MOZ_SVG = @MOZ_SVG@ -MOZ_ENABLE_CANVAS = @MOZ_ENABLE_CANVAS@ -MOZ_ENABLE_CANVAS3D = @MOZ_ENABLE_CANVAS3D@ MOZ_CAIRO_CFLAGS = @MOZ_CAIRO_CFLAGS@ MOZ_SMIL = @MOZ_SMIL@ MOZ_XSLT_STANDALONE = @MOZ_XSLT_STANDALONE@ diff --git a/configure.in b/configure.in index a98ebd36d59b..960ac39f5fc8 100644 --- a/configure.in +++ b/configure.in @@ -4464,8 +4464,6 @@ MOZ_ACTIVEX_SCRIPTING_SUPPORT= MOZ_BRANDING_DIRECTORY= MOZ_OFFICIAL_BRANDING= MOZ_DBGRINFO_MODULES= -MOZ_ENABLE_CANVAS=1 -MOZ_ENABLE_CANVAS3D=1 MOZ_FEEDS=1 MOZ_IMG_DECODERS_DEFAULT="png gif jpeg bmp icon" MOZ_IMG_ENCODERS_DEFAULT="png jpeg" @@ -5760,24 +5758,6 @@ if test "$MOZ_MATHML"; then AC_DEFINE(MOZ_MATHML) fi -dnl ======================================================== -dnl Canvas -dnl ======================================================== -if test -n "$MOZ_ENABLE_CANVAS"; then - AC_DEFINE(MOZ_ENABLE_CANVAS) -fi -AC_SUBST(MOZ_ENABLE_CANVAS) - -MOZ_ARG_DISABLE_BOOL(webgl, -[ --disable-webgl Disable WebGL context (canvas 3d)], - MOZ_ENABLE_CANVAS3D=, - MOZ_ENABLE_CANVAS3D=1 ) - -if test -n "$MOZ_ENABLE_CANVAS3D"; then - AC_DEFINE(MOZ_ENABLE_CANVAS3D) -fi -AC_SUBST(MOZ_ENABLE_CANVAS3D) - dnl ======================================================== dnl SVG dnl ======================================================== diff --git a/content/canvas/public/Makefile.in b/content/canvas/public/Makefile.in index 8f209fd02638..cc4b2fa16121 100644 --- a/content/canvas/public/Makefile.in +++ b/content/canvas/public/Makefile.in @@ -43,6 +43,7 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk MODULE = content +XPIDL_MODULE = content_canvas EXPORTS = \ nsICanvasRenderingContextInternal.h \ @@ -50,14 +51,8 @@ EXPORTS = \ WebGLArray.h \ $(NULL) -ifdef MOZ_ENABLE_CANVAS3D - -XPIDL_MODULE = content_canvas - XPIDLSRCS = \ nsICanvasGLPrivate.idl \ $(NULL) -endif - include $(topsrcdir)/config/rules.mk diff --git a/content/canvas/src/Makefile.in b/content/canvas/src/Makefile.in index b1b3abcc5215..47d819f02f39 100644 --- a/content/canvas/src/Makefile.in +++ b/content/canvas/src/Makefile.in @@ -57,10 +57,10 @@ CPPSRCS = \ # only allow on platforms/toolkits we know are good ifneq (,$(NS_OSSO)$(WINCE)$(filter-out windows cocoa gtk2,$(MOZ_WIDGET_TOOLKIT))) -MOZ_ENABLE_CANVAS3D= +DISABLE_WEBGL=1 endif -ifdef MOZ_ENABLE_CANVAS3D +ifndef DISABLE_WEBGL CPPSRCS += \ WebGLContext.cpp \ diff --git a/dom/base/nsDOMClassInfo.cpp b/dom/base/nsDOMClassInfo.cpp index 8ea742970cd3..7cf32ba482f3 100644 --- a/dom/base/nsDOMClassInfo.cpp +++ b/dom/base/nsDOMClassInfo.cpp @@ -430,13 +430,9 @@ #include "nsIDOMSVGZoomEvent.h" #endif // MOZ_SVG -#ifdef MOZ_ENABLE_CANVAS #include "nsIDOMCanvasRenderingContext2D.h" -#ifdef MOZ_ENABLE_CANVAS3D #include "nsICanvasRenderingContextWebGL.h" #include "WebGLArray.h" -#endif -#endif #include "nsIImageDocument.h" @@ -1148,7 +1144,6 @@ static nsDOMClassInfoData sClassInfoData[] = { NS_DEFINE_CLASSINFO_DATA(HTMLCanvasElement, nsHTMLElementSH, ELEMENT_SCRIPTABLE_FLAGS) -#ifdef MOZ_ENABLE_CANVAS NS_DEFINE_CLASSINFO_DATA(CanvasRenderingContext2D, nsDOMGenericSH, DOM_DEFAULT_SCRIPTABLE_FLAGS) NS_DEFINE_CLASSINFO_DATA(CanvasGradient, nsDOMGenericSH, @@ -1157,7 +1152,6 @@ static nsDOMClassInfoData sClassInfoData[] = { DOM_DEFAULT_SCRIPTABLE_FLAGS) NS_DEFINE_CLASSINFO_DATA(TextMetrics, nsDOMGenericSH, DOM_DEFAULT_SCRIPTABLE_FLAGS) -#endif // MOZ_ENABLE_CANVAS NS_DEFINE_CLASSINFO_DATA(SmartCardEvent, nsDOMGenericSH, DOM_DEFAULT_SCRIPTABLE_FLAGS) @@ -1318,7 +1312,6 @@ static nsDOMClassInfoData sClassInfoData[] = { NS_DEFINE_CLASSINFO_DATA(Worker, nsDOMGenericSH, DOM_DEFAULT_SCRIPTABLE_FLAGS) -#ifdef MOZ_ENABLE_CANVAS3D NS_DEFINE_CLASSINFO_DATA(CanvasRenderingContextWebGL, nsDOMGenericSH, DOM_DEFAULT_SCRIPTABLE_FLAGS) NS_DEFINE_CLASSINFO_DATA(WebGLBuffer, nsDOMGenericSH, @@ -1347,7 +1340,6 @@ static nsDOMClassInfoData sClassInfoData[] = { DOM_DEFAULT_SCRIPTABLE_FLAGS) NS_DEFINE_CLASSINFO_DATA(WebGLUnsignedIntArray, nsDOMGenericSH, DOM_DEFAULT_SCRIPTABLE_FLAGS) -#endif }; // Objects that shuld be constructable through |new Name();| @@ -1382,7 +1374,8 @@ struct nsConstructorFuncMapData static const nsConstructorFuncMapData kConstructorFuncMap[] = { NS_DEFINE_CONSTRUCTOR_FUNC_DATA(Worker, nsDOMWorker::NewWorker) -#ifdef MOZ_ENABLE_CANVAS3D + + // WebGL Array Types NS_DEFINE_CONSTRUCTOR_FUNC_DATA(WebGLFloatArray, NS_NewCanvasFloatArray) NS_DEFINE_CONSTRUCTOR_FUNC_DATA(WebGLByteArray, NS_NewCanvasByteArray) NS_DEFINE_CONSTRUCTOR_FUNC_DATA(WebGLUnsignedByteArray, NS_NewCanvasUnsignedByteArray) @@ -1390,7 +1383,6 @@ static const nsConstructorFuncMapData kConstructorFuncMap[] = NS_DEFINE_CONSTRUCTOR_FUNC_DATA(WebGLUnsignedShortArray, NS_NewCanvasUnsignedShortArray) NS_DEFINE_CONSTRUCTOR_FUNC_DATA(WebGLIntArray, NS_NewCanvasIntArray) NS_DEFINE_CONSTRUCTOR_FUNC_DATA(WebGLUnsignedIntArray, NS_NewCanvasUnsignedIntArray) -#endif }; nsIXPConnect *nsDOMClassInfo::sXPConnect = nsnull; @@ -3391,7 +3383,6 @@ nsDOMClassInfo::Init() DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES DOM_CLASSINFO_MAP_END -#ifdef MOZ_ENABLE_CANVAS DOM_CLASSINFO_MAP_BEGIN(CanvasRenderingContext2D, nsIDOMCanvasRenderingContext2D) DOM_CLASSINFO_MAP_ENTRY(nsIDOMCanvasRenderingContext2D) DOM_CLASSINFO_MAP_END @@ -3407,7 +3398,6 @@ nsDOMClassInfo::Init() DOM_CLASSINFO_MAP_BEGIN(TextMetrics, nsIDOMTextMetrics) DOM_CLASSINFO_MAP_ENTRY(nsIDOMTextMetrics) DOM_CLASSINFO_MAP_END -#endif // MOZ_ENABLE_CANVAS DOM_CLASSINFO_MAP_BEGIN(XSLTProcessor, nsIXSLTProcessor) DOM_CLASSINFO_MAP_ENTRY(nsIXSLTProcessor) @@ -3641,7 +3631,6 @@ nsDOMClassInfo::Init() DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget) DOM_CLASSINFO_MAP_END -#ifdef MOZ_ENABLE_CANVAS3D DOM_CLASSINFO_MAP_BEGIN(CanvasRenderingContextWebGL, nsICanvasRenderingContextWebGL) DOM_CLASSINFO_MAP_ENTRY(nsICanvasRenderingContextWebGL) DOM_CLASSINFO_MAP_END @@ -3697,7 +3686,6 @@ nsDOMClassInfo::Init() DOM_CLASSINFO_MAP_BEGIN(WebGLUnsignedIntArray, nsIWebGLUnsignedIntArray) DOM_CLASSINFO_MAP_ENTRY(nsIWebGLUnsignedIntArray) DOM_CLASSINFO_MAP_END -#endif #ifdef NS_DEBUG { diff --git a/dom/base/nsDOMClassInfoID.h b/dom/base/nsDOMClassInfoID.h index b09a9bdc1455..125b5356df79 100644 --- a/dom/base/nsDOMClassInfoID.h +++ b/dom/base/nsDOMClassInfoID.h @@ -354,12 +354,10 @@ enum nsDOMClassInfoID { // Canvas eDOMClassInfo_HTMLCanvasElement_id, -#ifdef MOZ_ENABLE_CANVAS eDOMClassInfo_CanvasRenderingContext2D_id, eDOMClassInfo_CanvasGradient_id, eDOMClassInfo_CanvasPattern_id, eDOMClassInfo_TextMetrics_id, -#endif // SmartCard Events eDOMClassInfo_SmartCardEvent_id, @@ -463,7 +461,7 @@ enum nsDOMClassInfoID { eDOMClassInfo_Worker_id, -#ifdef MOZ_ENABLE_CANVAS3D + // WebGL eDOMClassInfo_CanvasRenderingContextWebGL_id, eDOMClassInfo_WebGLBuffer_id, eDOMClassInfo_WebGLTexture_id, @@ -472,6 +470,7 @@ enum nsDOMClassInfoID { eDOMClassInfo_WebGLFramebuffer_id, eDOMClassInfo_WebGLRenderbuffer_id, + // WebGL Buffers eDOMClassInfo_WebGLFloatArray_id, eDOMClassInfo_WebGLByteArray_id, eDOMClassInfo_WebGLUnsignedByteArray_id, @@ -479,7 +478,6 @@ enum nsDOMClassInfoID { eDOMClassInfo_WebGLUnsignedShortArray_id, eDOMClassInfo_WebGLIntArray_id, eDOMClassInfo_WebGLUnsignedIntArray_id, -#endif // This one better be the last one in this list eDOMClassInfoIDCount diff --git a/dom/interfaces/canvas/Makefile.in b/dom/interfaces/canvas/Makefile.in index 0bac0097e722..4d2dfa652377 100644 --- a/dom/interfaces/canvas/Makefile.in +++ b/dom/interfaces/canvas/Makefile.in @@ -46,10 +46,9 @@ MODULE = dom XPIDL_MODULE = dom_canvas GRE_MODULE = 1 -XPIDLSRCS = nsIDOMCanvasRenderingContext2D.idl - -ifdef MOZ_ENABLE_CANVAS3D -XPIDLSRCS += nsICanvasRenderingContextWebGL.idl -endif +XPIDLSRCS = \ + nsIDOMCanvasRenderingContext2D.idl \ + nsICanvasRenderingContextWebGL.idl \ + $(NULL) include $(topsrcdir)/config/rules.mk diff --git a/layout/build/Makefile.in b/layout/build/Makefile.in index 53c27aa8ac2b..9190274dd13d 100644 --- a/layout/build/Makefile.in +++ b/layout/build/Makefile.in @@ -226,17 +226,12 @@ endif ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT))) EXTRA_DSO_LDOPTS += $(TK_LIBS) - -ifdef MOZ_ENABLE_CANVAS3D OS_LIBS += -framework OpenGL endif -endif ifneq (,$(filter windows,$(MOZ_WIDGET_TOOLKIT))) -ifdef MOZ_ENABLE_CANVAS3D OS_LIBS += opengl32.lib endif -endif # Add explicit X11 dependency when building against X11 toolkits ifneq (,$(filter gtk2,$(MOZ_WIDGET_TOOLKIT))) diff --git a/layout/build/nsLayoutModule.cpp b/layout/build/nsLayoutModule.cpp index 9ac0755bb84c..7ef9c8f75485 100644 --- a/layout/build/nsLayoutModule.cpp +++ b/layout/build/nsLayoutModule.cpp @@ -206,12 +206,8 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsHTMLEditor) #include "nsHTMLCanvasFrame.h" -#ifdef MOZ_ENABLE_CANVAS #include "nsIDOMCanvasRenderingContext2D.h" -#ifdef MOZ_ENABLE_CANVAS3D #include "nsICanvasRenderingContextWebGL.h" -#endif -#endif class nsIDocumentLoaderFactory; @@ -403,12 +399,8 @@ nsresult NS_NewContainerBoxObject(nsIBoxObject** aResult); nsresult NS_NewTreeBoxObject(nsIBoxObject** aResult); #endif -#ifdef MOZ_ENABLE_CANVAS nsresult NS_NewCanvasRenderingContext2D(nsIDOMCanvasRenderingContext2D** aResult); -#ifdef MOZ_ENABLE_CANVAS3D nsresult NS_NewCanvasRenderingContextWebGL(nsICanvasRenderingContextWebGL** aResult); -#endif -#endif nsresult NS_CreateFrameTraversal(nsIFrameTraversal** aResult); @@ -540,12 +532,8 @@ MAKE_CTOR(CreateVideoDocument, nsIDocument, NS_NewVid #endif MAKE_CTOR(CreateFocusManager, nsIFocusManager, NS_NewFocusManager) -#ifdef MOZ_ENABLE_CANVAS MAKE_CTOR(CreateCanvasRenderingContext2D, nsIDOMCanvasRenderingContext2D, NS_NewCanvasRenderingContext2D) -#ifdef MOZ_ENABLE_CANVAS3D MAKE_CTOR(CreateCanvasRenderingContextWebGL, nsICanvasRenderingContextWebGL, NS_NewCanvasRenderingContextWebGL) -#endif -#endif NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsStyleSheetService, Init) @@ -1075,18 +1063,14 @@ static const nsModuleComponentInfo gComponents[] = { UnregisterHTMLAudioElement }, #endif -#ifdef MOZ_ENABLE_CANVAS { "Canvas 2D Rendering Context", NS_CANVASRENDERINGCONTEXT2D_CID, "@mozilla.org/content/canvas-rendering-context;1?id=2d", CreateCanvasRenderingContext2D }, -#ifdef MOZ_ENABLE_CANVAS3D { "Canvas WebGL Rendering Context", NS_CANVASRENDERINGCONTEXTWEBGL_CID, "@mozilla.org/content/canvas-rendering-context;1?id=moz-webgl", CreateCanvasRenderingContextWebGL }, -#endif -#endif { "XML document encoder", NS_TEXT_ENCODER_CID, diff --git a/toolkit/library/libxul-config.mk b/toolkit/library/libxul-config.mk index cad3996234a4..c604ef467c00 100644 --- a/toolkit/library/libxul-config.mk +++ b/toolkit/library/libxul-config.mk @@ -352,9 +352,6 @@ ifneq (,$(filter layout-debug,$(MOZ_EXTENSIONS))) COMPONENT_LIBS += gkdebug endif -ifdef MOZ_ENABLE_CANVAS3D ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa) EXTRA_DSO_LDOPTS += -framework OpenGL endif -endif - diff --git a/toolkit/library/libxul-rules.mk b/toolkit/library/libxul-rules.mk index b46ab8ded394..9d7ffe2c8c64 100644 --- a/toolkit/library/libxul-rules.mk +++ b/toolkit/library/libxul-rules.mk @@ -77,11 +77,9 @@ DEFINES += \ ifeq ($(MOZ_WIDGET_TOOLKIT),windows) ifneq ($(OS_ARCH),WINCE) OS_LIBS += $(call EXPAND_LIBNAME,usp10 oleaut32) -ifdef MOZ_ENABLE_CANVAS3D OS_LIBS += $(call EXPAND_LIBNAME,opengl32) endif endif -endif ifneq (,$(filter $(MOZ_WIDGET_TOOLKIT),mac cocoa)) EXTRA_DSO_LDOPTS += -lcups endif