De-unify all gfx but angle.
parent
45a37d248e
commit
57f6b7c5b5
|
@ -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"
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include "Types.h"
|
||||
|
||||
#include "mozilla/RefPtr.h"
|
||||
#include "mozilla/gfx/Logging.h"
|
||||
|
||||
#ifdef MOZ_WIDGET_UIKIT
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
#include "PathRecording.h"
|
||||
#include "RecordingTypes.h"
|
||||
#include "DrawEventRecorder.h"
|
||||
#include "Tools.h"
|
||||
#include "Filters.h"
|
||||
#include "Logging.h"
|
||||
|
|
|
@ -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']
|
||||
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -15,7 +15,7 @@ EXPORTS.mozilla.gfx += [
|
|||
'gfxVars.h',
|
||||
]
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
SOURCES += [
|
||||
'gfxConfig.cpp',
|
||||
'gfxFeature.cpp',
|
||||
'gfxVars.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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#define SHARED_SURFACE_D3D11_INTEROP_H_
|
||||
|
||||
#include <windows.h>
|
||||
#include <d3d11.h>
|
||||
#include "SharedSurface.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
|
||||
#include "GLTextureImage.h"
|
||||
|
||||
using namespace mozilla::gfx;
|
||||
|
||||
namespace mozilla {
|
||||
namespace gl {
|
||||
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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__
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -43,7 +43,7 @@ Description
|
|||
//#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <cstddef>
|
||||
#include <cstring>
|
||||
#include <string.h>
|
||||
#include <climits>
|
||||
#include <cwchar>
|
||||
//#include <stdexcept>
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -29,7 +29,7 @@ of the License or (at your option) any later version.
|
|||
|
||||
#include <cassert>
|
||||
#include <cstddef>
|
||||
#include <cstring>
|
||||
#include <string.h>
|
||||
|
||||
namespace
|
||||
{
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include "CompositorSession.h"
|
||||
#include "mozilla/gfx/Point.h"
|
||||
#include "Units.h"
|
||||
#include "nsBaseWidget.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace layers {
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include "VsyncBridgeChild.h"
|
||||
#include "VsyncIOThreadHolder.h"
|
||||
#include "mozilla/dom/ContentChild.h"
|
||||
#include "GPUProcessManager.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace gfx {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
#include "mozilla/layers/TextureClient.h"
|
||||
#include "d3d9.h"
|
||||
|
||||
using namespace mozilla::gfx;
|
||||
|
||||
namespace mozilla {
|
||||
namespace layers {
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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__)
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#define mozilla_layers_ContentProcessController_h
|
||||
|
||||
#include "mozilla/layers/GeckoContentController.h"
|
||||
#include "mozilla/dom/ipc/IdType.h"
|
||||
|
||||
class nsIObserver;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#define mozilla_layers_CrossProcessCompositorBridgeParent_h
|
||||
|
||||
#include "mozilla/layers/CompositorBridgeParent.h"
|
||||
#include "mozilla/layers/CompositorThread.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace layers {
|
||||
|
|
|
@ -12,7 +12,6 @@ namespace layers {
|
|||
|
||||
using namespace mozilla::ipc;
|
||||
using namespace mozilla::gfx;
|
||||
using namespace mozilla::media;
|
||||
|
||||
|
||||
static VideoBridgeParent* sVideoBridgeSingleton;
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#define gfx_layers_ipc_VideoBridgeParent_h_
|
||||
|
||||
#include "mozilla/layers/PVideoBridgeParent.h"
|
||||
#include "mozilla/layers/ISurfaceAllocator.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace layers {
|
||||
|
|
|
@ -49,8 +49,6 @@ EXPORTS += [
|
|||
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
|
||||
SOURCES += [
|
||||
'D3D11ShareHandleImage.cpp',
|
||||
]
|
||||
UNIFIED_SOURCES += [
|
||||
'D3D9SurfaceImage.cpp',
|
||||
'IMFYCbCrImage.cpp',
|
||||
'TextureDIB.cpp',
|
||||
|
@ -66,12 +64,10 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
|
|||
'd3d9/CompositorD3D9.h',
|
||||
'd3d9/TextureD3D9.h',
|
||||
]
|
||||
UNIFIED_SOURCES += [
|
||||
'd3d9/TextureD3D9.cpp',
|
||||
]
|
||||
SOURCES += [
|
||||
'd3d9/CompositorD3D9.cpp',
|
||||
'd3d9/DeviceManagerD3D9.cpp',
|
||||
'd3d9/TextureD3D9.cpp',
|
||||
]
|
||||
if CONFIG['MOZ_ENABLE_D3D10_LAYER']:
|
||||
EXPORTS.mozilla.layers += [
|
||||
|
@ -79,12 +75,10 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
|
|||
'd3d11/ReadbackManagerD3D11.h',
|
||||
'd3d11/TextureD3D11.h',
|
||||
]
|
||||
UNIFIED_SOURCES += [
|
||||
'd3d11/TextureD3D11.cpp',
|
||||
]
|
||||
SOURCES += [
|
||||
'd3d11/CompositorD3D11.cpp',
|
||||
'd3d11/ReadbackManagerD3D11.cpp',
|
||||
'd3d11/TextureD3D11.cpp',
|
||||
]
|
||||
|
||||
EXPORTS.gfxipc += [
|
||||
|
@ -228,21 +222,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',
|
||||
|
@ -277,6 +269,7 @@ UNIFIED_SOURCES += [
|
|||
'basic/BasicColorLayer.cpp',
|
||||
'basic/BasicCompositor.cpp',
|
||||
'basic/BasicContainerLayer.cpp',
|
||||
'basic/BasicImageLayer.cpp',
|
||||
'basic/BasicImages.cpp',
|
||||
'basic/BasicLayerManager.cpp',
|
||||
'basic/BasicLayersImpl.cpp',
|
||||
|
@ -325,6 +318,7 @@ UNIFIED_SOURCES += [
|
|||
'Effects.cpp',
|
||||
'FrameMetrics.cpp',
|
||||
'GLImages.cpp',
|
||||
'ImageContainer.cpp',
|
||||
'ImageDataSerializer.cpp',
|
||||
'ImageLayers.cpp',
|
||||
'ipc/APZChild.cpp',
|
||||
|
@ -334,9 +328,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',
|
||||
|
@ -354,10 +346,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',
|
||||
|
@ -365,6 +359,7 @@ UNIFIED_SOURCES += [
|
|||
'opengl/TextureClientOGL.cpp',
|
||||
'opengl/TextureHostOGL.cpp',
|
||||
'opengl/TexturePoolOGL.cpp',
|
||||
'PersistentBufferProvider.cpp',
|
||||
'protobuf/LayerScopePacket.pb.cc',
|
||||
'ReadbackProcessor.cpp',
|
||||
'RenderTrace.cpp',
|
||||
|
@ -372,12 +367,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
|
||||
|
@ -445,6 +439,6 @@ if CONFIG['GNU_CXX']:
|
|||
CXXFLAGS += ['-Wno-error=shadow']
|
||||
|
||||
if CONFIG['MOZ_ENABLE_SKIA']:
|
||||
UNIFIED_SOURCES += [
|
||||
SOURCES += [
|
||||
'composite/PaintCounter.cpp',
|
||||
]
|
||||
|
|
|
@ -9,7 +9,7 @@ EXPORTS += [
|
|||
'../include/ots-memory-stream.h',
|
||||
]
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
SOURCES += [
|
||||
'avar.cc',
|
||||
'cff.cc',
|
||||
'cff_charstring.cc',
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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 += [
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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 += [
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
#include "nsRegion.h"
|
||||
#include "nsTArray.h"
|
||||
#include "gfx2DGlue.h"
|
||||
#include "gfxUtils.h"
|
||||
#include "mozilla/ToString.h"
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include "nsDirectoryServiceDefs.h"
|
||||
#include "nsAppDirectoryServiceDefs.h"
|
||||
#include "nsISimpleEnumerator.h"
|
||||
#include "GeckoProfiler.h"
|
||||
|
||||
#include "gfxGDIFontList.h"
|
||||
|
||||
|
|
|
@ -0,0 +1,83 @@
|
|||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
* 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/. */
|
||||
|
||||
#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
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
#include "nsUnicodeProperties.h"
|
||||
#include "mozilla/gfx/2D.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
class gfxHarfBuzzShaper : public gfxFontShaper {
|
||||
public:
|
||||
explicit gfxHarfBuzzShaper(gfxFont *aFont);
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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))
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
#include <vector>
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::gfx;
|
||||
|
||||
gfxPattern::gfxPattern(const Color& aColor)
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
#define UTF8_CHARSET NS_LITERAL_CSTRING("utf-8")
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::gfx;
|
||||
|
||||
typedef mozilla::dom::Element Element;
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
#include "gfxSkipChars.h"
|
||||
#include "mozilla/BinarySearch.h"
|
||||
#include "mozilla/gfx/Logging.h"
|
||||
|
||||
struct SkippedRangeStartComparator
|
||||
{
|
||||
|
|
|
@ -37,6 +37,8 @@
|
|||
|
||||
#include "cairo.h"
|
||||
|
||||
#include <unicode/unorm2.h>
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::gfx;
|
||||
using namespace mozilla::unicode;
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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',
|
||||
]
|
||||
|
|
|
@ -8,7 +8,7 @@ EXPORTS += [
|
|||
'YCbCrUtils.h',
|
||||
]
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
SOURCES += [
|
||||
'scale_yuv_argb.cpp',
|
||||
'ycbcr_to_rgb565.cpp',
|
||||
'YCbCrUtils.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>
|
||||
|
|
Loading…
Reference in New Issue