Bug 703516 - Move GLContext code into a separate folder. r=jrmuizel
authorMatt Woodrow <mwoodrow@mozilla.com>
Fri, 18 Nov 2011 22:07:49 +1300
changeset 80465 335e8e75eedc3693001e409f7971a18b783f08b8
parent 80464 8531b4bf5cb90e8f90f5f295784e0efe5e9d673b
child 80466 5549f4202af8ca34280d805ac92e7f691d6e8905
push id21500
push userbmo@edmorley.co.uk
push dateSat, 19 Nov 2011 13:04:35 +0000
treeherdermozilla-central@46c2bd7dbdd4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs703516
milestone11.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
Bug 703516 - Move GLContext code into a separate folder. r=jrmuizel
gfx/Makefile.in
gfx/gl/EGLUtils.h
gfx/gl/GLContext.cpp
gfx/gl/GLContext.h
gfx/gl/GLContextProvider.h
gfx/gl/GLContextProviderCGL.mm
gfx/gl/GLContextProviderEGL.cpp
gfx/gl/GLContextProviderGLX.cpp
gfx/gl/GLContextProviderImpl.h
gfx/gl/GLContextProviderNull.cpp
gfx/gl/GLContextProviderOSMesa.cpp
gfx/gl/GLContextProviderWGL.cpp
gfx/gl/GLContextSymbols.h
gfx/gl/GLDefs.h
gfx/gl/GLXLibrary.h
gfx/gl/Makefile.in
gfx/gl/WGLLibrary.h
gfx/thebes/EGLUtils.h
gfx/thebes/GLContext.cpp
gfx/thebes/GLContext.h
gfx/thebes/GLContextProvider.h
gfx/thebes/GLContextProviderCGL.mm
gfx/thebes/GLContextProviderEGL.cpp
gfx/thebes/GLContextProviderGLX.cpp
gfx/thebes/GLContextProviderImpl.h
gfx/thebes/GLContextProviderNull.cpp
gfx/thebes/GLContextProviderOSMesa.cpp
gfx/thebes/GLContextProviderWGL.cpp
gfx/thebes/GLContextSymbols.h
gfx/thebes/GLDefs.h
gfx/thebes/GLXLibrary.h
gfx/thebes/Makefile.in
gfx/thebes/WGLLibrary.h
toolkit/library/libxul-config.mk
--- a/gfx/Makefile.in
+++ b/gfx/Makefile.in
@@ -43,17 +43,17 @@ VPATH		= @srcdir@
 include $(DEPTH)/config/autoconf.mk
 
 MODULE		= gfx
 
 ifdef MOZ_TREE_CAIRO
 DIRS		= cairo
 endif
 
-DIRS		+= 2d ycbcr angle src qcms layers harfbuzz/src ots/src thebes ipc
+DIRS		+= 2d ycbcr angle src qcms gl layers harfbuzz/src ots/src thebes ipc
 
 ifeq (,$(filter-out cocoa android windows,$(MOZ_WIDGET_TOOLKIT)))
 DIRS        += skia
 endif
 
 ifdef ENABLE_TESTS
 TOOL_DIRS	+= tests
 endif
rename from gfx/thebes/EGLUtils.h
rename to gfx/gl/EGLUtils.h
rename from gfx/thebes/GLContext.cpp
rename to gfx/gl/GLContext.cpp
rename from gfx/thebes/GLContext.h
rename to gfx/gl/GLContext.h
rename from gfx/thebes/GLContextProvider.h
rename to gfx/gl/GLContextProvider.h
rename from gfx/thebes/GLContextProviderCGL.mm
rename to gfx/gl/GLContextProviderCGL.mm
rename from gfx/thebes/GLContextProviderEGL.cpp
rename to gfx/gl/GLContextProviderEGL.cpp
rename from gfx/thebes/GLContextProviderGLX.cpp
rename to gfx/gl/GLContextProviderGLX.cpp
rename from gfx/thebes/GLContextProviderImpl.h
rename to gfx/gl/GLContextProviderImpl.h
rename from gfx/thebes/GLContextProviderNull.cpp
rename to gfx/gl/GLContextProviderNull.cpp
rename from gfx/thebes/GLContextProviderOSMesa.cpp
rename to gfx/gl/GLContextProviderOSMesa.cpp
rename from gfx/thebes/GLContextProviderWGL.cpp
rename to gfx/gl/GLContextProviderWGL.cpp
rename from gfx/thebes/GLContextSymbols.h
rename to gfx/gl/GLContextSymbols.h
rename from gfx/thebes/GLDefs.h
rename to gfx/gl/GLDefs.h
rename from gfx/thebes/GLXLibrary.h
rename to gfx/gl/GLXLibrary.h
new file mode 100644
--- /dev/null
+++ b/gfx/gl/Makefile.in
@@ -0,0 +1,96 @@
+
+DEPTH		= ../..
+topsrcdir	= @top_srcdir@
+srcdir		= @srcdir@
+VPATH		= @srcdir@
+
+include $(DEPTH)/config/autoconf.mk
+
+MODULE		= gl
+LIBRARY_NAME	= gl
+LIBXUL_LIBRARY	= 1
+EXPORT_LIBRARY	= 1
+
+EXPORTS	= \
+	GLDefs.h \
+	GLContext.h \
+	GLContextSymbols.h \
+	GLContextProvider.h \
+	GLContextProviderImpl.h \
+	EGLUtils.h \
+	$(NULL)
+
+ifdef MOZ_X11
+EXPORTS += \
+	GLXLibrary.h \
+	$(NULL)
+endif
+
+
+ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
+EXPORTS	+= \
+	WGLLibrary.h \
+	$(NULL)
+endif
+
+CPPSRCS	= \
+	GLContext.cpp \
+	GLContextProviderOSMesa.cpp \
+	$(NULL)
+
+GL_PROVIDER = Null
+
+ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
+GL_PROVIDER = WGL
+endif
+
+ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
+GL_PROVIDER = CGL
+endif
+
+ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
+ifdef MOZ_PLATFORM_MAEMO
+GL_PROVIDER = EGL
+else
+ifdef MOZ_EGL_XRENDER_COMPOSITE
+GL_PROVIDER = EGL
+else
+GL_PROVIDER = GLX
+endif
+endif
+endif
+
+ifeq ($(MOZ_WIDGET_TOOLKIT),qt)
+ifdef MOZ_PLATFORM_MAEMO
+GL_PROVIDER = EGL
+else
+GL_PROVIDER = GLX
+endif
+endif
+
+ifeq ($(MOZ_WIDGET_TOOLKIT),android)
+GL_PROVIDER = EGL
+endif
+
+ifeq ($(MOZ_WIDGET_TOOLKIT),gonk)
+GL_PROVIDER = EGL
+endif
+
+# Mac is a special snowflake
+ifeq ($(GL_PROVIDER),CGL)
+CMMSRCS += GLContextProvider$(GL_PROVIDER).mm
+else
+CPPSRCS += GLContextProvider$(GL_PROVIDER).cpp
+endif
+
+# Win32 is a special snowflake, for ANGLE
+ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
+CPPSRCS += GLContextProviderEGL.cpp
+endif
+
+include $(topsrcdir)/config/rules.mk
+
+DEFINES := $(filter-out -DUNICODE,$(DEFINES))
+
+CXXFLAGS += $(MOZ_CAIRO_CFLAGS) $(TK_CFLAGS)
+CFLAGS += $(MOZ_CAIRO_CFLAGS) $(TK_CFLAGS)
rename from gfx/thebes/WGLLibrary.h
rename to gfx/gl/WGLLibrary.h
--- a/gfx/thebes/Makefile.in
+++ b/gfx/thebes/Makefile.in
@@ -41,23 +41,17 @@ EXPORTS	= \
 	gfxSkipChars.h \
 	gfxTeeSurface.h \
 	gfxTypes.h \
 	gfxTextRunCache.h \
 	gfxTextRunWordCache.h \
 	gfxUnicodeProperties.h \
 	gfxUtils.h \
 	gfxUserFontSet.h \
-	GLDefs.h \
-	GLContext.h \
-	GLContextSymbols.h \
-	GLContextProvider.h \
-	GLContextProviderImpl.h \
 	nsCoreAnimationSupport.h \
-	EGLUtils.h \
 	gfxSharedImageSurface.h \
 	$(NULL)
 
 ifeq ($(MOZ_WIDGET_TOOLKIT),android)
 EXPORTS += \
 	gfxAndroidPlatform.h \
 	gfxFT2Fonts.h \
 	gfxFT2FontBase.h \
@@ -90,17 +84,16 @@ EXPORTS += \
 	gfxPSSurface.h \
 	gfxPlatformGtk.h \
 	$(NULL)
 
 ifdef MOZ_X11
 EXPORTS += \
 	gfxXlibSurface.h \
         gfxXlibNativeRenderer.h \
-	GLXLibrary.h \
 	$(NULL)
 endif
 
 ifdef MOZ_PANGO
 EXPORTS += gfxPangoFonts.h
 else
 EXPORTS += gfxFT2Fonts.h
 endif
@@ -126,34 +119,32 @@ EXPORTS += \
 	gfxQtNativeRenderer.h \
 	gfxQtPlatform.h \
 	gfxPDFSurface.h \
 	$(NULL)
 
 ifdef MOZ_X11
 EXPORTS += \
 	gfxXlibSurface.h \
-	GLXLibrary.h \
 	$(NULL)
 endif
 
 ifdef MOZ_PANGO
 EXPORTS += gfxPangoFonts.h
 else
 EXPORTS += gfxFT2Fonts.h
 endif
 endif
 
 ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
 EXPORTS	+= \
 	gfxPDFSurface.h \
 	gfxWindowsPlatform.h \
 	gfxWindowsSurface.h \
 	gfxWindowsNativeDrawing.h \
-	WGLLibrary.h \
 	gfxDWriteFonts.h \
 	gfxD2DSurface.h \
 	gfxGDIFont.h \
 	gfxGDIFontList.h \
 	gfxPlatformFontList.h \
 	gfxAtoms.h \
 	gfxAtomList.h \
 	$(NULL)
@@ -183,18 +174,16 @@ CPPSRCS	= \
 	gfxTeeSurface.cpp \
 	gfxTextRunCache.cpp \
 	gfxTextRunWordCache.cpp \
 	gfxUserFontSet.cpp \
 	gfxUtils.cpp \
 	gfxUnicodeProperties.cpp \
 	gfxScriptItemizer.cpp \
 	gfxHarfBuzzShaper.cpp \
-	GLContext.cpp \
-	GLContextProviderOSMesa.cpp \
 	gfxSharedImageSurface.cpp \
 	$(NULL)
 
 # Are we targeting x86 or x64?  If so, build gfxAlphaRecoverySSE2.cpp.
 ifneq (,$(INTEL_ARCHITECTURE))
 CPPSRCS += gfxAlphaRecoverySSE2.cpp
 endif
 
@@ -343,66 +332,16 @@ CMMSRCS = \
 	gfxMacPlatformFontList.mm \
 	nsCoreAnimationSupport.mm \
 	$(NULL)
 
 endif
 
 CSRCS += woff.c
 
-GL_PROVIDER = Null
-
-ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
-GL_PROVIDER = WGL
-endif
-
-ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
-GL_PROVIDER = CGL
-endif
-
-ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
-ifdef MOZ_PLATFORM_MAEMO
-GL_PROVIDER = EGL
-else
-ifdef MOZ_EGL_XRENDER_COMPOSITE
-GL_PROVIDER = EGL
-else
-GL_PROVIDER = GLX
-endif
-endif
-endif
-
-ifeq ($(MOZ_WIDGET_TOOLKIT),qt)
-ifdef MOZ_PLATFORM_MAEMO
-GL_PROVIDER = EGL
-else
-GL_PROVIDER = GLX
-endif
-endif
-
-ifeq ($(MOZ_WIDGET_TOOLKIT),android)
-GL_PROVIDER = EGL
-endif
-
-ifeq ($(MOZ_WIDGET_TOOLKIT),gonk)
-GL_PROVIDER = EGL
-endif
-
-# Mac is a special snowflake
-ifeq ($(GL_PROVIDER),CGL)
-CMMSRCS += GLContextProvider$(GL_PROVIDER).mm
-else
-CPPSRCS += GLContextProvider$(GL_PROVIDER).cpp
-endif
-
-# Win32 is a special snowflake, for ANGLE
-ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
-CPPSRCS += GLContextProviderEGL.cpp
-endif
-
 DEFINES += -DIMPL_THEBES -DWOFF_MOZILLA_CLIENT
 
 include $(topsrcdir)/config/rules.mk
 include $(topsrcdir)/ipc/chromium/chromium-config.mk
 
 DEFINES := $(filter-out -DUNICODE,$(DEFINES))
 
 CXXFLAGS += $(MOZ_CAIRO_CFLAGS) $(TK_CFLAGS)
--- a/toolkit/library/libxul-config.mk
+++ b/toolkit/library/libxul-config.mk
@@ -260,17 +260,17 @@ endif
 ifeq ($(MOZ_WIDGET_TOOLKIT),android)
 COMPONENT_LIBS += widget_android
 endif
 
 ifeq ($(MOZ_WIDGET_TOOLKIT),gonk)
 COMPONENT_LIBS += widget_gonk
 endif
 
-STATIC_LIBS += thebes ycbcr
+STATIC_LIBS += thebes gl ycbcr
 
 ifeq ($(MOZ_WIDGET_TOOLKIT),android)
 STATIC_LIBS += profiler
 endif
 
 STATIC_LIBS += angle
 
 ifeq (windows,$(MOZ_WIDGET_TOOLKIT))