| Index: skia/BUILD.gn
|
| diff --git a/skia/BUILD.gn b/skia/BUILD.gn
|
| index 3fc4a96bc1314b2791b82dc7598b06dc51431ed4..f53d9be0887426622665dd06a14457178d1c2256 100644
|
| --- a/skia/BUILD.gn
|
| +++ b/skia/BUILD.gn
|
| @@ -78,6 +78,17 @@ gypi_skia_opts =
|
| "scope",
|
| [ "//third_party/skia/gyp/opts.gypi" ])
|
|
|
| +# The list of Skia files is kept in skia_gn_files.gypi. Read it.
|
| +gypi_values =
|
| + exec_script("//build/gypi_to_gn.py",
|
| + [
|
| + rebase_path("skia_gn_files.gypi"),
|
| + "--replace=<(skia_include_path)=//third_party/skia/include",
|
| + "--replace=<(skia_src_path)=//third_party/skia/src",
|
| + ],
|
| + "scope",
|
| + [ "skia_gn_files.gypi" ])
|
| +
|
| # External-facing config for dependent code.
|
| config("skia_config") {
|
| include_dirs = [
|
| @@ -216,69 +227,18 @@ component("skia") {
|
| "ext/SkDiscardableMemory_chrome.cc",
|
| "ext/SkDiscardableMemory_chrome.h",
|
| "ext/SkMemory_new_handler.cpp",
|
| - "ext/bitmap_platform_device.h",
|
| + "ext/convolver.cc",
|
| + "ext/convolver.h",
|
| "ext/event_tracer_impl.cc",
|
| "ext/event_tracer_impl.h",
|
| "ext/google_logging.cc",
|
| - "ext/opacity_draw_filter.cc",
|
| - "ext/opacity_draw_filter.h",
|
| - "ext/platform_canvas.cc",
|
| - "ext/platform_canvas.h",
|
| - "ext/platform_device.cc",
|
| - "ext/platform_device.h",
|
| - "ext/platform_device_linux.cc",
|
| - "ext/platform_device_mac.cc",
|
| - "ext/refptr.h",
|
| - "ext/skia_utils_base.cc",
|
| - "ext/skia_utils_base.h",
|
| - "ext/skia_utils_ios.h",
|
| - "ext/skia_utils_ios.mm",
|
| - "ext/skia_utils_mac.h",
|
| - "ext/skia_utils_mac.mm",
|
| ]
|
|
|
| # The skia gypi values are relative to the skia_dir, so we need to rebase.
|
| sources += gypi_skia_core.sources
|
| sources += gypi_skia_effects.sources
|
| sources += gypi_skia_utils.sources
|
| -
|
| - sources += [
|
| - "//third_party/skia/include/images/SkMovie.h",
|
| - "//third_party/skia/include/images/SkPageFlipper.h",
|
| - "//third_party/skia/include/ports/SkTypeface_win.h",
|
| - "//third_party/skia/src/fonts/SkFontMgr_indirect.cpp",
|
| - "//third_party/skia/src/fonts/SkRemotableFontMgr.cpp",
|
| - "//third_party/skia/src/images/SkScaledBitmapSampler.cpp",
|
| - "//third_party/skia/src/images/SkScaledBitmapSampler.h",
|
| - "//third_party/skia/src/ports/SkFontHost_FreeType.cpp",
|
| - "//third_party/skia/src/ports/SkFontHost_FreeType_common.cpp",
|
| - "//third_party/skia/src/ports/SkFontHost_FreeType_common.h",
|
| - "//third_party/skia/src/ports/SkFontHost_mac.cpp",
|
| - "//third_party/skia/src/ports/SkFontHost_win.cpp",
|
| - "//third_party/skia/src/ports/SkFontMgr_android.cpp",
|
| - "//third_party/skia/src/ports/SkFontMgr_android_factory.cpp",
|
| - "//third_party/skia/src/ports/SkFontMgr_android_parser.cpp",
|
| - "//third_party/skia/src/ports/SkFontMgr_win_dw.cpp",
|
| - "//third_party/skia/src/ports/SkGlobalInitialization_chromium.cpp",
|
| - "//third_party/skia/src/ports/SkImageDecoder_empty.cpp",
|
| - "//third_party/skia/src/ports/SkImageGenerator_none.cpp",
|
| - "//third_party/skia/src/ports/SkOSFile_posix.cpp",
|
| - "//third_party/skia/src/ports/SkOSFile_stdio.cpp",
|
| - "//third_party/skia/src/ports/SkOSFile_win.cpp",
|
| - "//third_party/skia/src/ports/SkRemotableFontMgr_win_dw.cpp",
|
| - "//third_party/skia/src/ports/SkScalerContext_win_dw.cpp",
|
| - "//third_party/skia/src/ports/SkScalerContext_win_dw.h",
|
| - "//third_party/skia/src/ports/SkTLS_pthread.cpp",
|
| - "//third_party/skia/src/ports/SkTLS_win.cpp",
|
| - "//third_party/skia/src/ports/SkTime_Unix.cpp",
|
| - "//third_party/skia/src/ports/SkTypeface_win_dw.cpp",
|
| - "//third_party/skia/src/ports/SkTypeface_win_dw.h",
|
| - "//third_party/skia/src/sfnt/SkOTTable_name.cpp",
|
| - "//third_party/skia/src/sfnt/SkOTTable_name.h",
|
| - "//third_party/skia/src/sfnt/SkOTUtils.cpp",
|
| - "//third_party/skia/src/sfnt/SkOTUtils.h",
|
| - "//third_party/skia/src/utils/mac/SkStream_mac.cpp",
|
| - ]
|
| + sources += gypi_values.skia_library_sources
|
|
|
| # This and skia_opts are really the same conceptual target so share headers.
|
| allow_circular_includes_from = [ ":skia_opts" ]
|
| @@ -295,44 +255,23 @@ component("skia") {
|
| sources += gypi_skia_gpu.skgpu_sources
|
| sources += gypi_skia_gpu.skgpu_null_gl_sources
|
|
|
| - # Remove unused files from utils.
|
| + # Remove unused util files include in utils.gypi
|
| sources -= [
|
| - "//third_party/skia/include/utils/SkBoundaryPatch.h",
|
| - "//third_party/skia/include/utils/SkCamera.h",
|
| - "//third_party/skia/include/utils/SkCanvasStateUtils.h",
|
| - "//third_party/skia/include/utils/SkCubicInterval.h",
|
| - "//third_party/skia/include/utils/SkCullPoints.h",
|
| - "//third_party/skia/include/utils/SkDebugUtils.h",
|
| - "//third_party/skia/include/utils/SkDumpCanvas.h",
|
| - "//third_party/skia/include/utils/SkEventTracer.h",
|
| - "//third_party/skia/include/utils/SkFrontBufferedStream.h",
|
| - "//third_party/skia/include/utils/SkInterpolator.h",
|
| - "//third_party/skia/include/utils/SkLayer.h",
|
| - "//third_party/skia/include/utils/SkMeshUtils.h",
|
| - "//third_party/skia/include/utils/SkNinePatch.h",
|
| - "//third_party/skia/include/utils/SkParsePaint.h",
|
| - "//third_party/skia/include/utils/SkParsePath.h",
|
| - "//third_party/skia/include/utils/SkRandom.h",
|
| - "//third_party/skia/src/utils/SkBitmapHasher.cpp",
|
| - "//third_party/skia/src/utils/SkBitmapHasher.h",
|
| "//third_party/skia/src/utils/SkBoundaryPatch.cpp",
|
| "//third_party/skia/src/utils/SkCamera.cpp",
|
| "//third_party/skia/src/utils/SkCanvasStack.h",
|
| - "//third_party/skia/src/utils/SkCubicInterval.cpp",
|
| - "//third_party/skia/src/utils/SkCullPoints.cpp",
|
| "//third_party/skia/src/utils/SkDumpCanvas.cpp",
|
| "//third_party/skia/src/utils/SkFloatUtils.h",
|
| "//third_party/skia/src/utils/SkFrontBufferedStream.cpp",
|
| "//third_party/skia/src/utils/SkInterpolator.cpp",
|
| "//third_party/skia/src/utils/SkLayer.cpp",
|
| - "//third_party/skia/src/utils/SkMD5.cpp",
|
| - "//third_party/skia/src/utils/SkMD5.h",
|
| "//third_party/skia/src/utils/SkMeshUtils.cpp",
|
| "//third_party/skia/src/utils/SkNinePatch.cpp",
|
| "//third_party/skia/src/utils/SkParsePath.cpp",
|
| - "//third_party/skia/src/utils/SkSHA1.cpp",
|
| - "//third_party/skia/src/utils/SkSHA1.h",
|
| - "//third_party/skia/src/utils/SkTFitsIn.h",
|
| +
|
| + #testing
|
| + "//third_party/skia/src/fonts/SkGScalerContext.cpp",
|
| + "//third_party/skia/src/fonts/SkGScalerContext.h",
|
| ]
|
|
|
| if (is_ios || is_mac || is_android) {
|
| @@ -363,23 +302,7 @@ component("skia") {
|
| set_sources_assignment_filter(sources_assignment_filter)
|
| }
|
|
|
| - if (is_android) {
|
| - sources -= [ "ext/skia_utils_base.cc" ]
|
| - }
|
| -
|
| # Fixup skia library sources.
|
| - sources -= [
|
| - "//third_party/skia/src/ports/SkFontHost_win.cpp",
|
| - "//third_party/skia/src/ports/SkFontMgr_win_dw.cpp",
|
| - "//third_party/skia/src/ports/SkOSFile_win.cpp",
|
| - "//third_party/skia/src/ports/SkRemotableFontMgr_win_dw.cpp",
|
| - "//third_party/skia/src/ports/SkScalerContext_win_dw.cpp",
|
| - "//third_party/skia/src/ports/SkScalerContext_win_dw.h",
|
| - "//third_party/skia/src/ports/SkTLS_win.cpp",
|
| - "//third_party/skia/src/ports/SkTypeface_win_dw.cpp",
|
| - "//third_party/skia/src/ports/SkTypeface_win_dw.h",
|
| - "//third_party/skia/src/utils/SkThreadUtils_win.cpp",
|
| - ]
|
| if (!is_android) {
|
| sources -= [
|
| "//third_party/skia/src/ports/SkFontMgr_android.cpp",
|
| @@ -407,19 +330,6 @@ component("skia") {
|
| ]
|
| }
|
|
|
| - # Select the right BitmapPlatformDevice.
|
| - if (is_mac || is_ios) {
|
| - sources += [
|
| - "ext/bitmap_platform_device_mac.cc",
|
| - "ext/bitmap_platform_device_mac.h",
|
| - ]
|
| - } else {
|
| - sources += [
|
| - "ext/bitmap_platform_device_skia.cc",
|
| - "ext/bitmap_platform_device_skia.h",
|
| - ]
|
| - }
|
| -
|
| if (is_clang) {
|
| # Skia won't compile with some of the more strict clang warnings.
|
| # e.g. it does:
|
| @@ -450,7 +360,6 @@ component("skia") {
|
|
|
| if (is_android) {
|
| set_sources_assignment_filter([])
|
| - sources += [ "ext/platform_device_linux.cc" ]
|
| set_sources_assignment_filter(sources_assignment_filter)
|
| deps += [
|
| "//third_party/android_tools:cpu_features",
|
| @@ -471,12 +380,20 @@ source_set("skia_opts") {
|
| defines = []
|
|
|
| if (current_cpu == "x86" || current_cpu == "x64") {
|
| - sources = gypi_skia_opts.sse2_sources + gypi_skia_opts.ssse3_sources +
|
| - gypi_skia_opts.sse41_sources + gypi_skia_opts.avx_sources
|
| - if (is_linux || is_mac) {
|
| + if (!is_ios) {
|
| + sources = gypi_skia_opts.sse2_sources + gypi_skia_opts.ssse3_sources +
|
| + gypi_skia_opts.sse41_sources + gypi_skia_opts.avx_sources +
|
| + [
|
| + # Chrome-specific.
|
| + "ext/convolver_SSE2.cc",
|
| + "ext/convolver_SSE2.h",
|
| + ]
|
| +
|
| cflags += [ "-msse4.1" ]
|
| + } else {
|
| + sources = gypi_skia_opts.none_sources
|
| }
|
| - } else if (current_cpu == "arm" || current_cpu == "arm64") {
|
| + } else if (current_cpu == "arm") {
|
| # The assembly uses the frame pointer register (r7 in Thumb/r11 in
|
| # ARM), the compiler doesn't like that.
|
| cflags += [ "-fomit-frame-pointer" ]
|
| @@ -501,9 +418,18 @@ source_set("skia_opts") {
|
| } else if (current_cpu == "mipsel") {
|
| cflags += [ "-fomit-frame-pointer" ]
|
|
|
| - sources = gypi_skia_opts.none_sources
|
| - } else if (current_cpu == "pnacl") {
|
| - sources = gypi_skia_opts.none_sources
|
| + if (mips_dsp_rev >= 1) {
|
| + sources = gypi_skia_opts.mips_dsp_sources
|
| + if (mips_dsp_rev >= 2) {
|
| + sources += [
|
| + # Chrome-specific.
|
| + "ext/convolver_mips_dspr2.cc",
|
| + "ext/convolver_mips_dspr2.h",
|
| + ]
|
| + }
|
| + } else {
|
| + sources = gypi_skia_opts.none_sources
|
| + }
|
| } else {
|
| assert(false, "Need to port cpu specific stuff from skia_library_opts.gyp")
|
| }
|
| @@ -526,26 +452,3 @@ source_set("skia_opts") {
|
|
|
| visibility = [ ":skia" ]
|
| }
|
| -
|
| -test("skia_unittests") {
|
| - sources = [
|
| - "ext/bitmap_platform_device_mac_unittest.cc",
|
| - "ext/platform_canvas_unittest.cc",
|
| - "ext/refptr_unittest.cc",
|
| - "ext/skia_utils_ios_unittest.mm",
|
| - "ext/skia_utils_mac_unittest.mm",
|
| - ]
|
| -
|
| - if (!is_mac) {
|
| - sources -= [ "ext/platform_canvas_unittest.cc" ]
|
| - }
|
| -
|
| - deps = [
|
| - ":skia",
|
| - "//base",
|
| - "//base/test:run_all_unittests",
|
| - "//testing/gtest",
|
| - "//ui/gfx",
|
| - "//ui/gfx/geometry",
|
| - ]
|
| -}
|
|
|