diff options
90 files changed, 288 insertions, 246 deletions
diff --git a/gfx/2d/DataSurfaceHelpers.cpp b/gfx/2d/DataSurfaceHelpers.cpp index 87ef00fcd..99dfe063a 100644 --- a/gfx/2d/DataSurfaceHelpers.cpp +++ b/gfx/2d/DataSurfaceHelpers.cpp @@ -3,7 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include <cstring> +#include <string.h> #include "2D.h" #include "DataSurfaceHelpers.h" diff --git a/gfx/2d/NativeFontResourceMac.cpp b/gfx/2d/NativeFontResourceMac.cpp index aaf6db181..61fd3b607 100644 --- a/gfx/2d/NativeFontResourceMac.cpp +++ b/gfx/2d/NativeFontResourceMac.cpp @@ -8,6 +8,7 @@ #include "Types.h" #include "mozilla/RefPtr.h" +#include "mozilla/gfx/Logging.h" #ifdef MOZ_WIDGET_UIKIT #include <CoreFoundation/CoreFoundation.h> diff --git a/gfx/2d/RecordedEvent.cpp b/gfx/2d/RecordedEvent.cpp index 3bfc5c8f6..e6be60b59 100644 --- a/gfx/2d/RecordedEvent.cpp +++ b/gfx/2d/RecordedEvent.cpp @@ -7,6 +7,7 @@ #include "PathRecording.h" #include "RecordingTypes.h" +#include "DrawEventRecorder.h" #include "Tools.h" #include "Filters.h" #include "Logging.h" diff --git a/gfx/2d/moz.build b/gfx/2d/moz.build index ad095503d..33b49038f 100644 --- a/gfx/2d/moz.build +++ b/gfx/2d/moz.build @@ -63,7 +63,7 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('cocoa', 'uikit'): EXPORTS.mozilla.gfx += [ 'MacIOSurface.h', ] - UNIFIED_SOURCES += [ + SOURCES += [ 'NativeFontResourceMac.cpp', 'PathCG.cpp', 'ScaledFontMac.cpp', @@ -95,10 +95,8 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3'): ] if CONFIG['MOZ_ENABLE_SKIA']: - UNIFIED_SOURCES += [ - 'convolver.cpp', - ] SOURCES += [ + 'convolver.cpp', 'DrawTargetSkia.cpp', 'image_operations.cpp', # Uses _USE_MATH_DEFINES 'PathSkia.cpp', @@ -143,7 +141,7 @@ elif CONFIG['CPU_ARCH'].startswith('mips'): 'convolverLS3.cpp', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'BezierUtils.cpp', 'Blur.cpp', 'DataSourceSurface.cpp', @@ -156,6 +154,7 @@ UNIFIED_SOURCES += [ 'DrawTargetDual.cpp', 'DrawTargetRecording.cpp', 'DrawTargetTiled.cpp', + 'Factory.cpp', # Need to suppress warnings in Skia header files. 'FilterNodeSoftware.cpp', 'FilterProcessing.cpp', 'FilterProcessingScalar.cpp', @@ -177,10 +176,6 @@ UNIFIED_SOURCES += [ 'SourceSurfaceRawData.cpp', ] -SOURCES += [ - 'Factory.cpp', # Need to suppress warnings in Skia header files. -] - if CONFIG['CLANG_CXX']: SOURCES['Factory.cpp'].flags += ['-Wno-implicit-fallthrough'] diff --git a/gfx/cairo/cairo/src/moz.build b/gfx/cairo/cairo/src/moz.build index 14b602ac2..5acb2ec96 100644 --- a/gfx/cairo/cairo/src/moz.build +++ b/gfx/cairo/cairo/src/moz.build @@ -110,7 +110,7 @@ SOURCES += [ 'cairo-surface-wrapper.c', # redefinition of '_copy_transformed_pattern' ] -UNIFIED_SOURCES += [ +SOURCES += [ 'cairo-analysis-surface.c', 'cairo-arc.c', 'cairo-array.c', diff --git a/gfx/config/moz.build b/gfx/config/moz.build index 2b8f9e7fc..17aa03c64 100644 --- a/gfx/config/moz.build +++ b/gfx/config/moz.build @@ -15,7 +15,7 @@ EXPORTS.mozilla.gfx += [ 'gfxVars.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'gfxConfig.cpp', 'gfxFeature.cpp', 'gfxVars.cpp', diff --git a/gfx/gl/GLContextProviderEGL.cpp b/gfx/gl/GLContextProviderEGL.cpp index 23fc3472d..e39858a92 100644 --- a/gfx/gl/GLContextProviderEGL.cpp +++ b/gfx/gl/GLContextProviderEGL.cpp @@ -86,6 +86,7 @@ #include "GLContextEGL.h" #include "GLContextProvider.h" #include "GLLibraryEGL.h" +#include "GLScreenBuffer.h" #include "mozilla/ArrayUtils.h" #include "mozilla/Preferences.h" #include "mozilla/widget/CompositorWidget.h" diff --git a/gfx/gl/GLContextProviderWGL.cpp b/gfx/gl/GLContextProviderWGL.cpp index da8c93d10..43f5b67e8 100644 --- a/gfx/gl/GLContextProviderWGL.cpp +++ b/gfx/gl/GLContextProviderWGL.cpp @@ -7,8 +7,10 @@ #include "GLContextWGL.h" #include "GLLibraryLoader.h" #include "nsDebug.h" +#include "nsIGfxInfo.h" #include "nsIWidget.h" #include "gfxPlatform.h" +#include "gfxUtils.h" #include "gfxWindowsSurface.h" #include "prenv.h" diff --git a/gfx/gl/GLLibraryEGL.cpp b/gfx/gl/GLLibraryEGL.cpp index 75f40f13f..b8b53f7c2 100644 --- a/gfx/gl/GLLibraryEGL.cpp +++ b/gfx/gl/GLLibraryEGL.cpp @@ -12,6 +12,7 @@ #include "mozilla/Tokenizer.h" #include "mozilla/ScopeExit.h" #include "mozilla/Unused.h" +#include "mozilla/gfx/Logging.h" #include "nsDirectoryServiceDefs.h" #include "nsDirectoryServiceUtils.h" #include "nsIGfxInfo.h" @@ -23,8 +24,13 @@ #include "prenv.h" #include "GLContext.h" #include "GLContextProvider.h" +#include "gfxEnv.h" #include "gfxPrefs.h" #include "ScopedGLHelpers.h" +#include "GLReadTexImageHelper.h" + +using namespace mozilla::gfx; +using namespace mozilla::layers; namespace mozilla { namespace gl { diff --git a/gfx/gl/GLScreenBuffer.cpp b/gfx/gl/GLScreenBuffer.cpp index 463f7ebab..5d95eb928 100755 --- a/gfx/gl/GLScreenBuffer.cpp +++ b/gfx/gl/GLScreenBuffer.cpp @@ -33,10 +33,12 @@ #include "SharedSurfaceGLX.h" #endif + namespace mozilla { namespace gl { using gfx::SurfaceFormat; +using namespace mozilla::layers; UniquePtr<GLScreenBuffer> GLScreenBuffer::Create(GLContext* gl, diff --git a/gfx/gl/GLScreenBuffer.h b/gfx/gl/GLScreenBuffer.h index 6cacf221d..20692cf48 100644 --- a/gfx/gl/GLScreenBuffer.h +++ b/gfx/gl/GLScreenBuffer.h @@ -19,6 +19,7 @@ #include "GLDefs.h" #include "mozilla/gfx/2D.h" #include "mozilla/gfx/Point.h" +#include "mozilla/layers/LayersTypes.h" #include "mozilla/UniquePtr.h" #include "SharedSurface.h" #include "SurfaceTypes.h" diff --git a/gfx/gl/SharedSurfaceANGLE.cpp b/gfx/gl/SharedSurfaceANGLE.cpp index e82a24dfd..c0175ffbe 100644 --- a/gfx/gl/SharedSurfaceANGLE.cpp +++ b/gfx/gl/SharedSurfaceANGLE.cpp @@ -8,6 +8,7 @@ #include <d3d11.h> #include "GLContextEGL.h" #include "GLLibraryEGL.h" +#include "GLReadTexImageHelper.h" #include "mozilla/gfx/DeviceManagerDx.h" #include "mozilla/layers/LayersSurfaces.h" // for SurfaceDescriptor, etc diff --git a/gfx/gl/SharedSurfaceD3D11Interop.cpp b/gfx/gl/SharedSurfaceD3D11Interop.cpp index e667005d8..42da52e11 100644 --- a/gfx/gl/SharedSurfaceD3D11Interop.cpp +++ b/gfx/gl/SharedSurfaceD3D11Interop.cpp @@ -11,6 +11,8 @@ #include "WGLLibrary.h" #include "nsPrintfCString.h" #include "mozilla/gfx/DeviceManagerDx.h" +#include "mozilla/layers/LayersSurfaces.h" +#include "mozilla/layers/TextureForwarder.h" namespace mozilla { namespace gl { diff --git a/gfx/gl/SharedSurfaceD3D11Interop.h b/gfx/gl/SharedSurfaceD3D11Interop.h index 0f5bd35cf..dbee50428 100644 --- a/gfx/gl/SharedSurfaceD3D11Interop.h +++ b/gfx/gl/SharedSurfaceD3D11Interop.h @@ -7,6 +7,7 @@ #define SHARED_SURFACE_D3D11_INTEROP_H_ #include <windows.h> +#include <d3d11.h> #include "SharedSurface.h" namespace mozilla { diff --git a/gfx/gl/SharedSurfaceGL.cpp b/gfx/gl/SharedSurfaceGL.cpp index 6fba1b4eb..adb4429ae 100644 --- a/gfx/gl/SharedSurfaceGL.cpp +++ b/gfx/gl/SharedSurfaceGL.cpp @@ -10,6 +10,8 @@ #include "GLReadTexImageHelper.h" #include "mozilla/gfx/2D.h" #include "ScopedGLHelpers.h" +#include "mozilla/layers/LayersSurfaces.h" // for SurfaceDescriptor, etc +#include "mozilla/layers/TextureForwarder.h" namespace mozilla { namespace gl { diff --git a/gfx/gl/TextureImageEGL.h b/gfx/gl/TextureImageEGL.h index fa7075064..0a645742f 100644 --- a/gfx/gl/TextureImageEGL.h +++ b/gfx/gl/TextureImageEGL.h @@ -8,6 +8,8 @@ #include "GLTextureImage.h" +using namespace mozilla::gfx; + namespace mozilla { namespace gl { diff --git a/gfx/gl/moz.build b/gfx/gl/moz.build index 6f43a495d..bfa8f9df5 100644 --- a/gfx/gl/moz.build +++ b/gfx/gl/moz.build @@ -68,7 +68,7 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': 'SharedSurfaceD3D11Interop.h', 'WGLLibrary.h', ] - UNIFIED_SOURCES += [ + SOURCES += [ 'GLContextProviderWGL.cpp', 'SharedSurfaceANGLE.cpp', 'SharedSurfaceD3D11Interop.cpp', @@ -118,7 +118,7 @@ elif gl_provider == 'GLX': 'SharedSurfaceGLX.h' ] -UNIFIED_SOURCES += [ +SOURCES += [ 'AndroidSurfaceTexture.cpp', 'DecomposeIntoNoRepeatTriangles.cpp', 'EGLUtils.cpp', diff --git a/gfx/graphite2/moz-gr-update.sh b/gfx/graphite2/moz-gr-update.sh index faaab1b17..b14102d1f 100644 --- a/gfx/graphite2/moz-gr-update.sh +++ b/gfx/graphite2/moz-gr-update.sh @@ -33,9 +33,10 @@ echo "$TARBALL" >> gfx/graphite2/README.mozilla echo "" echo "See" $0 "for update procedure." >> gfx/graphite2/README.mozilla -# fix up includes because of bug 721839 (cstdio) and bug 803066 (Windows.h) -#find gfx/graphite2/ -name "*.cpp" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \; -#find gfx/graphite2/ -name "*.h" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \; +# fix up includes because of BZ bug 721839 (cstdio) and BZ bug 803066 (Windows.h) +# Additional issue with inclusion of <cstring> in non-unified mode (Issue #80) +find gfx/graphite2/ -name "*.cpp" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/<cstring>/<string.h>/;s/Windows.h/windows.h/;" {} \; +find gfx/graphite2/ -name "*.h" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/<cstring>/<string.h>/;s/Windows.h/windows.h/;" {} \; # summarize what's been touched echo Updated to $RELEASE. diff --git a/gfx/graphite2/src/Code.cpp b/gfx/graphite2/src/Code.cpp index 92ba92379..119af9c85 100644 --- a/gfx/graphite2/src/Code.cpp +++ b/gfx/graphite2/src/Code.cpp @@ -32,7 +32,7 @@ of the License or (at your option) any later version. #include <cassert> #include <cstddef> #include <cstdlib> -#include <cstring> +#include <string.h> #include "graphite2/Segment.h" #include "inc/Code.h" #include "inc/Face.h" @@ -42,7 +42,7 @@ of the License or (at your option) any later version. #include "inc/Rule.h" #include "inc/Silf.h" -#include <cstdio> +#include <stdio.h> #ifdef NDEBUG #ifdef __GNUC__ diff --git a/gfx/graphite2/src/Face.cpp b/gfx/graphite2/src/Face.cpp index 81b5ced8c..45664ca8c 100644 --- a/gfx/graphite2/src/Face.cpp +++ b/gfx/graphite2/src/Face.cpp @@ -24,7 +24,7 @@ Mozilla Public License (http://mozilla.org/MPL) or the GNU General Public License, as published by the Free Software Foundation, either version 2 of the License or (at your option) any later version. */ -#include <cstring> +#include <string.h> #include "graphite2/Segment.h" #include "inc/CmapCache.h" #include "inc/debug.h" diff --git a/gfx/graphite2/src/FeatureMap.cpp b/gfx/graphite2/src/FeatureMap.cpp index d0fc55ddf..ab3b447f9 100644 --- a/gfx/graphite2/src/FeatureMap.cpp +++ b/gfx/graphite2/src/FeatureMap.cpp @@ -24,7 +24,7 @@ Mozilla Public License (http://mozilla.org/MPL) or the GNU General Public License, as published by the Free Software Foundation, either version 2 of the License or (at your option) any later version. */ -#include <cstring> +#include <string.h> #include "inc/Main.h" #include "inc/bits.h" diff --git a/gfx/graphite2/src/FileFace.cpp b/gfx/graphite2/src/FileFace.cpp index d1510d3e9..62b9c1fd2 100644 --- a/gfx/graphite2/src/FileFace.cpp +++ b/gfx/graphite2/src/FileFace.cpp @@ -24,7 +24,7 @@ Mozilla Public License (http://mozilla.org/MPL) or the GNU General Public License, as published by the Free Software Foundation, either version 2 of the License or (at your option) any later version. */ -#include <cstring> +#include <string.h> #include "inc/FileFace.h" diff --git a/gfx/graphite2/src/Pass.cpp b/gfx/graphite2/src/Pass.cpp index 683143c50..4e9085d48 100644 --- a/gfx/graphite2/src/Pass.cpp +++ b/gfx/graphite2/src/Pass.cpp @@ -28,7 +28,7 @@ of the License or (at your option) any later version. #include "inc/debug.h" #include "inc/Endian.h" #include "inc/Pass.h" -#include <cstring> +#include <string.h> #include <cstdlib> #include <cassert> #include <cmath> diff --git a/gfx/graphite2/src/Segment.cpp b/gfx/graphite2/src/Segment.cpp index 3020bfd36..cb53de356 100644 --- a/gfx/graphite2/src/Segment.cpp +++ b/gfx/graphite2/src/Segment.cpp @@ -25,7 +25,7 @@ License, as published by the Free Software Foundation, either version 2 of the License or (at your option) any later version. */ #include "inc/UtfCodec.h" -#include <cstring> +#include <string.h> #include <cstdlib> #include "inc/bits.h" diff --git a/gfx/graphite2/src/TtfUtil.cpp b/gfx/graphite2/src/TtfUtil.cpp index 75e8da11c..c2f9a4675 100644 --- a/gfx/graphite2/src/TtfUtil.cpp +++ b/gfx/graphite2/src/TtfUtil.cpp @@ -43,7 +43,7 @@ Description //#include <algorithm> #include <cassert> #include <cstddef> -#include <cstring> +#include <string.h> #include <climits> #include <cwchar> //#include <stdexcept> diff --git a/gfx/graphite2/src/call_machine.cpp b/gfx/graphite2/src/call_machine.cpp index 09c2038c4..0afe9191e 100644 --- a/gfx/graphite2/src/call_machine.cpp +++ b/gfx/graphite2/src/call_machine.cpp @@ -33,7 +33,7 @@ of the License or (at your option) any later version. // opcodes) but is slower that the direct threaded interpreter by a factor of 2 #include <cassert> -#include <cstring> +#include <string.h> #include <graphite2/Segment.h> #include "inc/Machine.h" #include "inc/Segment.h" diff --git a/gfx/graphite2/src/direct_machine.cpp b/gfx/graphite2/src/direct_machine.cpp index 7d80438fb..597c2d234 100644 --- a/gfx/graphite2/src/direct_machine.cpp +++ b/gfx/graphite2/src/direct_machine.cpp @@ -38,7 +38,7 @@ of the License or (at your option) any later version. #include <cassert> -#include <cstring> +#include <string.h> #include "inc/Machine.h" #include "inc/Segment.h" #include "inc/Slot.h" diff --git a/gfx/graphite2/src/gr_logging.cpp b/gfx/graphite2/src/gr_logging.cpp index 3e453ba8e..a4afcc2a5 100644 --- a/gfx/graphite2/src/gr_logging.cpp +++ b/gfx/graphite2/src/gr_logging.cpp @@ -24,7 +24,7 @@ Mozilla Public License (http://mozilla.org/MPL) or the GNU General Public License, as published by the Free Software Foundation, either version 2 of the License or (at your option) any later version. */ -#include <cstdio> +#include <stdio.h> #include "graphite2/Log.h" #include "inc/debug.h" diff --git a/gfx/graphite2/src/inc/Compression.h b/gfx/graphite2/src/inc/Compression.h index 61351c416..047df7a3d 100644 --- a/gfx/graphite2/src/inc/Compression.h +++ b/gfx/graphite2/src/inc/Compression.h @@ -29,7 +29,7 @@ of the License or (at your option) any later version. #include <cassert> #include <cstddef> -#include <cstring> +#include <string.h> namespace { diff --git a/gfx/graphite2/src/inc/Face.h b/gfx/graphite2/src/inc/Face.h index 43ea43196..1ee39b0e3 100644 --- a/gfx/graphite2/src/inc/Face.h +++ b/gfx/graphite2/src/inc/Face.h @@ -26,7 +26,7 @@ of the License or (at your option) any later version. */ #pragma once -#include <cstdio> +#include <stdio.h> #include "graphite2/Font.h" diff --git a/gfx/graphite2/src/inc/FeatureVal.h b/gfx/graphite2/src/inc/FeatureVal.h index 5fbcf0820..c79392eae 100644 --- a/gfx/graphite2/src/inc/FeatureVal.h +++ b/gfx/graphite2/src/inc/FeatureVal.h @@ -25,7 +25,7 @@ License, as published by the Free Software Foundation, either version 2 of the License or (at your option) any later version. */ #pragma once -#include <cstring> +#include <string.h> #include <cassert> #include "inc/Main.h" #include "inc/List.h" diff --git a/gfx/graphite2/src/inc/FileFace.h b/gfx/graphite2/src/inc/FileFace.h index 81e501bab..dfcf3e8d3 100644 --- a/gfx/graphite2/src/inc/FileFace.h +++ b/gfx/graphite2/src/inc/FileFace.h @@ -32,7 +32,7 @@ of the License or (at your option) any later version. #ifndef GRAPHITE2_NFILEFACE -#include <cstdio> +#include <stdio.h> #include <cassert> #include "graphite2/Font.h" diff --git a/gfx/graphite2/src/inc/List.h b/gfx/graphite2/src/inc/List.h index 020560235..d3839441e 100644 --- a/gfx/graphite2/src/inc/List.h +++ b/gfx/graphite2/src/inc/List.h @@ -30,7 +30,7 @@ of the License or (at your option) any later version. #include <cstddef> #include <cassert> -#include <cstring> +#include <string.h> #include <cstdlib> #include <new> diff --git a/gfx/graphite2/src/inc/Machine.h b/gfx/graphite2/src/inc/Machine.h index 1a01b7a43..4ac62b9e1 100644 --- a/gfx/graphite2/src/inc/Machine.h +++ b/gfx/graphite2/src/inc/Machine.h @@ -31,7 +31,7 @@ of the License or (at your option) any later version. // interface. #pragma once -#include <cstring> +#include <string.h> #include <graphite2/Types.h> #include "inc/Main.h" diff --git a/gfx/graphite2/src/inc/json.h b/gfx/graphite2/src/inc/json.h index 90b8573d6..e9826832e 100644 --- a/gfx/graphite2/src/inc/json.h +++ b/gfx/graphite2/src/inc/json.h @@ -32,7 +32,7 @@ of the License or (at your option) any later version. #include "inc/Main.h" #include <cassert> -#include <cstdio> +#include <stdio.h> #include "inc/List.h" namespace graphite2 { diff --git a/gfx/graphite2/src/inc/locale2lcid.h b/gfx/graphite2/src/inc/locale2lcid.h index 25d5c0a3c..ec5e867c4 100644 --- a/gfx/graphite2/src/inc/locale2lcid.h +++ b/gfx/graphite2/src/inc/locale2lcid.h @@ -25,7 +25,7 @@ License, as published by the Free Software Foundation, either version 2 of the License or (at your option) any later version. */ #pragma once -#include <cstring> +#include <string.h> #include <cassert> #include "inc/Main.h" diff --git a/gfx/graphite2/src/json.cpp b/gfx/graphite2/src/json.cpp index d6e5518a1..48a563ce0 100644 --- a/gfx/graphite2/src/json.cpp +++ b/gfx/graphite2/src/json.cpp @@ -29,7 +29,7 @@ of the License or (at your option) any later version. #if !defined GRAPHITE2_NTRACING -#include <cstdio> +#include <stdio.h> #include <limits> #include "inc/json.h" diff --git a/gfx/graphite2/src/moz.build b/gfx/graphite2/src/moz.build index c95c2089d..4cbb1f7ed 100644 --- a/gfx/graphite2/src/moz.build +++ b/gfx/graphite2/src/moz.build @@ -13,16 +13,16 @@ EXPORTS.graphite2 += [ ] if CONFIG['GNU_CC']: - UNIFIED_SOURCES += [ + SOURCES += [ 'direct_machine.cpp' ] else: - UNIFIED_SOURCES += [ + SOURCES += [ 'call_machine.cpp' ] # This should contain all of the _SOURCES from files.mk, except *_machine.cpp -UNIFIED_SOURCES += [ +SOURCES += [ 'CachedFace.cpp', 'CmapCache.cpp', 'Code.cpp', @@ -44,6 +44,7 @@ UNIFIED_SOURCES += [ 'Intervals.cpp', 'json.cpp', 'Justifier.cpp', + 'NameTable.cpp', 'Pass.cpp', 'Position.cpp', 'SegCache.cpp', @@ -57,12 +58,6 @@ UNIFIED_SOURCES += [ 'UtfCodec.cpp', ] -# Excluded from UNIFIED_SOURCES because <cmath> from other files breaks it, -# see bug 1272647. -SOURCES += [ - 'NameTable.cpp', -] - # tell graphite2 not to export symbols, we'll be linking it directly with # thebes DEFINES['GRAPHITE2_STATIC'] = True diff --git a/gfx/harfbuzz/src/moz.build b/gfx/harfbuzz/src/moz.build index 7ed39aa10..4dd18d254 100644 --- a/gfx/harfbuzz/src/moz.build +++ b/gfx/harfbuzz/src/moz.build @@ -26,35 +26,32 @@ EXPORTS.harfbuzz += [ ] SOURCES += [ - 'hb-blob.cc', # error: use of undeclared identifier 'snprintf' (FreeBSD) - 'hb-common.cc', # error: use of undeclared identifier 'strdup' - 'hb-ot-math.cc', # conflict with hb-ot-layout.cc - 'hb-ot-shape-complex-hangul.cc', # error: redefinition of enumerator 'NONE' - 'hb-ot-shape-complex-indic.cc', # error: redefinition of enumerator 'INIT' - 'hb-ot-shape-complex-use.cc', # error: redefinition of 'basic_features' - 'hb-ot-shape.cc', # error: functions that differ only in their return type cannot be overloaded - 'hb-shape-plan.cc', # error: redefinition of 'hb_ot_shaper_face_data_ensure' -] - -UNIFIED_SOURCES += [ + 'hb-blob.cc', 'hb-buffer.cc', + 'hb-common.cc', 'hb-face.cc', 'hb-fallback-shape.cc', 'hb-font.cc', 'hb-ot-layout.cc', 'hb-ot-map.cc', + 'hb-ot-math.cc', 'hb-ot-shape-complex-arabic.cc', 'hb-ot-shape-complex-default.cc', + 'hb-ot-shape-complex-hangul.cc', 'hb-ot-shape-complex-hebrew.cc', 'hb-ot-shape-complex-indic-table.cc', + 'hb-ot-shape-complex-indic.cc', 'hb-ot-shape-complex-myanmar.cc', 'hb-ot-shape-complex-thai.cc', 'hb-ot-shape-complex-tibetan.cc', 'hb-ot-shape-complex-use-table.cc', + 'hb-ot-shape-complex-use.cc', 'hb-ot-shape-fallback.cc', 'hb-ot-shape-normalize.cc', + 'hb-ot-shape.cc', 'hb-ot-tag.cc', 'hb-set.cc', + 'hb-shape-plan.cc', 'hb-shape.cc', 'hb-shaper.cc', 'hb-unicode.cc', diff --git a/gfx/ipc/GPUChild.cpp b/gfx/ipc/GPUChild.cpp index ba6053f43..3af70c056 100644 --- a/gfx/ipc/GPUChild.cpp +++ b/gfx/ipc/GPUChild.cpp @@ -5,11 +5,13 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "GPUChild.h" #include "gfxConfig.h" +#include "gfxPlatform.h" #include "gfxPrefs.h" #include "GPUProcessHost.h" #include "GPUProcessManager.h" #include "mozilla/dom/CheckerboardReportService.h" #include "mozilla/gfx/gfxVars.h" +#include "mozilla/Services.h" #if defined(XP_WIN) # include "mozilla/gfx/DeviceManagerDx.h" #endif diff --git a/gfx/ipc/GPUProcessHost.cpp b/gfx/ipc/GPUProcessHost.cpp index 613f353a4..71d8144cc 100644 --- a/gfx/ipc/GPUProcessHost.cpp +++ b/gfx/ipc/GPUProcessHost.cpp @@ -5,6 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "GPUProcessHost.h" +#include "GPUChild.h" #include "chrome/common/process_watcher.h" #include "gfxPrefs.h" #include "mozilla/gfx/Logging.h" diff --git a/gfx/ipc/GPUProcessManager.cpp b/gfx/ipc/GPUProcessManager.cpp index 8aaf0f1d0..3155e41e9 100644 --- a/gfx/ipc/GPUProcessManager.cpp +++ b/gfx/ipc/GPUProcessManager.cpp @@ -6,6 +6,7 @@ #include "GPUProcessManager.h" #include "GPUProcessHost.h" #include "GPUProcessListener.h" +#include "GPUChild.h" #include "mozilla/StaticPtr.h" #include "mozilla/dom/ContentParent.h" #include "mozilla/layers/APZCTreeManager.h" @@ -20,6 +21,7 @@ #ifdef MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING # include "mozilla/widget/CompositorWidgetChild.h" #endif +#include "gfxConfig.h" #include "nsBaseWidget.h" #include "nsContentUtils.h" #include "VsyncBridgeChild.h" @@ -29,6 +31,9 @@ #include "mozilla/dom/VideoDecoderManagerParent.h" #include "MediaPrefs.h" +using namespace mozilla::ipc; +using namespace mozilla::widget; + namespace mozilla { namespace gfx { diff --git a/gfx/ipc/InProcessCompositorSession.cpp b/gfx/ipc/InProcessCompositorSession.cpp index fd8525085..2090a3404 100644 --- a/gfx/ipc/InProcessCompositorSession.cpp +++ b/gfx/ipc/InProcessCompositorSession.cpp @@ -6,10 +6,16 @@ #include "InProcessCompositorSession.h" +#include "mozilla/widget/CompositorWidget.h" +#include "mozilla/layers/CompositorBridgeParent.h" +#include "mozilla/layers/CompositorBridgeChild.h" // so we can cast an APZCTreeManager to an IAPZCTreeManager #include "mozilla/layers/APZCTreeManager.h" #include "mozilla/layers/IAPZCTreeManager.h" +using namespace mozilla::layers; +using namespace mozilla::widget; + namespace mozilla { namespace layers { diff --git a/gfx/ipc/InProcessCompositorSession.h b/gfx/ipc/InProcessCompositorSession.h index deb642da2..c6c89efdd 100644 --- a/gfx/ipc/InProcessCompositorSession.h +++ b/gfx/ipc/InProcessCompositorSession.h @@ -7,6 +7,7 @@ #define _include_mozilla_gfx_ipc_InProcessCompositorSession_h_ #include "CompositorSession.h" +#include "Layers.h" #include "mozilla/gfx/Point.h" #include "Units.h" diff --git a/gfx/ipc/RemoteCompositorSession.cpp b/gfx/ipc/RemoteCompositorSession.cpp index 6e5ad975a..8acf7dea5 100644 --- a/gfx/ipc/RemoteCompositorSession.cpp +++ b/gfx/ipc/RemoteCompositorSession.cpp @@ -8,8 +8,10 @@ #include "mozilla/VsyncDispatcher.h" #include "mozilla/layers/APZChild.h" #include "mozilla/layers/APZCTreeManagerChild.h" +#include "mozilla/layers/CompositorBridgeChild.h" #include "mozilla/Unused.h" #include "nsBaseWidget.h" +#include "GPUProcessManager.h" namespace mozilla { namespace layers { diff --git a/gfx/ipc/RemoteCompositorSession.h b/gfx/ipc/RemoteCompositorSession.h index b4731c5c2..0a7383e29 100644 --- a/gfx/ipc/RemoteCompositorSession.h +++ b/gfx/ipc/RemoteCompositorSession.h @@ -9,6 +9,7 @@ #include "CompositorSession.h" #include "mozilla/gfx/Point.h" #include "Units.h" +#include "nsBaseWidget.h" namespace mozilla { namespace layers { diff --git a/gfx/ipc/VsyncBridgeChild.cpp b/gfx/ipc/VsyncBridgeChild.cpp index a4be827ef..8a49e43c1 100644 --- a/gfx/ipc/VsyncBridgeChild.cpp +++ b/gfx/ipc/VsyncBridgeChild.cpp @@ -6,6 +6,7 @@ #include "VsyncBridgeChild.h" #include "VsyncIOThreadHolder.h" #include "mozilla/dom/ContentChild.h" +#include "GPUProcessManager.h" namespace mozilla { namespace gfx { diff --git a/gfx/ipc/VsyncBridgeParent.cpp b/gfx/ipc/VsyncBridgeParent.cpp index 96ef5de0f..7f73967ce 100644 --- a/gfx/ipc/VsyncBridgeParent.cpp +++ b/gfx/ipc/VsyncBridgeParent.cpp @@ -5,6 +5,9 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "VsyncBridgeParent.h" #include "mozilla/layers/CompositorThread.h" +#include "mozilla/layers/CompositorBridgeParent.h" + +using namespace mozilla::layers; namespace mozilla { namespace gfx { diff --git a/gfx/ipc/moz.build b/gfx/ipc/moz.build index 309681444..ea31f48c5 100644 --- a/gfx/ipc/moz.build +++ b/gfx/ipc/moz.build @@ -37,12 +37,12 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': 'SharedDIBSurface.h', 'SharedDIBWin.h', ] - UNIFIED_SOURCES += [ + SOURCES += [ 'SharedDIBSurface.cpp', 'SharedDIBWin.cpp', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'CompositorSession.cpp', 'CompositorWidgetVsyncObserver.cpp', 'D3DMessageUtils.cpp', diff --git a/gfx/layers/GLImages.cpp b/gfx/layers/GLImages.cpp index e45c3e7d6..c151d991b 100644 --- a/gfx/layers/GLImages.cpp +++ b/gfx/layers/GLImages.cpp @@ -7,6 +7,7 @@ #include "GLBlitHelper.h" #include "GLReadTexImageHelper.h" #include "GLLibraryEGL.h" +#include "mozilla/gfx/Logging.h" using namespace mozilla; using namespace mozilla::gl; diff --git a/gfx/layers/IMFYCbCrImage.cpp b/gfx/layers/IMFYCbCrImage.cpp index d5943b030..6740fdbe0 100644 --- a/gfx/layers/IMFYCbCrImage.cpp +++ b/gfx/layers/IMFYCbCrImage.cpp @@ -13,6 +13,8 @@ #include "mozilla/layers/TextureClient.h" #include "d3d9.h" +using namespace mozilla::gfx; + namespace mozilla { namespace layers { @@ -67,10 +69,10 @@ struct AutoLockTexture static already_AddRefed<IDirect3DTexture9> InitTextures(IDirect3DDevice9* aDevice, const IntSize &aSize, - _D3DFORMAT aFormat, - RefPtr<IDirect3DSurface9>& aSurface, - HANDLE& aHandle, - D3DLOCKED_RECT& aLockedRect) + _D3DFORMAT aFormat, + RefPtr<IDirect3DSurface9>& aSurface, + HANDLE& aHandle, + D3DLOCKED_RECT& aLockedRect) { if (!aDevice) { return nullptr; diff --git a/gfx/layers/TextureDIB.cpp b/gfx/layers/TextureDIB.cpp index 79a9469bf..775538cf3 100644 --- a/gfx/layers/TextureDIB.cpp +++ b/gfx/layers/TextureDIB.cpp @@ -7,8 +7,10 @@ #include "gfx2DGlue.h" #include "mozilla/gfx/DataSurfaceHelpers.h" // For BufferSizeFromDimensions #include "mozilla/layers/ISurfaceAllocator.h" +#include "mozilla/layers/TextureForwarder.h" #include "mozilla/ipc/ProtocolUtils.h" + namespace mozilla { using namespace gfx; diff --git a/gfx/layers/apz/src/APZCTreeManager.cpp b/gfx/layers/apz/src/APZCTreeManager.cpp index f54326360..00eb3f183 100644 --- a/gfx/layers/apz/src/APZCTreeManager.cpp +++ b/gfx/layers/apz/src/APZCTreeManager.cpp @@ -85,6 +85,21 @@ struct APZCTreeManager::TreeBuildingState { std::map<ScrollableLayerGuid, AsyncPanZoomController*> mApzcMap; }; +// Returns whether or not a wheel event action will be (or was) performed by +// APZ. If this returns true, the event must not perform a synchronous +// scroll. +// +// Even if this returns false, all wheel events in APZ-aware widgets must +// be sent through APZ so they are transformed correctly for TabParent. +static bool +WillHandleWheelEvent(WidgetWheelEvent* aEvent) +{ + return EventStateManager::WheelEventIsScrollAction(aEvent) && + (aEvent->mDeltaMode == nsIDOMWheelEvent::DOM_DELTA_LINE || + aEvent->mDeltaMode == nsIDOMWheelEvent::DOM_DELTA_PIXEL || + aEvent->mDeltaMode == nsIDOMWheelEvent::DOM_DELTA_PAGE); +} + class APZCTreeManager::CheckerboardFlushObserver : public nsIObserver { public: NS_DECL_ISUPPORTS diff --git a/gfx/layers/apz/src/AsyncPanZoomController.cpp b/gfx/layers/apz/src/AsyncPanZoomController.cpp index 3d4112395..d9ad3ae78 100644 --- a/gfx/layers/apz/src/AsyncPanZoomController.cpp +++ b/gfx/layers/apz/src/AsyncPanZoomController.cpp @@ -33,6 +33,7 @@ #include "mozilla/ClearOnShutdown.h" // for ClearOnShutdown #include "mozilla/ComputedTimingFunction.h" // for ComputedTimingFunction #include "mozilla/EventForwards.h" // for nsEventStatus_* +#include "mozilla/EventStateManager.h" #include "mozilla/MouseEvents.h" // for WidgetWheelEvent #include "mozilla/Preferences.h" // for Preferences #include "mozilla/ReentrantMonitor.h" // for ReentrantMonitorAutoEnter, etc @@ -44,6 +45,7 @@ #include "mozilla/dom/Touch.h" // for Touch #include "mozilla/gfx/BasePoint.h" // for BasePoint #include "mozilla/gfx/BaseRect.h" // for BaseRect +#include "mozilla/gfx/Coord.h" #include "mozilla/gfx/Point.h" // for Point, RoundedToInt, etc #include "mozilla/gfx/Rect.h" // for RoundedIn #include "mozilla/gfx/ScaleFactor.h" // for ScaleFactor @@ -102,7 +104,12 @@ typedef GeckoContentController::APZStateChange APZStateChange; typedef GeckoContentController::TapType TapType; typedef mozilla::gfx::Point Point; typedef mozilla::gfx::Matrix4x4 Matrix4x4; +using mozilla::gfx::CoordTyped; +using mozilla::gfx::IntCoordTyped; +using mozilla::gfx::IntRectTyped; using mozilla::gfx::PointTyped; +using mozilla::gfx::RectTyped; +using mozilla::gfx::ScaleFactors2D; // Choose between platform-specific implementations. #ifdef MOZ_WIDGET_ANDROID @@ -833,7 +840,9 @@ AsyncPanZoomController::ArePointerEventsConsumable(TouchBlockState* aBlock, uint } template <typename Units> -static CoordTyped<Units> GetAxisStart(AsyncDragMetrics::DragDirection aDir, const PointTyped<Units>& aValue) { +static CoordTyped<Units> GetAxisStart( +AsyncDragMetrics::DragDirection aDir, +const PointTyped<Units>& aValue) { if (aDir == AsyncDragMetrics::HORIZONTAL) { return aValue.x; } else { diff --git a/gfx/layers/apz/src/GestureEventListener.cpp b/gfx/layers/apz/src/GestureEventListener.cpp index 7fd07f3ff..0bacc8778 100644 --- a/gfx/layers/apz/src/GestureEventListener.cpp +++ b/gfx/layers/apz/src/GestureEventListener.cpp @@ -13,6 +13,7 @@ #include "mozilla/SizePrintfMacros.h" // for PRIuSIZE #include "nsDebug.h" // for NS_WARNING #include "nsMathUtils.h" // for NS_hypot +#include "InputBlockState.h" // for TouchBlockState #define GEL_LOG(...) // #define GEL_LOG(...) printf_stderr("GEL: " __VA_ARGS__) diff --git a/gfx/layers/apz/src/InputBlockState.h b/gfx/layers/apz/src/InputBlockState.h index 86fb0d03f..528609947 100644 --- a/gfx/layers/apz/src/InputBlockState.h +++ b/gfx/layers/apz/src/InputBlockState.h @@ -16,6 +16,7 @@ #include "mozilla/TimeStamp.h" // for TimeStamp #include "nsTArray.h" // for nsTArray #include "TouchCounter.h" +#include "OverscrollHandoffState.h" namespace mozilla { namespace layers { diff --git a/gfx/layers/apz/util/ContentProcessController.h b/gfx/layers/apz/util/ContentProcessController.h index 07d113c9e..bb1a86d3f 100644 --- a/gfx/layers/apz/util/ContentProcessController.h +++ b/gfx/layers/apz/util/ContentProcessController.h @@ -8,6 +8,7 @@ #define mozilla_layers_ContentProcessController_h #include "mozilla/layers/GeckoContentController.h" +#include "mozilla/dom/ipc/IdType.h" class nsIObserver; diff --git a/gfx/layers/client/ClientCanvasLayer.cpp b/gfx/layers/client/ClientCanvasLayer.cpp index 32acf1eb2..7e9885ef1 100644 --- a/gfx/layers/client/ClientCanvasLayer.cpp +++ b/gfx/layers/client/ClientCanvasLayer.cpp @@ -19,6 +19,9 @@ #include "nsRect.h" // for mozilla::gfx::IntRect #include "nsXULAppAPI.h" // for XRE_GetProcessType, etc #include "gfxPrefs.h" // for WebGLForceLayersReadback +#include "gfxUtils.h" +#include "TextureClientSharedSurface.h" + using namespace mozilla::gfx; using namespace mozilla::gl; diff --git a/gfx/layers/ipc/CompositorBridgeParent.cpp b/gfx/layers/ipc/CompositorBridgeParent.cpp index 97ea984db..9a2df849b 100644 --- a/gfx/layers/ipc/CompositorBridgeParent.cpp +++ b/gfx/layers/ipc/CompositorBridgeParent.cpp @@ -28,6 +28,7 @@ #include "mozilla/dom/ContentParent.h" #include "mozilla/dom/TabParent.h" #include "mozilla/gfx/2D.h" // for DrawTarget +#include "mozilla/gfx/gfxVars.h" #include "mozilla/gfx/Point.h" // for IntSize #include "mozilla/gfx/Rect.h" // for IntSize #include "mozilla/ipc/Transport.h" // for Transport diff --git a/gfx/layers/ipc/CrossProcessCompositorBridgeParent.cpp b/gfx/layers/ipc/CrossProcessCompositorBridgeParent.cpp index 8bb5cf2d5..9509cf16a 100644 --- a/gfx/layers/ipc/CrossProcessCompositorBridgeParent.cpp +++ b/gfx/layers/ipc/CrossProcessCompositorBridgeParent.cpp @@ -84,9 +84,10 @@ #include "LayerScope.h" namespace mozilla { - namespace layers { +using namespace std; + // defined in CompositorBridgeParent.cpp typedef map<uint64_t, CompositorBridgeParent::LayerTreeState> LayerTreeMap; extern LayerTreeMap sIndirectLayerTrees; diff --git a/gfx/layers/ipc/CrossProcessCompositorBridgeParent.h b/gfx/layers/ipc/CrossProcessCompositorBridgeParent.h index 399969950..ca213bbd5 100644 --- a/gfx/layers/ipc/CrossProcessCompositorBridgeParent.h +++ b/gfx/layers/ipc/CrossProcessCompositorBridgeParent.h @@ -8,6 +8,7 @@ #define mozilla_layers_CrossProcessCompositorBridgeParent_h #include "mozilla/layers/CompositorBridgeParent.h" +#include "mozilla/layers/CompositorThread.h" namespace mozilla { namespace layers { diff --git a/gfx/layers/ipc/VideoBridgeParent.cpp b/gfx/layers/ipc/VideoBridgeParent.cpp index fce2184c8..f8e3c5314 100644 --- a/gfx/layers/ipc/VideoBridgeParent.cpp +++ b/gfx/layers/ipc/VideoBridgeParent.cpp @@ -12,7 +12,6 @@ namespace layers { using namespace mozilla::ipc; using namespace mozilla::gfx; -using namespace mozilla::media; static VideoBridgeParent* sVideoBridgeSingleton; diff --git a/gfx/layers/ipc/VideoBridgeParent.h b/gfx/layers/ipc/VideoBridgeParent.h index e5560acab..bde18b632 100644 --- a/gfx/layers/ipc/VideoBridgeParent.h +++ b/gfx/layers/ipc/VideoBridgeParent.h @@ -7,6 +7,7 @@ #define gfx_layers_ipc_VideoBridgeParent_h_ #include "mozilla/layers/PVideoBridgeParent.h" +#include "mozilla/layers/ISurfaceAllocator.h" namespace mozilla { namespace layers { diff --git a/gfx/layers/moz.build b/gfx/layers/moz.build index 2a2fa1169..fb65bd07a 100644 --- a/gfx/layers/moz.build +++ b/gfx/layers/moz.build @@ -1,8 +1,5 @@ # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- # vim: set filetype=python: -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. with Files('apz/**'): BUG_COMPONENT = ('Core', 'Panning and Zooming') @@ -22,7 +19,6 @@ EXPORTS += [ 'composite/ImageHost.h', 'CompositorTypes.h', 'CopyableCanvasLayer.h', - 'D3D9SurfaceImage.h', 'FrameMetrics.h', 'GLImages.h', 'GPUVideoImage.h', @@ -46,48 +42,6 @@ EXPORTS += [ 'TiledLayerBuffer.h', ] -if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': - SOURCES += [ - 'D3D11ShareHandleImage.cpp', - ] - UNIFIED_SOURCES += [ - 'D3D9SurfaceImage.cpp', - 'IMFYCbCrImage.cpp', - 'TextureDIB.cpp', - ] - EXPORTS.mozilla.layers += [ - 'TextureDIB.h', - ] - if CONFIG['MOZ_ENABLE_D3D9_LAYER']: - EXPORTS += [ - 'd3d9/DeviceManagerD3D9.h', - ] - EXPORTS.mozilla.layers += [ - 'd3d9/CompositorD3D9.h', - 'd3d9/TextureD3D9.h', - ] - UNIFIED_SOURCES += [ - 'd3d9/TextureD3D9.cpp', - ] - SOURCES += [ - 'd3d9/CompositorD3D9.cpp', - 'd3d9/DeviceManagerD3D9.cpp', - 'd3d9/Nv3DVUtils.cpp', - ] - if CONFIG['MOZ_ENABLE_D3D10_LAYER']: - EXPORTS.mozilla.layers += [ - 'd3d11/CompositorD3D11.h', - 'd3d11/ReadbackManagerD3D11.h', - 'd3d11/TextureD3D11.h', - ] - UNIFIED_SOURCES += [ - 'd3d11/TextureD3D11.cpp', - ] - SOURCES += [ - 'd3d11/CompositorD3D11.cpp', - 'd3d11/ReadbackManagerD3D11.cpp', - ] - EXPORTS.gfxipc += [ 'ipc/ShadowLayerUtils.h', ] @@ -156,8 +110,6 @@ EXPORTS.mozilla.layers += [ 'composite/TiledContentHost.h', 'Compositor.h', 'CompositorTypes.h', - 'D3D11ShareHandleImage.h', - 'D3D9SurfaceImage.h', 'Effects.h', 'ImageDataSerializer.h', 'ipc/APZChild.h', @@ -229,21 +181,19 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': 'MacIOSurfaceHelpers.h', 'MacIOSurfaceImage.h', ] - UNIFIED_SOURCES += [ - 'opengl/GLManager.cpp', - ] SOURCES += [ 'ipc/ShadowLayerUtilsMac.cpp', 'MacIOSurfaceHelpers.cpp', 'MacIOSurfaceImage.cpp', + 'opengl/GLManager.cpp', ] if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android': - UNIFIED_SOURCES += [ + SOURCES += [ 'apz/src/AndroidAPZ.cpp', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'apz/public/IAPZCTreeManager.cpp', 'apz/src/APZCTreeManager.cpp', 'apz/src/AsyncPanZoomController.cpp', @@ -278,6 +228,7 @@ UNIFIED_SOURCES += [ 'basic/BasicColorLayer.cpp', 'basic/BasicCompositor.cpp', 'basic/BasicContainerLayer.cpp', + 'basic/BasicImageLayer.cpp', 'basic/BasicImages.cpp', 'basic/BasicLayerManager.cpp', 'basic/BasicLayersImpl.cpp', @@ -326,6 +277,7 @@ UNIFIED_SOURCES += [ 'Effects.cpp', 'FrameMetrics.cpp', 'GLImages.cpp', + 'ImageContainer.cpp', 'ImageDataSerializer.cpp', 'ImageLayers.cpp', 'ipc/APZChild.cpp', @@ -335,9 +287,7 @@ UNIFIED_SOURCES += [ 'ipc/CompositableTransactionParent.cpp', 'ipc/CompositorBench.cpp', 'ipc/CompositorBridgeChild.cpp', - 'ipc/CompositorBridgeParent.cpp', 'ipc/CompositorThread.cpp', - 'ipc/CrossProcessCompositorBridgeParent.cpp', 'ipc/ImageBridgeChild.cpp', 'ipc/ImageBridgeParent.cpp', 'ipc/ImageContainerChild.cpp', @@ -355,10 +305,12 @@ UNIFIED_SOURCES += [ 'ipc/SharedRGBImage.cpp', 'ipc/VideoBridgeChild.cpp', 'ipc/VideoBridgeParent.cpp', + 'Layers.cpp', 'LayerScope.cpp', 'LayersLogging.cpp', 'LayerSorter.cpp', 'LayersTypes.cpp', + 'LayerTreeInvalidation.cpp', 'opengl/CompositingRenderTargetOGL.cpp', 'opengl/CompositorOGL.cpp', 'opengl/GLBlitTextureImageHelper.cpp', @@ -366,6 +318,7 @@ UNIFIED_SOURCES += [ 'opengl/TextureClientOGL.cpp', 'opengl/TextureHostOGL.cpp', 'opengl/TexturePoolOGL.cpp', + 'PersistentBufferProvider.cpp', 'protobuf/LayerScopePacket.pb.cc', 'ReadbackProcessor.cpp', 'RenderTrace.cpp', @@ -373,12 +326,11 @@ UNIFIED_SOURCES += [ 'TextureWrapperImage.cpp', ] -SOURCES += [ - 'basic/BasicImageLayer.cpp', - 'ImageContainer.cpp', - 'Layers.cpp', - 'LayerTreeInvalidation.cpp', - 'PersistentBufferProvider.cpp', +# Implementation in CBP.cpp of things used in CPCBP.cpp +# EraseLayerState, UpdateIndirectTree and map<uint64_t, CompositorBridgeParent::LayerTreeState> +UNIFIED_SOURCES += [ + 'ipc/CompositorBridgeParent.cpp', + 'ipc/CrossProcessCompositorBridgeParent.cpp', ] # Disable RTTI in google protocol buffer @@ -425,12 +377,6 @@ LOCAL_INCLUDES += [ FINAL_LIBRARY = 'xul' -if CONFIG['MOZ_DEBUG']: - DEFINES['D3D_DEBUG_INFO'] = True - -if CONFIG['MOZ_ENABLE_D3D10_LAYER']: - DEFINES['MOZ_ENABLE_D3D10_LAYER'] = True - if CONFIG['ENABLE_TESTS']: DIRS += ['apz/test/gtest'] @@ -446,6 +392,6 @@ if CONFIG['GNU_CXX']: CXXFLAGS += ['-Wno-error=shadow'] if CONFIG['MOZ_ENABLE_SKIA']: - UNIFIED_SOURCES += [ + SOURCES += [ 'composite/PaintCounter.cpp', ] diff --git a/gfx/ots/src/moz.build b/gfx/ots/src/moz.build index 962a86a5b..a5028dfa8 100644 --- a/gfx/ots/src/moz.build +++ b/gfx/ots/src/moz.build @@ -9,7 +9,7 @@ EXPORTS += [ '../include/ots-memory-stream.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'avar.cc', 'cff.cc', 'cff_charstring.cc', diff --git a/gfx/skia/generate_mozbuild.py b/gfx/skia/generate_mozbuild.py index bb069870a..08d6ed9ab 100755 --- a/gfx/skia/generate_mozbuild.py +++ b/gfx/skia/generate_mozbuild.py @@ -28,7 +28,7 @@ if CONFIG['MOZ_OPTIMIZE']: if CONFIG['_MSC_VER']: skia_opt_flags += ['-O2'] elif CONFIG['GNU_CC']: - skia_opt_flags += ['-O3'] + skia_opt_flags += ['-O2'] """ @@ -79,7 +79,7 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] in { if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': DEFINES['UNICODE'] = True DEFINES['_UNICODE'] = True - UNIFIED_SOURCES += [ + SOURCES += [ 'skia/src/fonts/SkFontMgr_indirect.cpp', 'skia/src/fonts/SkRemotableFontMgr.cpp', ] @@ -415,7 +415,7 @@ def write_sources(f, values, indent): else: sources['unified'].add(item) - write_list(f, "UNIFIED_SOURCES", sources['unified'], indent) + write_list(f, "SOURCES", sources['unified'], indent) write_list(f, "SOURCES", sources['nonunified'], indent) def write_list(f, name, values, indent): diff --git a/gfx/skia/moz.build b/gfx/skia/moz.build index 7a3ef6549..56570e61f 100644 --- a/gfx/skia/moz.build +++ b/gfx/skia/moz.build @@ -20,9 +20,9 @@ if CONFIG['MOZ_OPTIMIZE']: if CONFIG['_MSC_VER']: skia_opt_flags += ['-O2'] elif CONFIG['GNU_CC']: - skia_opt_flags += ['-O3'] + skia_opt_flags += ['-O2'] -UNIFIED_SOURCES += [ +SOURCES += [ 'skia/src/core/SkAAClip.cpp', 'skia/src/core/SkAlphaRuns.cpp', 'skia/src/core/SkAnnotation.cpp', @@ -308,7 +308,7 @@ SOURCES['skia/src/core/SkSpriteBlitter4f.cpp'].flags += skia_opt_flags SOURCES['skia/src/core/SkSpriteBlitter_ARGB32.cpp'].flags += skia_opt_flags SOURCES['skia/src/core/SkSpriteBlitter_RGB16.cpp'].flags += skia_opt_flags if CONFIG['MOZ_ENABLE_SKIA_PDF']: - UNIFIED_SOURCES += [ + SOURCES += [ 'skia/src/core/SkMD5.cpp', 'skia/src/pdf/SkDeflate.cpp', 'skia/src/pdf/SkJpegInfo.cpp', @@ -332,7 +332,7 @@ if CONFIG['MOZ_ENABLE_SKIA_PDF']: 'skia/src/pdf/SkPDFFont.cpp', ] if CONFIG['MOZ_ENABLE_SKIA_GPU']: - UNIFIED_SOURCES += [ + SOURCES += [ 'skia/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp', 'skia/src/gpu/batches/GrAnalyticRectBatch.cpp', 'skia/src/gpu/batches/GrAtlasTextBatch.cpp', @@ -517,7 +517,7 @@ if CONFIG['MOZ_ENABLE_SKIA_GPU']: 'skia/src/image/SkImage_Gpu.cpp', ] if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android'): - UNIFIED_SOURCES += [ + SOURCES += [ 'skia/src/ports/SkDebug_android.cpp', 'skia/src/ports/SkOSFile_posix.cpp', 'skia/src/ports/SkOSLibrary_posix.cpp', @@ -529,7 +529,7 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android'): 'skia/src/ports/SkFontHost_FreeType_common.cpp', ] if CONFIG['MOZ_WIDGET_TOOLKIT'] in {'cocoa', 'uikit'}: - UNIFIED_SOURCES += [ + SOURCES += [ 'skia/src/ports/SkDebug_stdio.cpp', 'skia/src/ports/SkOSFile_posix.cpp', 'skia/src/ports/SkOSLibrary_posix.cpp', @@ -542,7 +542,7 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] in {'cocoa', 'uikit'}: 'skia/src/ports/SkFontHost_mac.cpp', ] if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: - UNIFIED_SOURCES += [ + SOURCES += [ 'skia/src/ports/SkDebug_stdio.cpp', 'skia/src/ports/SkOSFile_posix.cpp', 'skia/src/ports/SkOSLibrary_posix.cpp', @@ -574,7 +574,7 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': 'skia/src/utils/win/SkIStream.cpp', ] if CONFIG['INTEL_ARCHITECTURE']: - UNIFIED_SOURCES += [ + SOURCES += [ 'skia/src/opts/opts_check_x86.cpp', ] SOURCES += [ @@ -598,7 +598,7 @@ if CONFIG['INTEL_ARCHITECTURE']: SOURCES['skia/src/opts/SkOpts_sse42.cpp'].flags += skia_opt_flags SOURCES['skia/src/opts/SkOpts_ssse3.cpp'].flags += skia_opt_flags elif CONFIG['CPU_ARCH'] in ('arm', 'aarch64') and CONFIG['GNU_CC']: - UNIFIED_SOURCES += [ + SOURCES += [ 'skia/src/core/SkUtilsArm.cpp', ] SOURCES += [ diff --git a/gfx/src/gfxTelemetry.cpp b/gfx/src/gfxTelemetry.cpp index 9ea15dcbd..b027cde39 100644 --- a/gfx/src/gfxTelemetry.cpp +++ b/gfx/src/gfxTelemetry.cpp @@ -4,6 +4,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "gfxTelemetry.h"
+#include "mozilla/Assertions.h"
namespace mozilla {
namespace gfx {
diff --git a/gfx/src/gfxTelemetry.h b/gfx/src/gfxTelemetry.h index 9f0f618f0..c6d13c86a 100644 --- a/gfx/src/gfxTelemetry.h +++ b/gfx/src/gfxTelemetry.h @@ -58,12 +58,6 @@ const char* FeatureStatusToString(FeatureStatus aStatus); bool IsFeatureStatusFailure(FeatureStatus aStatus);
bool IsFeatureStatusSuccess(FeatureStatus aStatus);
-enum class TelemetryDeviceCode : uint32_t {
- Content = 0,
- Image = 1,
- D2D1 = 2
-};
-
} // namespace gfx
} // namespace mozilla
diff --git a/gfx/src/moz.build b/gfx/src/moz.build index ea707a340..b11fada66 100644 --- a/gfx/src/moz.build +++ b/gfx/src/moz.build @@ -56,11 +56,12 @@ if CONFIG['MOZ_X11']: 'X11Util.cpp', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'DriverCrashGuard.cpp', 'FilterSupport.cpp', 'gfxTelemetry.cpp', 'nsColor.cpp', + 'nsDeviceContext.cpp', 'nsFont.cpp', 'nsFontMetrics.cpp', 'nsRect.cpp', @@ -72,11 +73,6 @@ UNIFIED_SOURCES += [ 'TiledRegion.cpp', ] -# nsDeviceContext.cpp cannot be built in unified mode because it pulls in OS X system headers. -SOURCES += [ - 'nsDeviceContext.cpp', -] - include('/ipc/chromium/chromium-config.mozbuild') LOCAL_INCLUDES += [ diff --git a/gfx/src/nsRegion.cpp b/gfx/src/nsRegion.cpp index 3b0bec1e3..ed86704e8 100644 --- a/gfx/src/nsRegion.cpp +++ b/gfx/src/nsRegion.cpp @@ -5,6 +5,7 @@ #include "nsRegion.h" #include "nsTArray.h" +#include "gfx2DGlue.h" #include "gfxUtils.h" #include "mozilla/ToString.h" diff --git a/gfx/thebes/DeviceManagerDx.cpp b/gfx/thebes/DeviceManagerDx.cpp index 9f42974c3..5f505f88b 100644 --- a/gfx/thebes/DeviceManagerDx.cpp +++ b/gfx/thebes/DeviceManagerDx.cpp @@ -15,7 +15,6 @@ #include "mozilla/gfx/Logging.h" #include "mozilla/layers/CompositorThread.h" #include "nsIGfxInfo.h" -#include <d3d11.h> #include <ddraw.h> namespace mozilla { diff --git a/gfx/thebes/DeviceManagerDx.h b/gfx/thebes/DeviceManagerDx.h index e29ab0731..25c028b55 100644 --- a/gfx/thebes/DeviceManagerDx.h +++ b/gfx/thebes/DeviceManagerDx.h @@ -20,6 +20,7 @@ #include <objbase.h> #include <dxgi.h> +#include <d3d11.h> // This header is available in the June 2010 SDK and in the Win8 SDK #include <d3dcommon.h> diff --git a/gfx/thebes/gfxDWriteFontList.cpp b/gfx/thebes/gfxDWriteFontList.cpp index 5cc1fbb92..12e2d8adc 100644 --- a/gfx/thebes/gfxDWriteFontList.cpp +++ b/gfx/thebes/gfxDWriteFontList.cpp @@ -18,6 +18,7 @@ #include "nsDirectoryServiceDefs.h" #include "nsAppDirectoryServiceDefs.h" #include "nsISimpleEnumerator.h" +#include "GeckoProfiler.h" #include "gfxGDIFontList.h" diff --git a/gfx/thebes/gfxFont-Impl.h b/gfx/thebes/gfxFont-Impl.h new file mode 100644 index 000000000..eb9541053 --- /dev/null +++ b/gfx/thebes/gfxFont-Impl.h @@ -0,0 +1,80 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+#ifndef GFX_FONT_IMPL_H
+#define GFX_FONT_IMPL_H
+
+#include "mozilla/DebugOnly.h"
+using mozilla::DebugOnly;
+
+#ifdef __GNUC__
+#define GFX_MAYBE_UNUSED __attribute__((unused))
+#else
+#define GFX_MAYBE_UNUSED
+#endif
+
+template<typename T>
+gfxShapedWord*
+gfxFont::GetShapedWord(DrawTarget *aDrawTarget,
+ const T *aText,
+ uint32_t aLength,
+ uint32_t aHash,
+ Script aRunScript,
+ bool aVertical,
+ int32_t aAppUnitsPerDevUnit,
+ uint32_t aFlags,
+ gfxTextPerfMetrics *aTextPerf GFX_MAYBE_UNUSED)
+{
+ // if the cache is getting too big, flush it and start over
+ uint32_t wordCacheMaxEntries =
+ gfxPlatform::GetPlatform()->WordCacheMaxEntries();
+ if (mWordCache->Count() > wordCacheMaxEntries) {
+ NS_WARNING("flushing shaped-word cache");
+ ClearCachedWords();
+ }
+
+ // if there's a cached entry for this word, just return it
+ CacheHashKey key(aText, aLength, aHash,
+ aRunScript,
+ aAppUnitsPerDevUnit,
+ aFlags);
+
+ CacheHashEntry *entry = mWordCache->PutEntry(key);
+ if (!entry) {
+ NS_WARNING("failed to create word cache entry - expect missing text");
+ return nullptr;
+ }
+ gfxShapedWord* sw = entry->mShapedWord.get();
+
+ if (sw) {
+ sw->ResetAge();
+#ifndef RELEASE_OR_BETA
+ if (aTextPerf) {
+ aTextPerf->current.wordCacheHit++;
+ }
+#endif
+ return sw;
+ }
+
+#ifndef RELEASE_OR_BETA
+ if (aTextPerf) {
+ aTextPerf->current.wordCacheMiss++;
+ }
+#endif
+
+ sw = gfxShapedWord::Create(aText, aLength, aRunScript, aAppUnitsPerDevUnit,
+ aFlags);
+ entry->mShapedWord.reset(sw);
+ if (!sw) {
+ NS_WARNING("failed to create gfxShapedWord - expect missing text");
+ return nullptr;
+ }
+
+ DebugOnly<bool> ok =
+ ShapeText(aDrawTarget, aText, 0, aLength, aRunScript, aVertical, sw);
+
+ NS_WARNING_ASSERTION(ok, "failed to shape word - expect garbled text");
+
+ return sw;
+}
+
+#endif // GFX_FONT_IMPL_H
diff --git a/gfx/thebes/gfxFont.cpp b/gfx/thebes/gfxFont.cpp index 490a866db..a73252759 100644 --- a/gfx/thebes/gfxFont.cpp +++ b/gfx/thebes/gfxFont.cpp @@ -4,6 +4,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "gfxFont.h" +#include "gfxFont-Impl.h" #include "mozilla/BinarySearch.h" #include "mozilla/DebugOnly.h" @@ -44,6 +45,11 @@ #include "cairo.h" +#ifdef XP_WIN +#include "cairo-win32.h" +#include "gfxWindowsPlatform.h" +#endif + #include "harfbuzz/hb.h" #include "harfbuzz/hb-ot.h" #include "graphite2/Font.h" @@ -2539,70 +2545,7 @@ IsBoundarySpace(char16_t aChar, char16_t aNextChar) #define GFX_MAYBE_UNUSED #endif -template<typename T> -gfxShapedWord* -gfxFont::GetShapedWord(DrawTarget *aDrawTarget, - const T *aText, - uint32_t aLength, - uint32_t aHash, - Script aRunScript, - bool aVertical, - int32_t aAppUnitsPerDevUnit, - uint32_t aFlags, - gfxTextPerfMetrics *aTextPerf GFX_MAYBE_UNUSED) -{ - // if the cache is getting too big, flush it and start over - uint32_t wordCacheMaxEntries = - gfxPlatform::GetPlatform()->WordCacheMaxEntries(); - if (mWordCache->Count() > wordCacheMaxEntries) { - NS_WARNING("flushing shaped-word cache"); - ClearCachedWords(); - } - - // if there's a cached entry for this word, just return it - CacheHashKey key(aText, aLength, aHash, - aRunScript, - aAppUnitsPerDevUnit, - aFlags); - - CacheHashEntry *entry = mWordCache->PutEntry(key); - if (!entry) { - NS_WARNING("failed to create word cache entry - expect missing text"); - return nullptr; - } - gfxShapedWord* sw = entry->mShapedWord.get(); - - if (sw) { - sw->ResetAge(); -#ifndef RELEASE_OR_BETA - if (aTextPerf) { - aTextPerf->current.wordCacheHit++; - } -#endif - return sw; - } - -#ifndef RELEASE_OR_BETA - if (aTextPerf) { - aTextPerf->current.wordCacheMiss++; - } -#endif - - sw = gfxShapedWord::Create(aText, aLength, aRunScript, aAppUnitsPerDevUnit, - aFlags); - entry->mShapedWord.reset(sw); - if (!sw) { - NS_WARNING("failed to create gfxShapedWord - expect missing text"); - return nullptr; - } - - DebugOnly<bool> ok = - ShapeText(aDrawTarget, aText, 0, aLength, aRunScript, aVertical, sw); - - NS_WARNING_ASSERTION(ok, "failed to shape word - expect garbled text"); - - return sw; -} +/* GetShapedWord is in gfxFont-Impl.h */ bool gfxFont::CacheHashEntry::KeyEquals(const KeyTypePointer aKey) const diff --git a/gfx/thebes/gfxFontEntry.cpp b/gfx/thebes/gfxFontEntry.cpp index f33d6a9d8..695e94e9f 100644 --- a/gfx/thebes/gfxFontEntry.cpp +++ b/gfx/thebes/gfxFontEntry.cpp @@ -19,6 +19,7 @@ #include "gfxTypes.h" #include "gfxContext.h" #include "gfxFontConstants.h" +#include "gfxGraphiteShaper.h" #include "gfxHarfBuzzShaper.h" #include "gfxUserFontSet.h" #include "gfxPlatformFontList.h" diff --git a/gfx/thebes/gfxFontInfoLoader.cpp b/gfx/thebes/gfxFontInfoLoader.cpp index a53c96369..c9abef2ea 100644 --- a/gfx/thebes/gfxFontInfoLoader.cpp +++ b/gfx/thebes/gfxFontInfoLoader.cpp @@ -8,6 +8,10 @@ #include "nsIObserverService.h" #include "nsThreadUtils.h" // for nsRunnable #include "gfxPlatformFontList.h" +#include "mozilla/gfx/Logging.h" +#ifdef XP_WIN +#include <d3d11.h> +#endif using namespace mozilla; using services::GetObserverService; diff --git a/gfx/thebes/gfxHarfBuzzShaper.h b/gfx/thebes/gfxHarfBuzzShaper.h index 70d912cc0..b4b61159f 100644 --- a/gfx/thebes/gfxHarfBuzzShaper.h +++ b/gfx/thebes/gfxHarfBuzzShaper.h @@ -12,6 +12,8 @@ #include "nsUnicodeProperties.h" #include "mozilla/gfx/2D.h" +using namespace mozilla; + class gfxHarfBuzzShaper : public gfxFontShaper { public: explicit gfxHarfBuzzShaper(gfxFont *aFont); diff --git a/gfx/thebes/gfxMathTable.cpp b/gfx/thebes/gfxMathTable.cpp index f7047c747..d9f4462ff 100644 --- a/gfx/thebes/gfxMathTable.cpp +++ b/gfx/thebes/gfxMathTable.cpp @@ -8,6 +8,7 @@ #include "harfbuzz/hb-ot.h" #define FixedToFloat(f) ((f) * (1.0 / 65536.0)) +#define FloatToFixed(f) (65536 * (f)) using namespace mozilla; diff --git a/gfx/thebes/gfxMatrix.cpp b/gfx/thebes/gfxMatrix.cpp index 8fcce4ce9..25a4d5a6f 100644 --- a/gfx/thebes/gfxMatrix.cpp +++ b/gfx/thebes/gfxMatrix.cpp @@ -8,6 +8,8 @@ #include "mozilla/gfx/Tools.h" #include "mozilla/gfx/Matrix.h" // for Matrix4x4 +using namespace mozilla::gfx; + #define CAIRO_MATRIX(x) reinterpret_cast<cairo_matrix_t*>((x)) #define CONST_CAIRO_MATRIX(x) reinterpret_cast<const cairo_matrix_t*>((x)) diff --git a/gfx/thebes/gfxPattern.cpp b/gfx/thebes/gfxPattern.cpp index d937b992f..3092c8008 100644 --- a/gfx/thebes/gfxPattern.cpp +++ b/gfx/thebes/gfxPattern.cpp @@ -17,6 +17,7 @@ #include <vector> +using namespace mozilla; using namespace mozilla::gfx; gfxPattern::gfxPattern(const Color& aColor) diff --git a/gfx/thebes/gfxSVGGlyphs.cpp b/gfx/thebes/gfxSVGGlyphs.cpp index 23f68f590..13c0420cc 100644 --- a/gfx/thebes/gfxSVGGlyphs.cpp +++ b/gfx/thebes/gfxSVGGlyphs.cpp @@ -38,6 +38,7 @@ #define UTF8_CHARSET NS_LITERAL_CSTRING("utf-8") using namespace mozilla; +using namespace mozilla::gfx; typedef mozilla::dom::Element Element; diff --git a/gfx/thebes/gfxScriptItemizer.cpp b/gfx/thebes/gfxScriptItemizer.cpp index b9426ee6f..90e0ca98c 100644 --- a/gfx/thebes/gfxScriptItemizer.cpp +++ b/gfx/thebes/gfxScriptItemizer.cpp @@ -63,6 +63,8 @@ #define TOP() (parenStack[parenSP]) #define SYNC_FIXUP() (fixupCount = 0) +using namespace mozilla::unicode; + void gfxScriptItemizer::push(uint32_t endPairChar, Script newScriptCode) { diff --git a/gfx/thebes/gfxSkipChars.cpp b/gfx/thebes/gfxSkipChars.cpp index d0fad53e2..0cd53c87b 100644 --- a/gfx/thebes/gfxSkipChars.cpp +++ b/gfx/thebes/gfxSkipChars.cpp @@ -5,6 +5,7 @@ #include "gfxSkipChars.h" #include "mozilla/BinarySearch.h" +#include "mozilla/gfx/Logging.h" struct SkippedRangeStartComparator { diff --git a/gfx/thebes/gfxTextRun.cpp b/gfx/thebes/gfxTextRun.cpp index 1702cab66..2e2a0d239 100644 --- a/gfx/thebes/gfxTextRun.cpp +++ b/gfx/thebes/gfxTextRun.cpp @@ -37,6 +37,8 @@ #include "cairo.h" +#include <unicode/unorm2.h> + using namespace mozilla; using namespace mozilla::gfx; using namespace mozilla::unicode; diff --git a/gfx/thebes/gfxTextRun.h b/gfx/thebes/gfxTextRun.h index c3673785c..3c9ded1dc 100644 --- a/gfx/thebes/gfxTextRun.h +++ b/gfx/thebes/gfxTextRun.h @@ -11,6 +11,7 @@ #include "nsString.h" #include "gfxPoint.h" #include "gfxFont.h" +#include "gfxFont-Impl.h" #include "gfxFontConstants.h" #include "nsTArray.h" #include "gfxSkipChars.h" diff --git a/gfx/thebes/moz.build b/gfx/thebes/moz.build index e253d7891..4201dea29 100644 --- a/gfx/thebes/moz.build +++ b/gfx/thebes/moz.build @@ -17,6 +17,7 @@ EXPORTS += [ 'gfxDrawable.h', 'gfxEnv.h', 'gfxFailure.h', + 'gfxFont-Impl.h', 'gfxFont.h', 'gfxFontConstants.h', 'gfxFontEntry.h', @@ -148,11 +149,9 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': 'PrintTargetWindows.cpp', ] if CONFIG['MOZ_ENABLE_DWRITE_FONT']: - UNIFIED_SOURCES += [ - 'gfxDWriteFontList.cpp', - ] SOURCES += [ 'gfxDWriteCommon.cpp', + 'gfxDWriteFontList.cpp', 'gfxDWriteFonts.cpp', ] @@ -164,27 +163,14 @@ if CONFIG['INTEL_ARCHITECTURE']: SOURCES['gfxAlphaRecoverySSE2.cpp'].flags += CONFIG['SSE2_FLAGS'] SOURCES += [ - 'ContextStateTracker.cpp', - # Includes mac system header conflicting with point/size, - # and includes glxXlibSurface.h which drags in Xrender.h - 'gfxASurface.cpp', - # on X11, gfxDrawable.cpp includes X headers for an old workaround which - # we could consider removing soon (affects Ubuntus older than 10.04 LTS) - # which currently prevent it from joining UNIFIED_SOURCES. - 'gfxDrawable.cpp', - # gfxPlatform.cpp includes mac system header conflicting with point/size - 'gfxPlatform.cpp', - 'gfxPrefs.cpp', - 'PrintTarget.cpp', - 'PrintTargetThebes.cpp', -] - -UNIFIED_SOURCES += [ 'CJKCompatSVS.cpp', + 'ContextStateTracker.cpp', 'gfxAlphaRecovery.cpp', + 'gfxASurface.cpp', 'gfxBaseSharedMemorySurface.cpp', 'gfxBlur.cpp', 'gfxContext.cpp', + 'gfxDrawable.cpp', 'gfxFont.cpp', 'gfxFontEntry.cpp', 'gfxFontFeatures.cpp', @@ -200,7 +186,9 @@ UNIFIED_SOURCES += [ 'gfxMathTable.cpp', 'gfxMatrix.cpp', 'gfxPattern.cpp', + 'gfxPlatform.cpp', 'gfxPlatformFontList.cpp', + 'gfxPrefs.cpp', 'gfxRect.cpp', 'gfxScriptItemizer.cpp', 'gfxSkipChars.cpp', @@ -209,16 +197,18 @@ UNIFIED_SOURCES += [ 'gfxUserFontSet.cpp', 'gfxUtils.cpp', 'nsUnicodeRange.cpp', + 'PrintTarget.cpp', + 'PrintTargetThebes.cpp', 'SoftwareVsyncSource.cpp', 'VsyncSource.cpp', ] if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': - UNIFIED_SOURCES += [ + SOURCES += [ 'gfxMacPlatformFontList.mm', ] elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': - UNIFIED_SOURCES += [ + SOURCES += [ 'D3D11Checks.cpp', 'DeviceManagerDx.cpp', ] diff --git a/gfx/ycbcr/moz.build b/gfx/ycbcr/moz.build index 04855e2e9..092079899 100644 --- a/gfx/ycbcr/moz.build +++ b/gfx/ycbcr/moz.build @@ -8,7 +8,7 @@ EXPORTS += [ 'YCbCrUtils.h', ] -UNIFIED_SOURCES += [ +SOURCES += [ 'scale_yuv_argb.cpp', 'ycbcr_to_rgb565.cpp', 'YCbCrUtils.cpp', diff --git a/gfx/ycbcr/scale_yuv_argb.cpp b/gfx/ycbcr/scale_yuv_argb.cpp index 91a96cb9f..13b16c802 100644 --- a/gfx/ycbcr/scale_yuv_argb.cpp +++ b/gfx/ycbcr/scale_yuv_argb.cpp @@ -9,6 +9,8 @@ * be found in the AUTHORS file in the root of the source tree. */ +#include "scale_yuv_argb.h" + #include "libyuv/scale.h" #include <assert.h> |