patch from issue 752403002 at patchset 1 (http://crrev.com/752403002#ps1) BUG=skia: Review URL: https://codereview.chromium.org/760023002