Roll external/skia 74f623d16..82a62d2d4 (7 commits)

https://skia.googlesource.com/skia.git/+log/74f623d16..82a62d2d4

2017-11-07 ethannicholas@google.com Revert "refactored SkSLVarDeclaration out of existence"
2017-11-07 brianosman@google.com Test SkColorSpaceXformCanvas on GTX1070 bots
2017-11-07 ethannicholas@google.com refactored SkSLVarDeclaration out of existence
2017-11-07 liyuqian@google.com Update chromium codebase during add_legacy_flag.py
2017-11-07 kjlubick@google.com Restore Pixelbook jobs
2017-11-07 angle-deps-roller@chromium.org Roll skia/third_party/externals/angle2/ 5b09d90d9..bd3cd506f (1 commit)
2017-11-07 mtklein@chromium.org add DM::FontMgr to ok

The AutoRoll server is located here: https://android-roll.skia.org

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.

Test: Presubmit checks will test this change.
Change-Id: I32d33474803b4d95fc47ef1581bae98502510829
Exempt-From-Owner-Approval: The autoroll bot does not require owner approval.
diff --git a/BUILD.gn b/BUILD.gn
index e7744c9..e0c45fe 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -1363,6 +1363,7 @@
 
   test_app("ok") {
     sources = [
+      "dm/DMFontMgr.cpp",
       "tools/ok.cpp",
       "tools/ok_dsts.cpp",
       "tools/ok_engines.cpp",
diff --git a/DEPS b/DEPS
index c515fb4..46d0ecb 100644
--- a/DEPS
+++ b/DEPS
@@ -3,7 +3,7 @@
 deps = {
   "buildtools"                          : "https://chromium.googlesource.com/chromium/buildtools.git@e6b510a9daf822bbe9f922c200c58150803d2fd8",
   "common"                              : "https://skia.googlesource.com/common.git@9737551d7a52c3db3262db5856e6bcd62c462b92",
-  "third_party/externals/angle2"        : "https://chromium.googlesource.com/angle/angle.git@5b09d90d9cf70df2f357cc2df4bb8f61f243c131",
+  "third_party/externals/angle2"        : "https://chromium.googlesource.com/angle/angle.git@bd3cd506fed7e64ef2f7b46f2ceb2dd757c9b808",
   "third_party/externals/dng_sdk"       : "https://android.googlesource.com/platform/external/dng_sdk.git@96443b262250c390b0caefbf3eed8463ba35ecae",
   "third_party/externals/expat"         : "https://android.googlesource.com/platform/external/expat.git@android-6.0.1_r55",
   "third_party/externals/freetype"      : "https://skia.googlesource.com/third_party/freetype2.git@447a0b62634802d8acdb56008cff5ff4e50be244",
diff --git a/infra/bots/jobs.json b/infra/bots/jobs.json
index 4aa3dd6..3570fed 100644
--- a/infra/bots/jobs.json
+++ b/infra/bots/jobs.json
@@ -158,6 +158,8 @@
   "Perf-ChromeOS-Clang-SamsungChromebook2012-GPU-MaliT604-arm-Release-All",
   "Perf-ChromeOS-Clang-SamsungChromebookPlus-GPU-MaliT860-arm-Debug-All",
   "Perf-ChromeOS-Clang-SamsungChromebookPlus-GPU-MaliT860-arm-Release-All",
+  "Perf-ChromeOS-Clang-Pixelbook-GPU-IntelHDGraphics615-x86_64-Debug-All",
+  "Perf-ChromeOS-Clang-Pixelbook-GPU-IntelHDGraphics615-x86_64-Release-All",
   "Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Debug-All",
   "Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Release-All",
   "Perf-Chromecast-GCC-Chorizo-GPU-Cortex_A7-arm-Debug-All",
@@ -336,6 +338,8 @@
   "Test-ChromeOS-Clang-SamsungChromebook2012-GPU-MaliT604-arm-Release-All",
   "Test-ChromeOS-Clang-SamsungChromebookPlus-GPU-MaliT860-arm-Debug-All",
   "Test-ChromeOS-Clang-SamsungChromebookPlus-GPU-MaliT860-arm-Release-All",
+  "Test-ChromeOS-Clang-Pixelbook-GPU-IntelHDGraphics615-x86_64-Debug-All",
+  "Test-ChromeOS-Clang-Pixelbook-GPU-IntelHDGraphics615-x86_64-Release-All",
   "Test-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Debug-All",
   "Test-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Release-All",
   "Test-Chromecast-GCC-Chorizo-GPU-Cortex_A7-arm-Debug-All",
diff --git a/infra/bots/recipes/test.expected/Test-Win10-Clang-ZBOX-GPU-GTX1070-x86_64-Debug-All.json b/infra/bots/recipes/test.expected/Test-Win10-Clang-ZBOX-GPU-GTX1070-x86_64-Debug-All.json
index abdd86f..1b32b09 100644
--- a/infra/bots/recipes/test.expected/Test-Win10-Clang-ZBOX-GPU-GTX1070-x86_64-Debug-All.json
+++ b/infra/bots/recipes/test.expected/Test-Win10-Clang-ZBOX-GPU-GTX1070-x86_64-Debug-All.json
@@ -226,6 +226,7 @@
       "gldft",
       "glsrgb",
       "glmsaa8",
+      "gbr-gl",
       "--src",
       "tests",
       "gm",
diff --git a/infra/bots/recipes/test.py b/infra/bots/recipes/test.py
index a9505cc..2dd9aec 100644
--- a/infra/bots/recipes/test.py
+++ b/infra/bots/recipes/test.py
@@ -207,6 +207,10 @@
       # The TSAN bot disables GL buffer mapping which is required for inst.
       configs.extend([gl_prefix + 'inst'])
 
+    # Test SkColorSpaceXformCanvas on a few bots
+    if 'GTX1070' in bot:
+      configs.append('gbr-gl')
+
     # CommandBuffer bot *only* runs the command_buffer config.
     if 'CommandBuffer' in bot:
       configs = ['commandbuffer']
diff --git a/infra/bots/tasks.json b/infra/bots/tasks.json
index 6f6f4ea..1b2e67e 100644
--- a/infra/bots/tasks.json
+++ b/infra/bots/tasks.json
@@ -938,6 +938,18 @@
         "Upload-Perf-ChromeOS-Clang-AcerChromebookR13Convertible-GPU-PowerVRGX6250-arm-Release-All"
       ]
     },
+    "Perf-ChromeOS-Clang-Pixelbook-GPU-IntelHDGraphics615-x86_64-Debug-All": {
+      "priority": 0.8,
+      "tasks": [
+        "Perf-ChromeOS-Clang-Pixelbook-GPU-IntelHDGraphics615-x86_64-Debug-All"
+      ]
+    },
+    "Perf-ChromeOS-Clang-Pixelbook-GPU-IntelHDGraphics615-x86_64-Release-All": {
+      "priority": 0.8,
+      "tasks": [
+        "Upload-Perf-ChromeOS-Clang-Pixelbook-GPU-IntelHDGraphics615-x86_64-Release-All"
+      ]
+    },
     "Perf-ChromeOS-Clang-SamsungChromebook2012-GPU-MaliT604-arm-Debug-All": {
       "priority": 0.8,
       "tasks": [
@@ -2007,6 +2019,18 @@
         "Upload-Test-ChromeOS-Clang-AcerChromebookR13Convertible-GPU-PowerVRGX6250-arm-Release-All"
       ]
     },
+    "Test-ChromeOS-Clang-Pixelbook-GPU-IntelHDGraphics615-x86_64-Debug-All": {
+      "priority": 0.8,
+      "tasks": [
+        "Upload-Test-ChromeOS-Clang-Pixelbook-GPU-IntelHDGraphics615-x86_64-Debug-All"
+      ]
+    },
+    "Test-ChromeOS-Clang-Pixelbook-GPU-IntelHDGraphics615-x86_64-Release-All": {
+      "priority": 0.8,
+      "tasks": [
+        "Upload-Test-ChromeOS-Clang-Pixelbook-GPU-IntelHDGraphics615-x86_64-Release-All"
+      ]
+    },
     "Test-ChromeOS-Clang-SamsungChromebook2012-GPU-MaliT604-arm-Debug-All": {
       "priority": 0.8,
       "tasks": [
@@ -7744,6 +7768,72 @@
       "max_attempts": 1,
       "priority": 0.8
     },
+    "Perf-ChromeOS-Clang-Pixelbook-GPU-IntelHDGraphics615-x86_64-Debug-All": {
+      "dependencies": [
+        "Build-Debian9-Clang-x86_64-Debug-Chromebook_GLES",
+        "Housekeeper-PerCommit-BundleRecipes",
+        "Housekeeper-PerCommit-IsolateSKP",
+        "Housekeeper-PerCommit-IsolateSVG",
+        "Housekeeper-PerCommit-IsolateSkImage"
+      ],
+      "dimensions": [
+        "gpu:IntelHDGraphics615",
+        "os:ChromeOS",
+        "pool:Skia"
+      ],
+      "execution_timeout_ns": 14400000000000,
+      "expiration_ns": 72000000000000,
+      "extra_args": [
+        "--workdir",
+        "../../..",
+        "perf",
+        "repository=<(REPO)",
+        "buildername=Perf-ChromeOS-Clang-Pixelbook-GPU-IntelHDGraphics615-x86_64-Debug-All",
+        "swarm_out_dir=${ISOLATED_OUTDIR}",
+        "revision=<(REVISION)",
+        "patch_repo=<(PATCH_REPO)",
+        "patch_storage=<(PATCH_STORAGE)",
+        "patch_issue=<(ISSUE)",
+        "patch_set=<(PATCHSET)"
+      ],
+      "io_timeout_ns": 2400000000000,
+      "isolate": "perf_skia_bundled_unix.isolate",
+      "max_attempts": 1,
+      "priority": 0.8
+    },
+    "Perf-ChromeOS-Clang-Pixelbook-GPU-IntelHDGraphics615-x86_64-Release-All": {
+      "dependencies": [
+        "Build-Debian9-Clang-x86_64-Release-Chromebook_GLES",
+        "Housekeeper-PerCommit-BundleRecipes",
+        "Housekeeper-PerCommit-IsolateSKP",
+        "Housekeeper-PerCommit-IsolateSVG",
+        "Housekeeper-PerCommit-IsolateSkImage"
+      ],
+      "dimensions": [
+        "gpu:IntelHDGraphics615",
+        "os:ChromeOS",
+        "pool:Skia"
+      ],
+      "execution_timeout_ns": 14400000000000,
+      "expiration_ns": 72000000000000,
+      "extra_args": [
+        "--workdir",
+        "../../..",
+        "perf",
+        "repository=<(REPO)",
+        "buildername=Perf-ChromeOS-Clang-Pixelbook-GPU-IntelHDGraphics615-x86_64-Release-All",
+        "swarm_out_dir=${ISOLATED_OUTDIR}",
+        "revision=<(REVISION)",
+        "patch_repo=<(PATCH_REPO)",
+        "patch_storage=<(PATCH_STORAGE)",
+        "patch_issue=<(ISSUE)",
+        "patch_set=<(PATCHSET)"
+      ],
+      "io_timeout_ns": 2400000000000,
+      "isolate": "perf_skia_bundled_unix.isolate",
+      "max_attempts": 1,
+      "priority": 0.8
+    },
     "Perf-ChromeOS-Clang-SamsungChromebook2012-GPU-MaliT604-arm-Debug-All": {
       "dependencies": [
         "Build-Debian9-Clang-arm-Debug-Chromebook_GLES",
@@ -15378,6 +15468,72 @@
       "max_attempts": 1,
       "priority": 0.8
     },
+    "Test-ChromeOS-Clang-Pixelbook-GPU-IntelHDGraphics615-x86_64-Debug-All": {
+      "dependencies": [
+        "Build-Debian9-Clang-x86_64-Debug-Chromebook_GLES",
+        "Housekeeper-PerCommit-BundleRecipes",
+        "Housekeeper-PerCommit-IsolateSKP",
+        "Housekeeper-PerCommit-IsolateSVG",
+        "Housekeeper-PerCommit-IsolateSkImage"
+      ],
+      "dimensions": [
+        "gpu:IntelHDGraphics615",
+        "os:ChromeOS",
+        "pool:Skia"
+      ],
+      "execution_timeout_ns": 14400000000000,
+      "expiration_ns": 72000000000000,
+      "extra_args": [
+        "--workdir",
+        "../../..",
+        "test",
+        "repository=<(REPO)",
+        "buildername=Test-ChromeOS-Clang-Pixelbook-GPU-IntelHDGraphics615-x86_64-Debug-All",
+        "swarm_out_dir=${ISOLATED_OUTDIR}",
+        "revision=<(REVISION)",
+        "patch_repo=<(PATCH_REPO)",
+        "patch_storage=<(PATCH_STORAGE)",
+        "patch_issue=<(ISSUE)",
+        "patch_set=<(PATCHSET)"
+      ],
+      "io_timeout_ns": 2400000000000,
+      "isolate": "test_skia_bundled_unix.isolate",
+      "max_attempts": 1,
+      "priority": 0.8
+    },
+    "Test-ChromeOS-Clang-Pixelbook-GPU-IntelHDGraphics615-x86_64-Release-All": {
+      "dependencies": [
+        "Build-Debian9-Clang-x86_64-Release-Chromebook_GLES",
+        "Housekeeper-PerCommit-BundleRecipes",
+        "Housekeeper-PerCommit-IsolateSKP",
+        "Housekeeper-PerCommit-IsolateSVG",
+        "Housekeeper-PerCommit-IsolateSkImage"
+      ],
+      "dimensions": [
+        "gpu:IntelHDGraphics615",
+        "os:ChromeOS",
+        "pool:Skia"
+      ],
+      "execution_timeout_ns": 14400000000000,
+      "expiration_ns": 72000000000000,
+      "extra_args": [
+        "--workdir",
+        "../../..",
+        "test",
+        "repository=<(REPO)",
+        "buildername=Test-ChromeOS-Clang-Pixelbook-GPU-IntelHDGraphics615-x86_64-Release-All",
+        "swarm_out_dir=${ISOLATED_OUTDIR}",
+        "revision=<(REVISION)",
+        "patch_repo=<(PATCH_REPO)",
+        "patch_storage=<(PATCH_STORAGE)",
+        "patch_issue=<(ISSUE)",
+        "patch_set=<(PATCHSET)"
+      ],
+      "io_timeout_ns": 2400000000000,
+      "isolate": "test_skia_bundled_unix.isolate",
+      "max_attempts": 1,
+      "priority": 0.8
+    },
     "Test-ChromeOS-Clang-SamsungChromebook2012-GPU-MaliT604-arm-Debug-All": {
       "dependencies": [
         "Build-Debian9-Clang-arm-Debug-Chromebook_GLES",
@@ -24360,6 +24516,33 @@
       "isolate": "upload_nano_results.isolate",
       "priority": 0.8
     },
+    "Upload-Perf-ChromeOS-Clang-Pixelbook-GPU-IntelHDGraphics615-x86_64-Release-All": {
+      "dependencies": [
+        "Perf-ChromeOS-Clang-Pixelbook-GPU-IntelHDGraphics615-x86_64-Release-All"
+      ],
+      "dimensions": [
+        "cpu:x86-64-Haswell_GCE",
+        "gpu:none",
+        "os:Debian-9.1",
+        "pool:Skia"
+      ],
+      "extra_args": [
+        "--workdir",
+        "../../..",
+        "upload_nano_results",
+        "repository=<(REPO)",
+        "buildername=Perf-ChromeOS-Clang-Pixelbook-GPU-IntelHDGraphics615-x86_64-Release-All",
+        "swarm_out_dir=${ISOLATED_OUTDIR}",
+        "revision=<(REVISION)",
+        "patch_repo=<(PATCH_REPO)",
+        "patch_storage=<(PATCH_STORAGE)",
+        "patch_issue=<(ISSUE)",
+        "patch_set=<(PATCHSET)",
+        "gs_bucket=skia-perf"
+      ],
+      "isolate": "upload_nano_results.isolate",
+      "priority": 0.8
+    },
     "Upload-Perf-ChromeOS-Clang-SamsungChromebook2012-GPU-MaliT604-arm-Release-All": {
       "dependencies": [
         "Perf-ChromeOS-Clang-SamsungChromebook2012-GPU-MaliT604-arm-Release-All"
@@ -27168,6 +27351,60 @@
       "isolate": "upload_dm_results.isolate",
       "priority": 0.8
     },
+    "Upload-Test-ChromeOS-Clang-Pixelbook-GPU-IntelHDGraphics615-x86_64-Debug-All": {
+      "dependencies": [
+        "Test-ChromeOS-Clang-Pixelbook-GPU-IntelHDGraphics615-x86_64-Debug-All"
+      ],
+      "dimensions": [
+        "cpu:x86-64-Haswell_GCE",
+        "gpu:none",
+        "os:Debian-9.1",
+        "pool:Skia"
+      ],
+      "extra_args": [
+        "--workdir",
+        "../../..",
+        "upload_dm_results",
+        "repository=<(REPO)",
+        "buildername=Test-ChromeOS-Clang-Pixelbook-GPU-IntelHDGraphics615-x86_64-Debug-All",
+        "swarm_out_dir=${ISOLATED_OUTDIR}",
+        "revision=<(REVISION)",
+        "patch_repo=<(PATCH_REPO)",
+        "patch_storage=<(PATCH_STORAGE)",
+        "patch_issue=<(ISSUE)",
+        "patch_set=<(PATCHSET)",
+        "gs_bucket=skia-infra-gm"
+      ],
+      "isolate": "upload_dm_results.isolate",
+      "priority": 0.8
+    },
+    "Upload-Test-ChromeOS-Clang-Pixelbook-GPU-IntelHDGraphics615-x86_64-Release-All": {
+      "dependencies": [
+        "Test-ChromeOS-Clang-Pixelbook-GPU-IntelHDGraphics615-x86_64-Release-All"
+      ],
+      "dimensions": [
+        "cpu:x86-64-Haswell_GCE",
+        "gpu:none",
+        "os:Debian-9.1",
+        "pool:Skia"
+      ],
+      "extra_args": [
+        "--workdir",
+        "../../..",
+        "upload_dm_results",
+        "repository=<(REPO)",
+        "buildername=Test-ChromeOS-Clang-Pixelbook-GPU-IntelHDGraphics615-x86_64-Release-All",
+        "swarm_out_dir=${ISOLATED_OUTDIR}",
+        "revision=<(REVISION)",
+        "patch_repo=<(PATCH_REPO)",
+        "patch_storage=<(PATCH_STORAGE)",
+        "patch_issue=<(ISSUE)",
+        "patch_set=<(PATCHSET)",
+        "gs_bucket=skia-infra-gm"
+      ],
+      "isolate": "upload_dm_results.isolate",
+      "priority": 0.8
+    },
     "Upload-Test-ChromeOS-Clang-SamsungChromebook2012-GPU-MaliT604-arm-Debug-All": {
       "dependencies": [
         "Test-ChromeOS-Clang-SamsungChromebook2012-GPU-MaliT604-arm-Debug-All"
diff --git a/tools/ok_vias.cpp b/tools/ok_vias.cpp
index 815b159..1625223 100644
--- a/tools/ok_vias.cpp
+++ b/tools/ok_vias.cpp
@@ -5,6 +5,7 @@
  * found in the LICENSE file.
  */
 
+#include "../dm/DMFontMgr.h"
 #include "ProcStats.h"
 #include "SkColorFilter.h"
 #include "SkEventTracingPriv.h"
@@ -266,7 +267,6 @@
 };
 static Register memory{"memory", "print process maximum memory usage", Memory::Create};
 
-static SkOnce init_tracing_once;
 struct Trace : Dst {
     std::unique_ptr<Dst> target;
     std::string trace_mode;
@@ -279,7 +279,8 @@
     }
 
     Status draw(Src* src) override {
-        init_tracing_once([&] { initializeEventTracingForTools(trace_mode.c_str()); });
+        static SkOnce once;
+        once([&] { initializeEventTracingForTools(trace_mode.c_str()); });
         return target->draw(src);
     }
 
@@ -287,6 +288,35 @@
         return target->image();
     }
 };
-static Register trace {"trace",
-                       "enable tracing in mode=atrace, mode=debugf, or mode=trace.json",
-                       Trace::Create};
+static Register trace{"trace",
+                      "enable tracing in mode=atrace, mode=debugf, or mode=trace.json",
+                      Trace::Create};
+
+extern sk_sp<SkFontMgr> (*gSkFontMgr_DefaultFactory)();
+
+struct PortableFonts : Dst {
+    std::unique_ptr<Dst> target;
+
+    static std::unique_ptr<Dst> Create(Options options, std::unique_ptr<Dst> dst) {
+        PortableFonts via;
+        via.target = std::move(dst);
+        return move_unique(via);
+    }
+
+    Status draw(Src* src) override {
+        static SkOnce once;
+        once([]{
+            gSkFontMgr_DefaultFactory = []() -> sk_sp<SkFontMgr> {
+                return sk_make_sp<DM::FontMgr>();
+            };
+        });
+        return target->draw(src);
+    }
+
+    sk_sp<SkImage> image() override {
+        return target->image();
+    }
+};
+static Register portable_fonts{"portable_fonts",
+                               "use DM::FontMgr to make fonts more portable",
+                               PortableFonts::Create};
diff --git a/tools/rebaseline/add_legacy_flag.py b/tools/rebaseline/add_legacy_flag.py
index 8a99e51..9ccfd8c 100644
--- a/tools/rebaseline/add_legacy_flag.py
+++ b/tools/rebaseline/add_legacy_flag.py
@@ -66,6 +66,10 @@
       subprocess.check_call(['git', 'stash', 'pop'])
     exit(1)
 
+  # Update the repository to avoid conflicts
+  subprocess.check_call(['git', 'pull'])
+  subprocess.check_call(['gclient', 'sync']);
+
   # Use random number to avoid branch name collision.
   # We'll delete the branch in the end.
   random = randint(1, 10000)