mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 1364560 Add support for disabling Skia Jumper assembly code r=lsalzman
The assembly code is not working in the MinGW build, so we rebase and pull in the upstream commit that adds support for not using the optimized jumper assembly code. https://skia.googlesource.com/skia/+/6492afa7971cf295a3c3cb92a85218917c02bb4a MozReview-Commit-ID: CARHRTHmQ0i --HG-- extra : rebase_source : c6d9f19f8742a337e6ab3342d34118f37da71ae7
This commit is contained in:
parent
6ee7658d7e
commit
6499172d8e
@ -65,6 +65,8 @@ LOCAL_INCLUDES += [
|
||||
]
|
||||
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
|
||||
if CONFIG['CC_TYPE'] == 'gcc':
|
||||
DEFINES['SK_JUMPER_USE_ASSEMBLY'] = False
|
||||
DEFINES['UNICODE'] = True
|
||||
DEFINES['_UNICODE'] = True
|
||||
UNIFIED_SOURCES += [
|
||||
@ -197,6 +199,7 @@ def generate_separated_sources(platform_sources):
|
||||
'skia/src/effects/Sk',
|
||||
'skia/src/fonts/',
|
||||
'skia/src/images/',
|
||||
'skia/src/jumper/SkJumper_generated_win.S',
|
||||
'skia/src/ports/SkImageGenerator',
|
||||
'skia/src/gpu/vk/',
|
||||
'SkBitmapRegion',
|
||||
@ -262,6 +265,9 @@ def generate_separated_sources(platform_sources):
|
||||
'skia/src/ports/SkFontHost_cairo.cpp',
|
||||
'skia/src/ports/SkFontHost_FreeType_common.cpp',
|
||||
},
|
||||
'no-mingw': {
|
||||
'skia/src/jumper/SkJumper_generated_win.S',
|
||||
},
|
||||
'intel': set(),
|
||||
'arm': set(),
|
||||
'arm64': set(),
|
||||
@ -433,6 +439,8 @@ def write_mozbuild(sources):
|
||||
write_sources(f, sources['linux'], 4)
|
||||
|
||||
f.write("if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':\n")
|
||||
f.write(" if CONFIG['CC_TYPE'] != 'gcc':\n")
|
||||
write_list(f, "SOURCES", sources['no-mingw'], 8)
|
||||
# Windows-specific files don't get unification because of nasty headers.
|
||||
# Luckily there are not many files in this.
|
||||
write_list(f, "SOURCES", sources['win'], 4)
|
||||
|
7
gfx/skia/moz.build
Normal file → Executable file
7
gfx/skia/moz.build
Normal file → Executable file
@ -597,8 +597,11 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3'):
|
||||
'skia/src/ports/SkFontHost_FreeType_common.cpp',
|
||||
]
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
|
||||
if CONFIG['CC_TYPE'] != 'gcc':
|
||||
SOURCES += [
|
||||
'skia/src/jumper/SkJumper_generated_win.S',
|
||||
]
|
||||
SOURCES += [
|
||||
'skia/src/jumper/SkJumper_generated_win.S',
|
||||
'skia/src/ports/SkDebug_win.cpp',
|
||||
'skia/src/ports/SkFontHost_win.cpp',
|
||||
'skia/src/ports/SkFontMgr_win_dw.cpp',
|
||||
@ -707,6 +710,8 @@ LOCAL_INCLUDES += [
|
||||
]
|
||||
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
|
||||
if CONFIG['CC_TYPE'] == 'gcc':
|
||||
DEFINES['SK_JUMPER_USE_ASSEMBLY'] = False
|
||||
DEFINES['UNICODE'] = True
|
||||
DEFINES['_UNICODE'] = True
|
||||
UNIFIED_SOURCES += [
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include "SkTemplates.h"
|
||||
|
||||
// A debugging mode that helps prioritize porting stages to SkJumper.
|
||||
#if 0
|
||||
#if 0 && SK_JUMPER_USE_ASSEMBLY
|
||||
#include "SkOnce.h"
|
||||
#include <atomic>
|
||||
|
||||
@ -32,6 +32,13 @@
|
||||
#if !defined(__has_feature)
|
||||
#define __has_feature(x) 0
|
||||
#endif
|
||||
#if !defined(SK_JUMPER_USE_ASSEMBLY)
|
||||
#if __has_feature(memory_sanitizer)
|
||||
#define SK_JUMPER_USE_ASSEMBLY 0
|
||||
#else
|
||||
#define SK_JUMPER_USE_ASSEMBLY 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Stages expect these constants to be set to these values.
|
||||
// It's fine to rearrange and add new ones if you update SkJumper_constants.
|
||||
@ -144,7 +151,7 @@ using StageFn = void(void);
|
||||
|
||||
extern "C" {
|
||||
|
||||
#if __has_feature(memory_sanitizer)
|
||||
#if !SK_JUMPER_USE_ASSEMBLY
|
||||
// We'll just run portable code.
|
||||
|
||||
#elif defined(__aarch64__)
|
||||
@ -196,7 +203,7 @@ extern "C" {
|
||||
|
||||
// Translate SkRasterPipeline's StockStage enum to StageFn function pointers.
|
||||
|
||||
#if __has_feature(memory_sanitizer)
|
||||
#if !SK_JUMPER_USE_ASSEMBLY
|
||||
// We'll just run portable code.
|
||||
|
||||
#elif defined(__aarch64__)
|
||||
@ -316,7 +323,7 @@ bool SkRasterPipeline::run_with_jumper(size_t x, size_t n) const {
|
||||
};
|
||||
|
||||
// While possible, build and run at full vector stride.
|
||||
#if __has_feature(memory_sanitizer)
|
||||
#if !SK_JUMPER_USE_ASSEMBLY
|
||||
// We'll just run portable code.
|
||||
|
||||
#elif defined(__aarch64__)
|
||||
|
Loading…
Reference in New Issue
Block a user