Bug 1505426 - initialize SkMaskFilter flattenables. r=rhunt
authorLee Salzman <lsalzman@mozilla.com>
Tue, 20 Nov 2018 15:19:33 -0500
changeset 503842 7b8ac6916321039ae4fc993853b851a98d65f8c3
parent 503841 8a25480541382c670e4f17148b218660ebc63ff1
child 503843 e62a7d9b6d0cd12f26bfde01d8875417ee137925
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrhunt
bugs1505426
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1505426 - initialize SkMaskFilter flattenables. r=rhunt
gfx/skia/skia/src/ports/SkGlobalInitialization_default.cpp
gfx/tests/crashtests/1505426-1.html
gfx/tests/crashtests/crashtests.list
--- a/gfx/skia/skia/src/ports/SkGlobalInitialization_default.cpp
+++ b/gfx/skia/skia/src/ports/SkGlobalInitialization_default.cpp
@@ -1,26 +1,30 @@
 /*
  * Copyright 2011 Google Inc.
  *
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
 
 #include "SkFlattenablePriv.h"
+#include "SkMaskFilter.h"
 #include "../../src/effects/SkDashImpl.h"
 #include "SkGradientShader.h"
 
 /*
  *  None of these are strictly "required" for Skia to operate.
  *
  *  These are the bulk of our "effects" -- subclasses of various effects on SkPaint.
  *
  *  Clients should feel free to dup this file and modify it as needed. This function "InitEffects"
  *  will automatically be called before any of skia's effects are asked to be deserialized.
  */
 void SkFlattenable::PrivateInitializer::InitEffects() {
     // Shader
     SkGradientShader::InitializeFlattenables();
 
+    // Mask filters.
+    SkMaskFilter::InitializeFlattenables();
+
     // PathEffect
     SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDashImpl)
 }
new file mode 100644
--- /dev/null
+++ b/gfx/tests/crashtests/1505426-1.html
@@ -0,0 +1,23 @@
+<html>
+
+<head>
+  <script>
+    function start() {
+      canvas = document.getElementById('canvas')
+      context = canvas.getContext('2d')
+      canvas.setAttribute('x', 800)
+      setTimeout(function() {
+        context.fillText('i', 158, 156, 206)
+      }, 0)
+      context.setTransform(0, 1, 19, 1, 0.0989504886744, 0)
+    }
+    document.addEventListener('DOMContentLoaded', start)
+  </script>
+
+</head>
+
+<body>
+  <canvas id='canvas'></canvas>
+</body>
+
+</html>
\ No newline at end of file
--- a/gfx/tests/crashtests/crashtests.list
+++ b/gfx/tests/crashtests/crashtests.list
@@ -168,8 +168,9 @@ load 1464243.html
 load 1467847-1.html
 load 1468020.html
 load 1470437.html
 load 1470440.html
 load 1478035.html
 load 1490704-1.html
 load 1501518.html
 load 1503986-1.html
+load 1505426-1.html