Merge branch 'chrome/m59' into update-m59
authorMatthew Leibowitz <mattleibow@live.com>
Mon, 8 May 2017 23:51:37 +0000 (19:51 -0400)
committerMatthew Leibowitz <mattleibow@live.com>
Mon, 8 May 2017 23:51:37 +0000 (19:51 -0400)
# Conflicts:
# BUILD.gn
# gn/BUILD.gn
# gn/find_ios_sysroot.py
# src/core/SkSpecialImage.cpp
# third_party/libjpeg-turbo/BUILD.gn

16 files changed:
1  2 
BUILD.gn
gn/BUILD.gn
gn/BUILDCONFIG.gn
gn/core.gni
gn/effects.gni
include/c/sk_types.h
include/private/GrSwizzle.h
src/image/SkSurface.cpp
src/opts/SkRasterPipeline_opts.h
src/ports/SkFontMgr_win_dw.cpp
src/ports/SkOSFile_win.cpp
src/ports/SkScalerContext_win_dw.cpp
src/ports/SkScalerContext_win_dw.h
src/xps/SkXPSDevice.cpp
src/xps/SkXPSDocument.cpp
third_party/libjpeg-turbo/BUILD.gn

diff --cc BUILD.gn
+++ b/BUILD.gn
@@@ -670,16 -672,9 +677,16 @@@ component("skia") 
      ]
    }
  
 +  if (is_winrt) {
 +    sources -= [
 +      get_path_info("src/utils/win/SkWGL.h", "abspath"),
 +      get_path_info("src/utils/win/SkWGL_win.cpp", "abspath"),
 +    ]
 +  }
 +
    if (is_android) {
      deps += [ "//third_party/expat" ]
-     if (is_skia_standalone && ndk != "") {
+     if (defined(ndk) && ndk != "") {
        deps += [ "//third_party/cpu-features" ]
      }
      sources += [ "src/ports/SkDebug_android.cpp" ]
diff --cc gn/BUILD.gn
@@@ -29,12 -30,14 +30,19 @@@ declare_args() 
  
    cc_wrapper = ""
    malloc = ""
 +
 +  enable_bitcode = false
 +  if (is_tvos) {
 +    enable_bitcode = true
 +  }
  }
+ declare_args() {
+   if (msvc == 2015) {
+     windk = "C:/Program Files (x86)/Microsoft Visual Studio 14.0"
+   } else {
+     windk = "C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional"
+   }
+ }
  
  if (host_os == "win") {
    python = "python.bat"
@@@ -158,10 -166,10 +165,10 @@@ config("default") 
        "-mfpu=neon",
        "-mthumb",
      ]
 -  } else if (current_cpu == "mipsel") {
 +  } else if (current_cpu == "mipsel" && !is_win) {
      cflags += [
+       "-no-integrated-as",  # Clang <4.0 doesn't understand 'usw' mnemonic.
        "-march=mips32r2",
-       "-mdspr2",
      ]
    } else if (current_cpu == "x86" && !is_win) {
      asmflags += [ "-m32" ]
@@@ -443,15 -446,10 +451,14 @@@ config("release") 
      ]
    } else {
      cflags = [
 -      "-O3",
 -      "-fdata-sections",
 -      "-ffunction-sections",
 +      "-Os",
-       "-momit-leaf-frame-pointer",
      ]
 +    if (!enable_bitcode) {
 +      cflags += [
 +        "-fdata-sections",
 +        "-ffunction-sections",
 +      ]
 +    }
      if (is_mac || is_ios) {
        ldflags = [ "-dead_strip" ]
      } else {
@@@ -482,22 -480,29 +489,26 @@@ config("executable") 
  toolchain("msvc") {
    lib_dir_switch = "/LIBPATH:"
  
 -  if (msvc == 2015) {
 -    bin = "$windk/VC/bin/amd64"
 -    env_setup = ""
 -    if (target_cpu == "x86") {
 -      bin += "_x86"
 -      env_setup = "cmd /c $windk/win_sdk/bin/SetEnv.cmd /x86 && "
 -    }
 -  } else {
 -    bin = "$windk/VC/Tools/MSVC/14.10.25017/bin/HostX64/$target_cpu"
 -    env_setup = ""
 +  _target = "amd64"
 +  env_setup = ""
 +  env_setup_end = ""
 +  if (target_cpu != "x64") {
      if (target_cpu == "x86") {
 -      print("Be sure to run")
 -      print("$windk/VC/Auxiliary/Build/vcvarsall.bat amd64_x86")
 -      print("to set up your environment before running ninja.")
 +      _target += "_x86"
 +    } else if (target_cpu == "arm") {
 +      _target += "_arm"
      }
 +    env_setup = "cmd /c \"\"$windk/VC/vcvarsall.bat\" $_target && "
 +    env_setup_end = "\""
    }
 +  bin = "$windk/VC/bin/$_target"
  
    tool("asm") {
-     command = "$env_setup$bin/ml64.exe /nologo /c /Fo {{output}} {{source}}"
+     _ml = "ml"
+     if (target_cpu == "x64") {
+       _ml += "64"
+     }
+     command = "$env_setup$bin/$_ml.exe /nologo /c /Fo {{output}} {{source}}"
      outputs = [
        "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.obj",
      ]
Simple merge
diff --cc gn/core.gni
Simple merge
diff --cc gn/effects.gni
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -936,20 -936,12 +936,17 @@@ HRESULT SkFontMgr_DirectWrite::getByFam
  }
  
  HRESULT SkFontMgr_DirectWrite::getDefaultFontFamily(IDWriteFontFamily** fontFamily) const {
 +#ifdef SK_BUILD_FOR_WINRT
 +    const wchar_t* default_font_family_name = L"Segoe UI";
 +#else // SK_BUILD_FOR_WINRT
      NONCLIENTMETRICSW metrics;
      metrics.cbSize = sizeof(metrics);
-     if (0 == SystemParametersInfoW(SPI_GETNONCLIENTMETRICS,
-                                    sizeof(metrics),
-                                    &metrics,
-                                    0)) {
+     if (0 == SystemParametersInfoW(SPI_GETNONCLIENTMETRICS, sizeof(metrics), &metrics, 0)) {
          return E_UNEXPECTED;
      }
 -    HRM(this->getByFamilyName(metrics.lfMessageFont.lfFaceName, fontFamily),
 +    wchar_t* default_font_family_name = metrics.lfMessageFont.lfFaceName;
 +#endif // SK_BUILD_FOR_WINRT
 +    HRM(this->getByFamilyName(default_font_family_name, fontFamily),
          "Could not create DWrite font family from LOGFONT.");
      return S_OK;
  }
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge