Commit Graph

29761 Commits

Author SHA1 Message Date
Brian Salomon
528751873a Remove CHECK_SHOULD_DRAW from SkGpuDevice
Change-Id: Ieb3910e2085235c62374d3e30d1ce6b9089de567
Reviewed-on: https://skia-review.googlesource.com/33780
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-08-11 19:50:36 +00:00
Herb Derby
35ae65d5d0 SkSafeMath for tracking size_t overflow
Do multiply (mul) and add while tracking that the
calculation does not overflow, which can be checked with
ok().

The new unit test shows a couple examples.

Author:  Herb Derby <herb@google.com>
Change-Id: I7e67671d2488d67f21d47d9618736a6bae8f23c3
Reviewed-on: https://skia-review.googlesource.com/33721
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Herb Derby <herb@google.com>
2017-08-11 19:23:06 +00:00
Yuqian Li
4a31c46006 Don't store clipped x which could break edge order
We only need to clip a temporary x to ensure that we don't blit
beyond clip. Storing such clipped x is problematic because it
may make our edges unsorted.

The added unit test would fail without this fix.

Bug: skia:6947
Change-Id: I6c21d7c7c097e50fef18ab151921d6c07c089318
Reviewed-on: https://skia-review.googlesource.com/33420
Commit-Queue: Yuqian Li <liyuqian@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2017-08-11 19:05:56 +00:00
Mike Klein
6dda584128 remove monobench
I'm betting big on ok bench.  This is a forcing function.

Change-Id: I8c359b7d712e16f8f0cbb90591801e0014073288
Reviewed-on: https://skia-review.googlesource.com/33660
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-08-11 19:02:56 +00:00
Ben Wagner
fef8fdde87 Add new Linux IntelIris640 jobs.
Bug: skia:6761
Change-Id: I635958a482a16fc7027d33152db431cb8c5bbe2c
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/33740
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
2017-08-11 18:58:06 +00:00
Mike Klein
c10850f4e7 remove mask load() and store()
They appear to be slower than the generic load() and store() now.

    [blendmode_mask_Hue]    14.7ms  @0  15.6ms  @95 39.6ms  @100
    [blendmode_rect_Hue]    31.5ms  @0  37.6ms  @95 39.5ms  @100
    ~~>
    [blendmode_mask_Hue]    14.7ms  @0  15.2ms  @95 39.5ms  @100
    [blendmode_rect_Hue]    30.5ms  @0  32.6ms  @95 37.8ms  @100

Change-Id: I674b75087b8139debead71f3016631bcb0cb0047
Reviewed-on: https://skia-review.googlesource.com/33800
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-08-11 18:52:36 +00:00
Brian Osman
6382f455f0 Replace log2 with SkNextLog2
log2 didn't exist on Android until API 18, and it's doing double
precision math. I think this integer version is what we want?

Bug: skia:
Change-Id: I4909153c56a266688355349cda5d553b69f5c942
Reviewed-on: https://skia-review.googlesource.com/33680
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-08-11 18:05:26 +00:00
Mike Klein
a1d1703b74 double pump 8-bit stages
This basically unrolls all loops, handling twice as many pixels in a
stride.  We now pass around 4 native registers instead of just 2.

I've temporarily disabled AVX2 mask loads and stores.  It shouldn't be
hard to turn them back on, but I'd want to test on AVX2 hardware first.

Change-Id: I0907070f086a0650167456c149a479c1d96b8a2d
Reviewed-on: https://skia-review.googlesource.com/33361
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-08-11 16:52:06 +00:00
Ben Wagner
3c28653745 Upgrade Intel HD4600 and Iris6100 drivers.
HD4400 was upgraded in https://skia-review.googlesource.com/c/31101

Bug: skia:6917
No-Try: true
Change-Id: I9009671d1f47535fb1d0bacd180d8cf075088552
Reviewed-on: https://skia-review.googlesource.com/33584
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
2017-08-11 16:31:26 +00:00
Ben Wagner
423d1633d1 Revert "Remove subpixel positioning implies no bytecode hinting."
This reverts commit 880768032d.

Reason for revert: Pixel tests, and gfx tests can't handle hinting.

Original change's description:
> Remove subpixel positioning implies no bytecode hinting.
> 
> SkTypeface_FreeType::onFilterRec currently assumes that if we're asked
> to do subpixel positioning, don't do bytecode hinting. The idea was that
> both could not be satisfied at the same time, so pick something. This is
> no longer true, as with the v40 interpreter it is possible to get
> subpixel positioned but bytcode hinted glyphs.
> 
> BUG=skia:6931
> 
> Change-Id: Ifaeff20c121d6bb4b9287f552e383547eb6d5d49
> Reviewed-on: https://skia-review.googlesource.com/32201
> Reviewed-by: Yuqian Li <liyuqian@google.com>
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>

TBR=bungeman@google.com,liyuqian@google.com,reed@google.com

Change-Id: Idb1ee50d271846bdf962986914f6b75e3aa817c8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:6931
Reviewed-on: https://skia-review.googlesource.com/33586
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-08-11 16:25:42 +00:00
skia-deps-roller@chromium.org
f8f60df0f4 Roll skia/third_party/externals/angle2/ c2157a09d..936ea3250 (1 commit)
c2157a09d2..936ea32506

$ git log c2157a09d..936ea3250 --date=short --no-merges --format='%ad %ae %s'

Created with:
  roll-dep skia/third_party/externals/angle2


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

If the roll is causing failures, see:
http://www.chromium.org/developers/tree-sheriffs/sheriff-details-chromium#TOC-Failures-due-to-DEPS-rolls


CQ_INCLUDE_TRYBOTS=skia.primary:Perf-Win10-MSVC-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-ANGLE,Perf-Win10-MSVC-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-ANGLE,Perf-Win10-MSVC-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-ANGLE,Perf-Win10-MSVC-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-ANGLE,Perf-Win10-MSVC-ShuttleC-GPU-GTX960-x86_64-Debug-ANGLE,Perf-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Debug-ANGLE,Test-Win10-MSVC-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-ANGLE,Test-Win10-MSVC-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-ANGLE,Test-Win10-MSVC-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-ANGLE,Test-Win10-MSVC-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-ANGLE,Test-Win10-MSVC-ShuttleC-GPU-GTX960-x86_64-Debug-ANGLE,Test-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Debug-ANGLE
TBR=bungeman@google.com

Change-Id: Iae2fe924e74cd625a3328b0c4684272058ffba2f
Reviewed-on: https://skia-review.googlesource.com/33601
Reviewed-by: Skia Deps Roller <skia-deps-roller@chromium.org>
Commit-Queue: Skia Deps Roller <skia-deps-roller@chromium.org>
2017-08-11 15:48:56 +00:00
Mike Klein
4f6e271596 ok, add a bench source
This new source acts like other sources (GMs, SKPs) for benchmarks.  It
times multiple samples (controlled by samples=N, default 20), and each
of those samples uses the same strategy as monobench, growing loops
exponentially until it runs for at least 10ms.

When done it prints the fastest and the two slowest samples.  In
practice the 100th percentile sample is very different from the
next slowest due to caching, and the fastest is always interesting.

Because these benchmarks run in whatever execution engine ok has
selected, on non-Windows platforms you have some real control over the
interaction between benchmarks.  In its default "fork" mode each
benchmark runs independently in its own process, so the 100th
percentiles really stand out.  The other modes "thread" and "serial"
work as you'd expect too.

Here's an example where you can see how the different interactions work:

out/ok bench:samples=100 8888 filter:search=text_16_AA fork
    [text_16_AA_WT] 2.32µs  @0  6.23µs  @99 24.3ms  @100
    [text_16_AA_FF] 2.41µs  @0  5.7µs   @99 23.3ms  @100
    [text_16_AA_88] 2.55µs  @0  5.6µs   @99 24.8ms  @100
    [text_16_AA_BK] 1.97µs  @0  5.44µs  @99 23.2ms  @100

out/ok bench:samples=100 8888 filter:search=text_16_AA thread
    [text_16_AA_FF] 2.45µs  @0  23.5µs  @99 24.8ms  @100
    [text_16_AA_WT] 2.52µs  @0  17.8µs  @99 24.7ms  @100
    [text_16_AA_88] 2.55µs  @0  19.7µs  @99 25.1ms  @100
    [text_16_AA_BK] 1.8µs   @0  14.7µs  @99 25.1ms  @100

out/ok bench:samples=100 8888 filter:search=text_16_AA serial
    [text_16_AA_88] 2.35µs  @0  3.53µs  @99 16.7ms  @100
    [text_16_AA_FF] 2.09µs  @0  2.73µs  @99 2.91µs  @100
    [text_16_AA_BK] 1.75µs  @0  2.46µs  @99 2.65µs  @100
    [text_16_AA_WT] 2.1µs   @0  3.16µs  @99 3.17µs  @100

In the first "fork" case all runs are independent and have roughly
the same profile.  "thread" looks similar except you can see them
contending at the 99th percentile.  In "serial", the first bench
warms up the rest, so their 100th percentiles are all much faster.

Change-Id: I01a9f8c54b540221a9f232b271bb8ef3fda2569c
Reviewed-on: https://skia-review.googlesource.com/33585
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-08-11 15:32:36 +00:00
Ben Wagner
880768032d Remove subpixel positioning implies no bytecode hinting.
SkTypeface_FreeType::onFilterRec currently assumes that if we're asked
to do subpixel positioning, don't do bytecode hinting. The idea was that
both could not be satisfied at the same time, so pick something. This is
no longer true, as with the v40 interpreter it is possible to get
subpixel positioned but bytcode hinted glyphs.

BUG=skia:6931

Change-Id: Ifaeff20c121d6bb4b9287f552e383547eb6d5d49
Reviewed-on: https://skia-review.googlesource.com/32201
Reviewed-by: Yuqian Li <liyuqian@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-08-11 14:21:27 +00:00
Brian Osman
26080be49f Much lower overhead Skia event tracing in the framework
Bug: skia:
Change-Id: I0172e9e74898fb615cbb0ac61e46cbf9012ae75b
Reviewed-on: https://skia-review.googlesource.com/33262
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-08-11 14:15:06 +00:00
Brian Salomon
aff329b8e9 Make GrFragmentProcessor be non-refcounted and use std::unique_ptr.
Change-Id: I985e54a071338e99292a5aa2f42c92bc115b4008
Reviewed-on: https://skia-review.googlesource.com/32760
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-08-11 14:13:26 +00:00
Ben Wagner
e2cbd04518 Fix DM_ARGS in public.bzl.
Broken by https://skia-review.googlesource.com/32862. It seems that
"tiles_rt" and "pic" configs were passing at one point, but have since
bit-rotted after being renamed to "tiles_rt-8888" and "pic-8888" and
thus ignored by dm.

No-Try: true
Change-Id: I00a5e5a0cc2090566809a61fa310c8ddaafdea43
Reviewed-on: https://skia-review.googlesource.com/33581
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
2017-08-11 13:51:56 +00:00
Ben Wagner
32fa510414 Abort dm/nanobench on bad configs.
Adjust the configs specified by recipes to avoid the new error.

Change-Id: I23e31355e2faaab919d92abdb37a6f70cd2da1ff
Reviewed-on: https://skia-review.googlesource.com/32862
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
2017-08-11 13:12:26 +00:00
skia-deps-roller@chromium.org
6d3af6faa2 Roll skia/third_party/externals/angle2/ d23bcd8eb..c2157a09d (1 commit)
d23bcd8eb6..c2157a09d2

$ git log d23bcd8eb..c2157a09d --date=short --no-merges --format='%ad %ae %s'

Created with:
  roll-dep skia/third_party/externals/angle2


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

If the roll is causing failures, see:
http://www.chromium.org/developers/tree-sheriffs/sheriff-details-chromium#TOC-Failures-due-to-DEPS-rolls


CQ_INCLUDE_TRYBOTS=skia.primary:Perf-Win10-MSVC-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-ANGLE,Perf-Win10-MSVC-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-ANGLE,Perf-Win10-MSVC-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-ANGLE,Perf-Win10-MSVC-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-ANGLE,Perf-Win10-MSVC-ShuttleC-GPU-GTX960-x86_64-Debug-ANGLE,Perf-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Debug-ANGLE,Test-Win10-MSVC-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-ANGLE,Test-Win10-MSVC-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-ANGLE,Test-Win10-MSVC-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-ANGLE,Test-Win10-MSVC-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-ANGLE,Test-Win10-MSVC-ShuttleC-GPU-GTX960-x86_64-Debug-ANGLE,Test-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Debug-ANGLE
TBR=bungeman@google.com

Change-Id: I79eb282e3b54001b5fb3c3e1b6d0bc76bb3b6572
Reviewed-on: https://skia-review.googlesource.com/33521
Reviewed-by: Skia Deps Roller <skia-deps-roller@chromium.org>
Commit-Queue: Skia Deps Roller <skia-deps-roller@chromium.org>
2017-08-11 08:55:56 +00:00
skia-deps-roller@chromium.org
ba7196c0c9 Roll skia/third_party/externals/angle2/ ed049ab44..d23bcd8eb (1 commit)
ed049ab44d..d23bcd8eb6

$ git log ed049ab44..d23bcd8eb --date=short --no-merges --format='%ad %ae %s'

Created with:
  roll-dep skia/third_party/externals/angle2


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

If the roll is causing failures, see:
http://www.chromium.org/developers/tree-sheriffs/sheriff-details-chromium#TOC-Failures-due-to-DEPS-rolls


CQ_INCLUDE_TRYBOTS=skia.primary:Perf-Win10-MSVC-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-ANGLE,Perf-Win10-MSVC-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-ANGLE,Perf-Win10-MSVC-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-ANGLE,Perf-Win10-MSVC-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-ANGLE,Perf-Win10-MSVC-ShuttleC-GPU-GTX960-x86_64-Debug-ANGLE,Perf-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Debug-ANGLE,Test-Win10-MSVC-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-ANGLE,Test-Win10-MSVC-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-ANGLE,Test-Win10-MSVC-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-ANGLE,Test-Win10-MSVC-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-ANGLE,Test-Win10-MSVC-ShuttleC-GPU-GTX960-x86_64-Debug-ANGLE,Test-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Debug-ANGLE
TBR=bungeman@google.com

Change-Id: I417bd656cd93211378a9302dc18b37b159e7d757
Reviewed-on: https://skia-review.googlesource.com/33501
Reviewed-by: Skia Deps Roller <skia-deps-roller@chromium.org>
Commit-Queue: Skia Deps Roller <skia-deps-roller@chromium.org>
2017-08-11 06:08:56 +00:00
skia-deps-roller@chromium.org
a9a3564ff8 Roll skia/third_party/externals/angle2/ 47bb4933f..ed049ab44 (1 commit)
47bb4933fb..ed049ab44d

$ git log 47bb4933f..ed049ab44 --date=short --no-merges --format='%ad %ae %s'

Created with:
  roll-dep skia/third_party/externals/angle2


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

If the roll is causing failures, see:
http://www.chromium.org/developers/tree-sheriffs/sheriff-details-chromium#TOC-Failures-due-to-DEPS-rolls


CQ_INCLUDE_TRYBOTS=skia.primary:Perf-Win10-MSVC-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-ANGLE,Perf-Win10-MSVC-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-ANGLE,Perf-Win10-MSVC-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-ANGLE,Perf-Win10-MSVC-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-ANGLE,Perf-Win10-MSVC-ShuttleC-GPU-GTX960-x86_64-Debug-ANGLE,Perf-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Debug-ANGLE,Test-Win10-MSVC-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-ANGLE,Test-Win10-MSVC-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-ANGLE,Test-Win10-MSVC-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-ANGLE,Test-Win10-MSVC-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-ANGLE,Test-Win10-MSVC-ShuttleC-GPU-GTX960-x86_64-Debug-ANGLE,Test-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Debug-ANGLE
TBR=bungeman@google.com

Change-Id: I046ffd0906028f3d674cb66fc3850cee717ea976
Reviewed-on: https://skia-review.googlesource.com/33303
Reviewed-by: Skia Deps Roller <skia-deps-roller@chromium.org>
Commit-Queue: Skia Deps Roller <skia-deps-roller@chromium.org>
2017-08-11 00:22:05 +00:00
Adrienne Walker
ad8da8ea99 Expose SkPath validation as boolean
As a part of serializing SkPaths, I want to be able to know (without
asserting) whether or not a path is valid so that I can discard
potentially malicious deserialized paths.

Currently, SkPath(Ref) both just have asserting validation functions
which can't be used externally.  This patch adds accessors that don't
assert.

Bug: chromium:752755 skia:6955
Change-Id: I4d0ceb31ec660b87e3fda438392ad2b60a27a0da
Reviewed-on: https://skia-review.googlesource.com/31720
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
2017-08-10 20:22:35 +00:00
skia-deps-roller@chromium.org
6a653a5f7d Roll skia/third_party/externals/angle2/ 553590a57..47bb4933f (1 commit)
553590a579..47bb4933fb

$ git log 553590a57..47bb4933f --date=short --no-merges --format='%ad %ae %s'

Created with:
  roll-dep skia/third_party/externals/angle2


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

If the roll is causing failures, see:
http://www.chromium.org/developers/tree-sheriffs/sheriff-details-chromium#TOC-Failures-due-to-DEPS-rolls


CQ_INCLUDE_TRYBOTS=skia.primary:Perf-Win10-MSVC-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-ANGLE,Perf-Win10-MSVC-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-ANGLE,Perf-Win10-MSVC-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-ANGLE,Perf-Win10-MSVC-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-ANGLE,Perf-Win10-MSVC-ShuttleC-GPU-GTX960-x86_64-Debug-ANGLE,Perf-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Debug-ANGLE,Test-Win10-MSVC-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-ANGLE,Test-Win10-MSVC-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-ANGLE,Test-Win10-MSVC-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-ANGLE,Test-Win10-MSVC-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-ANGLE,Test-Win10-MSVC-ShuttleC-GPU-GTX960-x86_64-Debug-ANGLE,Test-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Debug-ANGLE
TBR=bungeman@google.com

Change-Id: Id627c18e2bc530902ab25bc054602b4f9d73d541
Reviewed-on: https://skia-review.googlesource.com/33241
Reviewed-by: Skia Deps Roller <skia-deps-roller@chromium.org>
Commit-Queue: Skia Deps Roller <skia-deps-roller@chromium.org>
2017-08-10 20:11:37 +00:00
Brian Osman
e4f846aae7 Bypass libandroid dynamic linking for ATrace in framework builds
These symbols were resolving, but weren't really connected to systrace
on Android. Using the macros/functions allows this to work correctly.

This change doesn't actually cause anything to happen in framework
builds - that still requires installing an instance of SkATrace, but
now doing so will route all of Skia's TRACE_EVENT macros to systrace.

Bug: skia:
Change-Id: I6d2eafac7ef2531ba92094b92f68e59e0490ef62
Reviewed-on: https://skia-review.googlesource.com/33400
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-08-10 20:05:36 +00:00
Ben Wagner
6da8f79618 Fix undefined flag for MSAN.
MSAN started failing after https://skia-review.googlesource.com/c/32722.
This should fix it.

No-Try: true
Change-Id: I8956c8c211507923f078fe96921fedaadefae8a8
Reviewed-on: https://skia-review.googlesource.com/32942
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
2017-08-10 19:02:06 +00:00
Robert Phillips
8c326e9b81 Remove fStencilClearValue from Vulkan's CommandBufferInfo struct
Adding this extra field to the CommandBufferInfo may or may not have led to a memory regression.

Remove it until it is actually needed.

Change-Id: Ibdddbeb7625f91f5199584a575289f07f6e95304
Reviewed-on: https://skia-review.googlesource.com/33280
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-08-10 18:12:56 +00:00
Brian Salomon
b74ef035a4 Hide GrPaint copy constructor and add GrPaint::Clone and remove MoveOrNew and MoveOrCopy.
Also makes paint clones use cloned fragment processors.

Change-Id: I60efcfc6a46a4f8430a72f4d1ec79c7d99fbe593
Reviewed-on: https://skia-review.googlesource.com/33084
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-08-10 17:56:45 +00:00
Yuqian Li
92e6cc6b2d Some performance tweaks for DAA
1. Always inline (Clang previously ignored inline and got 25% slower)
2. SIMD everywhere other than x86 gcc:
   non-SIMD is only faster in my desktop with gcc;
   with Clang on my desktop, SIMD is 50% faster than non-SIMD.
3. Allocate 4x memory instead of 2x when running out of space:
   on old Android devices with Linux kernel 3.10 (e.g., Nexus 6P, 5X),
   the alloc/memcpy will triger a major bottleneck in kernel (30% of
   the running time). Such bottleneck goes away (the kernel is no
   longer doing stupid things during alloc/memcpy) in Linux kernel
   3.18 (e.g., Pixel), and that's why DAA is much faster on Pixel than
   on Nexus 6P.

I think maybe I should adopt SkRasterPipeline for device-specific
optimizations.

Bug: skia:
Change-Id: I0408aa7671a5f1b39aad3bec25f8fc994ff5a1bb
Reviewed-on: https://skia-review.googlesource.com/30820
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2017-08-10 17:56:25 +00:00
Brian Osman
80488229ea Revert "Revert "Support single line objects and arrays""
This reverts commit a5a69cfb48.

Bug: skia:
Change-Id: I08475d96255b9df13e5c86e1ef9c7f4739e51459
Reviewed-on: https://skia-review.googlesource.com/33202
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-08-10 17:47:26 +00:00
Leon Scroggins III
f7332d3238 Build support for 32-bit armv8-a
Since both armv7-a-neon and 32-bit armv8-a have NEON, we can treat them
the same in Android.bp.

Bug: b/62895439

Corresponds to https://android-review.googlesource.com/c/423660/3
This change will generate the change to Android.bp described there.

Change-Id: Icae9b5b79093d6f2886da39771d4fbe901be237a
Reviewed-on: https://skia-review.googlesource.com/33000
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-08-10 17:31:25 +00:00
Brian Osman
31c075eb14 Avoid errors about re-defining __STDC_FORMAT_MACROS
Bug: skia:
Change-Id: I880e3d5a668743ac12fb0101baca637443e920b4
Reviewed-on: https://skia-review.googlesource.com/33082
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-08-10 17:06:35 +00:00
skia-deps-roller@chromium.org
5bb4c0a42a Roll skia/third_party/externals/angle2/ 0f7714ecc..553590a57 (1 commit)
0f7714ecc0..553590a579

$ git log 0f7714ecc..553590a57 --date=short --no-merges --format='%ad %ae %s'

Created with:
  roll-dep skia/third_party/externals/angle2


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

If the roll is causing failures, see:
http://www.chromium.org/developers/tree-sheriffs/sheriff-details-chromium#TOC-Failures-due-to-DEPS-rolls


CQ_INCLUDE_TRYBOTS=skia.primary:Perf-Win10-MSVC-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-ANGLE,Perf-Win10-MSVC-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-ANGLE,Perf-Win10-MSVC-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-ANGLE,Perf-Win10-MSVC-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-ANGLE,Perf-Win10-MSVC-ShuttleC-GPU-GTX960-x86_64-Debug-ANGLE,Perf-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Debug-ANGLE,Test-Win10-MSVC-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-ANGLE,Test-Win10-MSVC-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-ANGLE,Test-Win10-MSVC-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-ANGLE,Test-Win10-MSVC-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-ANGLE,Test-Win10-MSVC-ShuttleC-GPU-GTX960-x86_64-Debug-ANGLE,Test-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Debug-ANGLE
TBR=bungeman@google.com

Change-Id: If45708be4c7d9053bb89d3376337548663a75c85
Reviewed-on: https://skia-review.googlesource.com/33040
Reviewed-by: Skia Deps Roller <skia-deps-roller@chromium.org>
Commit-Queue: Skia Deps Roller <skia-deps-roller@chromium.org>
2017-08-10 15:45:55 +00:00
Brian Osman
71a1889a14 Revert "Revert "GrContext::dump that produces JSON formatted output""
This reverts commit 0f450acd76.

Bug: skia:
Change-Id: I97428fbbc6d82bf8b186ec5fdbf1a939c00e4126
Reviewed-on: https://skia-review.googlesource.com/32726
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-08-10 15:42:25 +00:00
Mike Reed
47238c79c4 remove guard for google3
Bug: skia:
Change-Id: I4e174aa05cc158ad1a5827010ceb933f73b8363b
Reviewed-on: https://skia-review.googlesource.com/33120
Reviewed-by: Mike Reed <reed@google.com>
2017-08-10 14:44:11 +00:00
Mike Klein
c2f876bb8d Replace interp() with clut_{3,4}D stages.
I tried to follow exactly the same strategy as a start.
(Though I did fix the off-by-one dimensions.)

It does rather look like we only need 3D and 4D now
that I've looked at the call sites.

Looks like about a 20% speedup.

Change-Id: I8b1af64750ad1750716ee1ab0767e64591c7206a
Reviewed-on: https://skia-review.googlesource.com/32842
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-08-10 14:34:35 +00:00
Brian Salomon
f4874bc5c1 Test non-msaa instanced rendering on Mac
Change-Id: I28b67ccef7bb72e4853a0eb02d1de00b1ed40cce
Reviewed-on: https://skia-review.googlesource.com/33001
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-08-10 14:06:05 +00:00
Ben Wagner
11ab43cf3a Remove --undefok from recipes.
Since recipes are now versioned with the code, this is unnecessary and
could mask recipe bugs.

Change-Id: Ic5aafbd3a7e9ccd3fd529c71b282cf6b037b78df
Reviewed-on: https://skia-review.googlesource.com/32722
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
2017-08-10 13:52:05 +00:00
Brian Salomon
bfd18cdd54 Move GrAppliedClip into GrPipeline
Change-Id: I522c2fd52bea9813baba7cdb3f11b63e7ab96b50
Reviewed-on: https://skia-review.googlesource.com/28861
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-08-10 12:54:05 +00:00
Robert Phillips
65048139bd Remove accessRenderTarget calls in service of binding stencil buffer
Change-Id: Ifca6e21c619a0433ecf0b8699d92661f8c3068a8
Reviewed-on: https://skia-review.googlesource.com/31243
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-08-10 12:47:25 +00:00
skia-deps-roller@chromium.org
2ef3b0fe3a Roll skia/third_party/externals/angle2/ 85d624a51..0f7714ecc (1 commit)
85d624a510..0f7714ecc0

$ git log 85d624a51..0f7714ecc --date=short --no-merges --format='%ad %ae %s'

Created with:
  roll-dep skia/third_party/externals/angle2


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

If the roll is causing failures, see:
http://www.chromium.org/developers/tree-sheriffs/sheriff-details-chromium#TOC-Failures-due-to-DEPS-rolls


CQ_INCLUDE_TRYBOTS=skia.primary:Perf-Win10-MSVC-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-ANGLE,Perf-Win10-MSVC-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-ANGLE,Perf-Win10-MSVC-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-ANGLE,Perf-Win10-MSVC-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-ANGLE,Perf-Win10-MSVC-ShuttleC-GPU-GTX960-x86_64-Debug-ANGLE,Perf-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Debug-ANGLE,Test-Win10-MSVC-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-ANGLE,Test-Win10-MSVC-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-ANGLE,Test-Win10-MSVC-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-ANGLE,Test-Win10-MSVC-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-ANGLE,Test-Win10-MSVC-ShuttleC-GPU-GTX960-x86_64-Debug-ANGLE,Test-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Debug-ANGLE
TBR=bungeman@google.com

Change-Id: Ie1fcd250711edcf9b50fa7e910d92376848c0b79
Reviewed-on: https://skia-review.googlesource.com/32901
Commit-Queue: Skia Deps Roller <skia-deps-roller@chromium.org>
Reviewed-by: Skia Deps Roller <skia-deps-roller@chromium.org>
2017-08-10 09:31:55 +00:00
Ben Wagner
ab909b5cd3 Add duplicate Valgrind tasks on QuadroP400.
Valgrind 3.13.0 only supports up to AVX2, so I used SK_CPU_LIMIT_SSE41
to avoid failing with "Unrecognised instruction." (The existing Valgrind
tasks run on a ShuttleA machine, whose CPU only supports AVX.)

Needed to enable verbose output on all Valgrind tasks to avoid Swarming
I/O timeout. Opportunistically removed verbose output for Linux Intel
bots that are no longer failing.

Bug: skia:6881
Change-Id: I2ffa6efe901c97bd2e0bbc9b26632aafbb3cf9a6
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/31143
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-08-09 21:46:46 +00:00
Yuqian Li
5eb8fc585e No chop at y extrema for cubics
The new Delta AA scan converter does not need the edge to be updated
with monotonic Y so chopping at y extrema is not necessary. Removing
such chopping brings ~10% performance increase to chalkboard.svg which
has tons of small cubics (the same is true for many svgs I saw).

We didn't remove the chopping for quads because that does not bring
a significant speedup. Moreover, dropping those y extremas would make
our strokecircle animation look a little more wobbly (because we would
have fewer divisions for the quads at the top and bottom of the circle).

Bug: skia:
Change-Id: I3984d2619f9f77269ed24e8cbfa9f1429ebca4a8
Reviewed-on: https://skia-review.googlesource.com/31940
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2017-08-09 21:05:35 +00:00
Brian Osman
0f450acd76 Revert "GrContext::dump that produces JSON formatted output"
This reverts commit 175af0d011.

Reason for revert: Chrome doesn't know about portable format specifiers. Sigh.

Original change's description:
> GrContext::dump that produces JSON formatted output
> 
> Includes caps, GL strings, and extensions
> 
> Bug: skia:
> Change-Id: I1e8b3dd50fb68357f9de8ca6149cf65443d027ef
> Reviewed-on: https://skia-review.googlesource.com/32340
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,brianosman@google.com

Change-Id: Ie280b25275725f0661da7541f54ed62897abb82f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/32861
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-08-09 20:47:49 +00:00
Brian Osman
a5a69cfb48 Revert "Support single line objects and arrays"
This reverts commit 6a7d56fa0f.

Reason for revert: Earlier commit needs to be reverted for Chrome roll.

Original change's description:
> Support single line objects and arrays
> 
> This is just a formatting nicety. The new caps dump has several large
> arrays of structs, and keeping each object on one line makes them much
> more readable. (It also limits the total length of the output, which
> helps when scanning through).
> 
> Example of the output, before and after this change:
> https://gist.github.com/brianosman/872f33be9af49031023b791e7db0b1fb
> 
> Bug: skia:
> Change-Id: I0fe0c2241b0c7f451b0837500e554d0491126d5e
> Reviewed-on: https://skia-review.googlesource.com/32820
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

TBR=bsalomon@google.com,brianosman@google.com

Change-Id: I2b05cf79ca4804e5944f2eb3e17fe4be4d5af290
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/32860
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-08-09 20:44:46 +00:00
Brian Salomon
91326c34ee Move GrProcessorSet into GrPipeline
Change-Id: Ibfa5e1adda3c32140590aa62a31d35654cef79dd
Reviewed-on: https://skia-review.googlesource.com/28187
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-08-09 20:42:45 +00:00
Mike Klein
6a14edc8d8 Remove SkColorLookUpTable::interp3D().
It looks like our recursive approach is faster than interp3D(),
and we'd prefer trilinear interpolation over tetrahedral for quality.

Change-Id: I1019254b9ecf24b2f4feff17ed8ae1b48fcc281e
Reviewed-on: https://skia-review.googlesource.com/32800
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-08-09 20:34:55 +00:00
Robert Phillips
54190c42dd Revert "Store discard request on the opList and remove GrDiscardOp"
This reverts commit b681a0f1b0.

Reason for revert: Seems to be messing up some MacMini & Nexus7 bots
Original change's description:
> Store discard request on the opList and remove GrDiscardOp
> 
> Change-Id: Ic1f76bb91c16b23df1fe71c07a4d5ad5abf1dc26
> Reviewed-on: https://skia-review.googlesource.com/32640
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com

Change-Id: I8a89fae7bb11791bd023d7444a074bb34d006fd0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/32704
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-08-09 20:10:06 +00:00
Yuqian Li
dd3feeeec9 Move gFDot6INVERSE definition to cpp file
Bug: skia:6946
Change-Id: Iee029a73ae899b0f73910b45c7cf83bd37dc07c3
Reviewed-on: https://skia-review.googlesource.com/32840
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2017-08-09 19:42:34 +00:00
Brian Osman
6a7d56fa0f Support single line objects and arrays
This is just a formatting nicety. The new caps dump has several large
arrays of structs, and keeping each object on one line makes them much
more readable. (It also limits the total length of the output, which
helps when scanning through).

Example of the output, before and after this change:
https://gist.github.com/brianosman/872f33be9af49031023b791e7db0b1fb

Bug: skia:
Change-Id: I0fe0c2241b0c7f451b0837500e554d0491126d5e
Reviewed-on: https://skia-review.googlesource.com/32820
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-08-09 19:41:35 +00:00
Brian Osman
175af0d011 GrContext::dump that produces JSON formatted output
Includes caps, GL strings, and extensions

Bug: skia:
Change-Id: I1e8b3dd50fb68357f9de8ca6149cf65443d027ef
Reviewed-on: https://skia-review.googlesource.com/32340
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-08-09 18:52:05 +00:00
Mike Klein
a07e4302cf add gamma stage
Until now we've been using 3 separate parametric stages to apply
gamma to r,g,b.  That works fine, but is kind of unnecessarily
slow, and again less clear in a stack trace than seeing "gamma".

The new bench runs in about 60% of the time the old one does
on my Trashcan.

BUG=skia:6939

Change-Id: I079698d3009b081f1c23a2e27fc26e373b439610
Reviewed-on: https://skia-review.googlesource.com/32721
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-08-09 18:51:44 +00:00