Commit Graph

2834 Commits

Author SHA1 Message Date
Greg Daniel
c8dd283c9a Revert "Dynamically load the vulkan library in our test tools"
This reverts commit 77d6feaa69.

Reason for revert: breaking google 3

Original change's description:
> Dynamically load the vulkan library in our test tools
> 
> Bug: skia:
> Change-Id: I7c1f6cbb2b50ca284f40cf4b9ef49a76083b38c6
> Reviewed-on: https://skia-review.googlesource.com/68643
> Reviewed-by: Chris Dalton <csmartdalton@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

TBR=egdaniel@google.com,csmartdalton@google.com

Change-Id: I6b2588e71f1876868fcf8f2b3c91a96e7c689045
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/69780
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-11-10 00:34:17 +00:00
Ben Wagner
22499b0969 Update mirror-dev for *-dev:amd64 packages.
Some dev packages in debian have been updated to multiarch, but not all.
Deal with this transitional issue, since there are multiarch dev
packages which cannot actually be installed because they depend on other
not yet multi-arch packages.

Change-Id: I3881c82cef8d6004d8bac0c18e9c34ce0808dc1a
Reviewed-on: https://skia-review.googlesource.com/69701
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-11-09 22:44:57 +00:00
Jim Van Verth
98c5b8b481 Move ms meter from the title bar to the display
Change-Id: I95dbb681a930f06103ecf1d8b213bb9c0915d2d6
Reviewed-on: https://skia-review.googlesource.com/69660
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-11-09 21:07:47 +00:00
Greg Daniel
77d6feaa69 Dynamically load the vulkan library in our test tools
Bug: skia:
Change-Id: I7c1f6cbb2b50ca284f40cf4b9ef49a76083b38c6
Reviewed-on: https://skia-review.googlesource.com/68643
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-11-09 21:04:37 +00:00
Brian Osman
fdab576a75 Allow changing the transfer function in xform canvas mode
Used this to test out some theories for different color correction
approaches.

Bug: skia:
Change-Id: I072130733eaea736c9aa129af74887b028f035b4
Reviewed-on: https://skia-review.googlesource.com/69221
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-11-09 15:49:34 +00:00
Ben Wagner
700ff17125 Bookmaker to work on Linux.
This also updates one fiddle example which used SkTypeface::kBold, which
is now private.

Change-Id: I799b64bfaa377d02f0a045d2f077410d4f38413d
Reviewed-on: https://skia-review.googlesource.com/68902
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-11-08 21:07:27 +00:00
Yuqian Li
bb4b48945d Support toggling flags
Bug: skia:
Change-Id: I1d15f15db2ade0d238d5073cef5b30a3bd5070a5
Reviewed-on: https://skia-review.googlesource.com/68581
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2017-11-08 19:20:17 +00:00
Brian Osman
f479e42981 Use ListBox for slide picker in Viewer
Interaction is much nicer (the bulleted list of text had dead space
between entries, so mouse clicks could go unnoticed). This version also
keeps the currently active slide highlighted in the list, which is nice.

Bug: skia:
Change-Id: I609d90f3b1ff99765f0a7f1ca43e02a0a534dc4d
Reviewed-on: https://skia-review.googlesource.com/68780
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-11-08 18:33:07 +00:00
Brian Osman
70d2f43d82 In Viewer, use a GL window for Raster mode
The GUI uses drawVertices, in a way that doesn't currently
work with the raster backend. Even if it worked, drawVertices
is fairly slow in raster mode, but extremely fast on GPU.
This makes the GUI always usable. The tradeoff is profiling
raster will be less accurate.

Bug: skia:
Change-Id: I69df777fc5be79f5bdd8d4505f6419bfa758c97e
Reviewed-on: https://skia-review.googlesource.com/68541
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-11-08 16:38:27 +00:00
Yuqian Li
427293c17e Update chromium codebase during add_legacy_flag.py
This would prevent a potential merge conflict.

Bug: skia:
Change-Id: Icb805ff41d491f021f3b12640084f743fda905aa
Reviewed-on: https://skia-review.googlesource.com/68140
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2017-11-07 14:25:18 +00:00
Mike Klein
361dde006f add DM::FontMgr to ok
The bots will still use DM, but the multiprocess architecture of ok
makes it easier to isolate and debug crashes, assertions, and unit
test failures.

Usage:
  $ ninja -C out ok
  $ out/ok test portable_fonts
...
935 ok, 4 failed, 5 crashed
...

Change-Id: I6bbd0ffc02d19bb5907c71eaebe30ac3646a80a6
Reviewed-on: https://skia-review.googlesource.com/68201
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-11-07 13:40:08 +00:00
Chris Dalton
7c02cc7934 Add clipping options to path text bench and samples
Bug: skia:
Change-Id: I632a2fa5627ef1438d9ab451318a42d12c61b802
Reviewed-on: https://skia-review.googlesource.com/67683
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-11-07 01:51:31 +00:00
Yuqian Li
61ffd53a90 githash is a string, not an array
Bug: skia:
Change-Id: I7f0f907ee10de9d4cb431d61ac5b0044e3324ca5
Reviewed-on: https://skia-review.googlesource.com/68060
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2017-11-07 01:46:29 +00:00
Mike Klein
97f0bc6a1a clean up cruft about --portableFonts and --resourceFonts
--portableFonts exists but does nothing.
--resourceFonts doesn't even exist.

Change-Id: I7880208de4aaa9674ba720b9e70c34c145561ac0
Reviewed-on: https://skia-review.googlesource.com/67800
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2017-11-06 15:09:09 +00:00
Jim Van Verth
90dcce5e50 Add ms display to Viewer.
Change-Id: I6303209d3ff597611ac1a5f558294c6d6fcba670
Reviewed-on: https://skia-review.googlesource.com/67766
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2017-11-03 18:26:34 +00:00
Jim Van Verth
c9e7f9c448 Add sample mouse support to Viewer
Bug: skia:6830
Change-Id: I1a6bb781465a29cec4946462e234d63c48693454
Reviewed-on: https://skia-review.googlesource.com/66543
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2017-11-02 14:25:21 +00:00
Kevin Lubick
b718fbb7f4 Add Pixelbook to tree
Bug: skia:7249
NOTRY=true
Change-Id: I7ab6bc28d567ca5ae75df9c1e56b46c307032024
Reviewed-on: https://skia-review.googlesource.com/66143
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2017-11-02 13:36:21 +00:00
Ethan Nicholas
d1b2eec0d0 API to cache shader binaries between runs of Skia.
This CL does not include an actual implementation of said cache.
Stan is working on the cache implementation on the Android side of
things.

Bug: skia:
Change-Id: Iabe4f19b2dbacaaa1ead8bb3fa68d88c687b9a84
Reviewed-on: https://skia-review.googlesource.com/54780
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-11-02 13:07:41 +00:00
Brian Osman
028b32c9d5 Fix bookmaker compile warning
Bug: skia:
Change-Id: Iee8cf7f1d51f965e19bfc69190f975184bd7ff7a
Reviewed-on: https://skia-review.googlesource.com/66148
Commit-Queue: Cary Clark <caryclark@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
2017-11-01 15:14:40 +00:00
Cary Clark
bef063af14 cataloger
Docs-Preview: https://skia.org/?cl=64900
Bug: skia:6898
Change-Id: Ifbaf909854680a88060f16b1559863cc124aaa7a
Reviewed-on: https://skia-review.googlesource.com/64900
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2017-10-31 20:09:25 +00:00
Leon Scroggins III
f78b55cb94 Simplify SkColorSpace::MakeICC
Rather than restricting the supported ICC types in MakeICC, create any
ICC type that we support, and make the client reject them as necessary
by querying the SkColorSpace::Type.

Remove ICCTypeFlag and replace uses of it with SkColorSpace::Type.

This depends on a change in Chromium
(https://chromium-review.googlesource.com/c/chromium/src/+/741843).
Without that, this change will start allowing non-CMYK images to use
CMYK profiles.

Bug: 727128
Change-Id: I085b4665e49bc80083264496d864cc4cd62ae914
Reviewed-on: https://skia-review.googlesource.com/64841
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-10-31 18:13:04 +00:00
Mike Klein
772f50d980 update valgrind suppressions for revised keepalive thread
Change-Id: I28cc5923866be789d33f4a5f6c0a3be67bf096c3
Reviewed-on: https://skia-review.googlesource.com/65500
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-10-31 15:34:43 +00:00
Yuqian Li
ee6784d268 Reuse more upload_to_android and allow removing flag on Android
Bug: skia:
Change-Id: I8c84b63d01ead32bf4aa71550f6fa84ddfcf480f
Reviewed-on: https://skia-review.googlesource.com/63743
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2017-10-31 14:37:14 +00:00
Yuqian Li
228da62fa7 Output calmbench json in nanobench format
Meanwhile, we also make the bot name more similar to the perf bot.

Bug: skia:
Change-Id: I8b0e6aa2d927aa4a0ce57606345589adb6e920b3
Reviewed-on: https://skia-review.googlesource.com/64082
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2017-10-30 13:52:08 +00:00
Cary Clark
154beea859 Add docs for SkMatrix, SkRect, SkIRect, SkBitmap
Also minor changes to earlier docs.

Many small changes to improve indentation in generated includes.
Added support for matrix math illustrations.

Docs-Preview: https://skia.org/?cl=58500
Bug: skia:6898
Change-Id: I7da58ad55f82d7fd41d19288beb2cd71730fb01f
Reviewed-on: https://skia-review.googlesource.com/58500
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Cary Clark <caryclark@skia.org>
2017-10-26 12:17:36 +00:00
Hal Canary
291af4f17e tools/skp_parser: add some explanitory comments
Change-Id: I38e9a392214394ac3552b05dcc6b27a1ae937e57
Reviewed-on: https://skia-review.googlesource.com/63820
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-10-25 19:27:13 +00:00
Yuqian Li
33e2fad1fe Automatically generate CLs for legacy guard flags
For example, a single command

 $ python add_legacy_flag.py SK_SUPPORT_LEGACY_AA_CHOICE -a /data/android -c ~/chromium/src -g legacyflag

generates the following CLs

 * http://cl/172474970
 * https://chromium-review.googlesource.com/c/chromium/src/+/725820
 * https://googleplex-android-review.git.corp.google.com/#/c/platform/external/skia/+/3088783/


Bug: skia:
Change-Id: Ie9a875f19ac86e0de83a8962ab384b10f8085c17
Reviewed-on: https://skia-review.googlesource.com/61400
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
2017-10-24 19:09:44 +00:00
Chris Dalton
49b7ed3064 skpbench: always reboot instead of unlocking clocks
Bug: skia:
Change-Id: I2589c672823f1da8ea136e90fa083431b4f2e3b2
Reviewed-on: https://skia-review.googlesource.com/62945
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-10-24 15:54:31 +00:00
Ben Wagner
85c6aad62d Add a gdb viewer for skbitmap.
Change-Id: I0d021e5006c3424d1fcb5498385c192d569f2c42
Reviewed-on: https://skia-review.googlesource.com/61860
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2017-10-23 20:45:09 +00:00
Chris Dalton
34d9055c10 skpbench: support pixel phone
Adds a script for pixel hardware with conservatively low clocks.

Bug: skia:
Change-Id: I1ade703ab9f0b4aefc9cf630e3d2efb996afd69f
Reviewed-on: https://skia-review.googlesource.com/62343
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-10-20 17:52:36 +00:00
Chris Dalton
acb549f0ba skpbench: add arguments for path renderer and path cache
Bug: skia:
Change-Id: If31d040b0560c23bfad31e06ef247428bf5bdb6d
Reviewed-on: https://skia-review.googlesource.com/62106
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-10-20 16:42:25 +00:00
Brian Salomon
43f8bf0f78 Move clear-as-draw workaround to GrGLGpu and expose via GrContextOptions.
Bug: skia:7154
Change-Id: I23ffc11dab4a377fbd6b7e4e33722b3fa0793d58
Reviewed-on: https://skia-review.googlesource.com/60681
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-10-18 12:55:06 +00:00
Yuqian Li
84366d22d6 Add concise option to Calmbench bot
As \r doesn't work on bot output, the new output will be much more concise.

TBR: borenet@google.com
Bug: skia:
Change-Id: I190daeae230ea6e0c4bfebc53c6c5c1fd46c503a
Reviewed-on: https://skia-review.googlesource.com/60840
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2017-10-17 21:05:09 +00:00
Hal Canary
754271347a GPU-CTS Program
Add new application, called GPU-CTS (GPU Compatibility Test Suite),
which executes skia gms against OpenGL and Vulkan backends.  Makes use
of googletest library for consistancy with Android CTS programs.

Add googletest to DEPS

gm_knowledge.h header as a stub for future work on validating gm output.

gm_runner can be re-used in other programs.  Talks to Skia and GM with a
simple API.

gpuctx executable wraps gm_runner and googletest together.

Change-Id: Ie7350b22164fa73e44121c39b0f36da4038a700b
Reviewed-on: https://skia-review.googlesource.com/56601
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-10-17 19:01:13 +00:00
Yuqian Li
5be3a8e061 Handle no stash case
Bug: skia:
Change-Id: Ie717f92306d32303cb2efcfe5809bb4d81ae80e0
Reviewed-on: https://skia-review.googlesource.com/60223
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2017-10-17 13:46:12 +00:00
Yuqian Li
c81aaaad0b Try calmbench on bots
Bug: skia:
Change-Id: I869776e3d9d47b4a1a11089f729a0b17581eb9f7
Reviewed-on: https://skia-review.googlesource.com/57400
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2017-10-16 17:33:40 +00:00
Chris Dalton
7a0ebfc033 Add a tooling flag for path mask caching
Adds the flag and a disables caching on the CCPR bots.

Bug: skia:
Change-Id: Icb85e77f89634dda1d419dacac5b8a93340723f0
Reviewed-on: https://skia-review.googlesource.com/59740
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-10-13 22:31:12 +00:00
Kevin Lubick
cccaef1667 Modify skpbench to use newer adb version
Bug: skia:
NOTRY=true
Change-Id: Ib630d352b6922280ef5772e6843f8f031baeffaf
Reviewed-on: https://skia-review.googlesource.com/59161
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2017-10-13 13:13:47 +00:00
Greg Daniel
177e695589 Add flag on GrBackendTexture to say whether texture is mipped or not
Bug: skia:
Change-Id: Ia684e3daf779ec2feaaec64c04dabf5cb03cd07a
Reviewed-on: https://skia-review.googlesource.com/57821
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-10-12 17:02:41 +00:00
Brian Salomon
0b4d8aa108 Add benchmark for comparing multitexturing to non-multitexturing image draws.
Allows benchmarks to override GrContextOptions.

Removes the ability to use the same GrContext for all benchmarks in a config.

Change-Id: I5ab9f6e81055451ac912a66537843d1a49f3b479
Reviewed-on: https://skia-review.googlesource.com/34080
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-10-11 20:32:49 +00:00
Cary Clark
884dd7d428 General clean up on bookmaker.
Command line runs without error for
SkBitmap, SkPath, SkRect, SkIRect,
SkPixmap, SkCanvas.

Docs-Preview: https://skia.org/?cl=57112
TBR: caryclark@google.com
Bug: skia:6898
Change-Id: I73b69ae8ffdf0a1e6bc187dc8a9dfb28f7766faa
Reviewed-on: https://skia-review.googlesource.com/57112
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
2017-10-11 15:26:37 +00:00
Brian Osman
5fbd18370f Add NV_fence support to get better timing from ANGLE ES2
Previously, we were reporting numbers that were far too low, because
we were getting way ahead of the GPU, and then spending all of our time
in finish (which isn't timed). That led to us picking very high loop
counts, so our wall clock time to run nanobench was very high, and our
reported times were very low. This fixes all of that, and removes all
the spam about not having fence support.

Change-Id: Ib9dfc043da82bf8ee6645b8627cfade66eb9864e
Reviewed-on: https://skia-review.googlesource.com/58001
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-10-10 21:13:03 +00:00
Brian Osman
e6984a0fb5 Fix bugs with fence sync API on iOS devices
- Actually request extension version of fence sync functions
- Fix incorrect usage of dlopen/dlsym
- Also fixed same bugs in Mac code, although we never hit that
  code path.

Should fix iOS devices, giving more accurate (and less spammy)
results from nanobench.

Bug: skia:
Change-Id: I3456b301ef9b0b6559160d1d21c77bd93139d39a
Reviewed-on: https://skia-review.googlesource.com/57740
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-10-10 19:05:13 +00:00
Ben Wagner
63fd760a37 Remove trailing whitespace.
Also adds a presubmit to prevent adding trailing whitespace to source
code in the future.

Change-Id: I41a4df81487f6f00aa19b188f0cac6a3377efde6
Reviewed-on: https://skia-review.googlesource.com/57380
Reviewed-by: Ravi Mistry <rmistry@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-10-09 21:20:34 +00:00
Ben Wagner
29380bdd56 Remove carriage returns.
Also add a presubmit so they don't get added to source code.

Change-Id: I6a85c6a934b1068a63646a0dcc0d3a08baa96ced
Reviewed-on: https://skia-review.googlesource.com/57110
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-10-09 20:41:14 +00:00
Cary Clark
7fc1d12e67 first cut at SkRect, SkIRect documentation
All functions should have descriptions, examples, cross-references.
References and spelling have been checked.
More work to do creating and organizing topics.

Docs-Preview: https://skia.org/?cl=56140
Tbr: caryclark@google.com
Bug: skia:6898
Change-Id: I9d1e55d04ab64874c33cac8b91534aa192c2f545
Reviewed-on: https://skia-review.googlesource.com/56140
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
2017-10-09 19:36:14 +00:00
Ben Wagner
eeadcc1b5c Add Win Clang Vulkan builds.
Fix Clang compiler warning.

Change-Id: Ic6f5b161058d1ed2df45e12b72dbff3b486ec986
Reviewed-on: https://skia-review.googlesource.com/56740
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
2017-10-07 18:27:40 +00:00
Cary Clark
bc5697d3b1 starting next gaggle of docs
starting next gaggle of docs

Docs-Preview: https://skia.org/?cl=50264
Bug: skia:6898
Change-Id: I639795b55c0c96b2efccac13cb67592f055a75a2
Reviewed-on: https://skia-review.googlesource.com/50264
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2017-10-04 18:50:33 +00:00
Mike Klein
9a3478bf82 ok, add a8 dst support
Change-Id: Ib7f855c833c8e73f448de7c8a75f59b1a0880874
Reviewed-on: https://skia-review.googlesource.com/53600
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-09-29 20:08:34 +00:00
Yuqian Li
980379d475 Add a new calmbench tool for noiseless nanobench
This tool can quickly check all nanobench tests including svgs
and skps (<5 minutes for CPU, ~30 minutes for GPU) and find
significant performance regressions without much noise.

This tool is not only faster (lower latency to get regression
alerts), but also more sensitive compared to our k-means and
step-fitting bots (especially for changes that only affect very
few benches). It may still miss some regressions, but the
regressions reported should be valid with very high probability.

Bug: skia:
Change-Id: I02115e6c5ab630e4c56b2087ffeb5cae1d4a618e
Reviewed-on: https://skia-review.googlesource.com/50060
Commit-Queue: Yuqian Li <liyuqian@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2017-09-29 16:00:34 +00:00
Yuqian Li
58e23039bd Remove unused functions get_preferred_size
Bug: skia:
Change-Id: I6a5b5d96ad48b84b07d2e56fbabb870a90c62a97
Reviewed-on: https://skia-review.googlesource.com/51460
Reviewed-by: Yuqian Li <liyuqian@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2017-09-26 20:02:16 +00:00
Mike Reed
592273965a Revert "Revert "migrate to sk_sp for SkFontMgr API""
This reverts commit f40ae1a4b5.

Bug: skia:
Change-Id: I752606de92ea405d6e50219c98030409b00a2841
Reviewed-on: https://skia-review.googlesource.com/51160
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-09-26 14:05:18 +00:00
Mike Reed
f40ae1a4b5 Revert "migrate to sk_sp for SkFontMgr API"
This reverts commit 4bf296be28.

Reason for revert: need guard for flutter

Original change's description:
> migrate to sk_sp for SkFontMgr API
> 
> Bug: skia:
> Change-Id: I1bf2a13537f67938cdc9956080065d10ea0bd1d8
> Reviewed-on: https://skia-review.googlesource.com/48740
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Reviewed-by: Ben Wagner <bungeman@google.com>

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

Change-Id: Ib0b2d00fcbcdb6131444f94d1046df6dae24f551
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/50940
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-09-25 20:00:41 +00:00
Mike Reed
4bf296be28 migrate to sk_sp for SkFontMgr API
Bug: skia:
Change-Id: I1bf2a13537f67938cdc9956080065d10ea0bd1d8
Reviewed-on: https://skia-review.googlesource.com/48740
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2017-09-25 19:45:09 +00:00
Ben Wagner
67e3a30f24 Add some font fallback to SkShaper.
Change-Id: I92d58071dc3a540e21bbe55267963504ff9da75b
Reviewed-on: https://skia-review.googlesource.com/42600
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-09-22 19:57:08 +00:00
Brian Osman
c49d11e065 Turn on GPU threading by default to get better test/perf coverage
Explicitly disable it on PixelC. This is arbitrary, so we continue to
get coverage of the single-threaded code.

Bug: skia:
Change-Id: I0ac91f7ca58652933db452720f353068cf2d0f2d
Reviewed-on: https://skia-review.googlesource.com/50000
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-09-22 15:17:18 +00:00
Mike Klein
58628fdc33 ok, add via_skp
This is the same sort of thing as DM's serialize via.
It draws into a picture, serializes that, deserializes that,
and then draws that picture into the destination.

Change-Id: Ib58748786bc01fd8a0cb9355a2fd334311c361bf
Reviewed-on: https://skia-review.googlesource.com/49902
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-09-21 21:10:08 +00:00
Cary Clark
6fc5041adb feedback
feedback from include review

Docs-Preview: https://skia.org/?cl=49260
Bug: skia: 6898
Change-Id: Ic60980dfe53d14fd8c6973ef2f4dabb6b650cdd8
Reviewed-on: https://skia-review.googlesource.com/49260
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2017-09-21 16:50:10 +00:00
Jim Van Verth
446cc84b55 Fix MSAN compile error
Change-Id: I2ac07f2da5e08a3dbefc59fb860d69817906df41
Reviewed-on: https://skia-review.googlesource.com/49441
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2017-09-20 19:42:09 +00:00
Jim Van Verth
32bbf377e6 Fix TSAN issue with atlas expansion.
Removes SkString-related malloc from DM crash handler, and adds null check in ProxyRefTest.

Bug: skia:3550
Change-Id: I143c532b5d231a426b1a96b854e1effd6379b673
Reviewed-on: https://skia-review.googlesource.com/48440
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2017-09-20 17:46:59 +00:00
Cary Clark
9174bda24a work on generation of rect, bitmap, matrix markup
TBR=caryclark@google.com
Bug: skia:6898
Change-Id: I501d87341afa2f8d548b4d02415375032a46e96e
Reviewed-on: https://skia-review.googlesource.com/47420
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
2017-09-19 22:04:19 +00:00
Mike Klein
fe69f9a50a Make GrFakeRefObj::fNext atomic.
This lets you make them on different threads simultaneously.

Change-Id: Ife4228ae4721b35c718ece1a30cc5686f3690c13
Reviewed-on: https://skia-review.googlesource.com/48800
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-09-19 20:58:49 +00:00
Cary Clark
e4aa37128f missing description for FontMetricFlags
rearrange class descriptions to make them
appear consistently inside the #Class
declaration in the .bmh files.

Look for the descriptions there and
regenerate the .md files.

Docs-Preview: https://skia.org/?cl=46523
TBR=caryclark@google.com
Bug: skia: 6898
Change-Id: I00a176428725ef27667d3f23d76d6b7ff0cfced1
Reviewed-on: https://skia-review.googlesource.com/46523
Commit-Queue: Cary Clark <caryclark@google.com>
Reviewed-by: Cary Clark <caryclark@skia.org>
2017-09-15 14:03:53 +00:00
Chris Dalton
2d802ddba6 Simple script to measure SurfaceFlinger fps
Bug: skia:
Change-Id: I063c832f6d292e5e9f615c881e3325eb4ab9cdfa
Reviewed-on: https://skia-review.googlesource.com/44681
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
2017-09-14 20:55:21 +00:00
Cary Clark
7265ea32e5 remove need for command flags cast
TBR=mtklein@google.com
Bug: skia: 6898
Change-Id: I1c83fe67cbfb978f15ebcbb9081ac4d4a8f00e4a
Reviewed-on: https://skia-review.googlesource.com/46680
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
2017-09-14 17:32:31 +00:00
Cary Clark
d0530ba8f4 wip pixmap docs
wip pixmap docs

Docs-Preview: https://skia.org/?cl=42522
Bug: skia: 6898
Change-Id: I85947bc36ea057ed008b87d7bef2efa82d7c89ad
Reviewed-on: https://skia-review.googlesource.com/42522
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
2017-09-14 16:05:21 +00:00
Jim Van Verth
a950b63b44 Add support for additional textures in GrDrawOpAtlas
Step two in supporting growable/shrinkable atlases.

Bug: skia:3550
Change-Id: I0cdec2a9f59cc8ced071bfeec2f8ed5a228c4b7a
Reviewed-on: https://skia-review.googlesource.com/43260
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-09-12 17:16:00 +00:00
Ravi Mistry
a6b646986b Break up the prefix to make some presubmits stop complaining
NoTry: true
Bug: skia:7016
Change-Id: If2f405d8309fc63d8592a97b668f826cd606097b
Reviewed-on: https://skia-review.googlesource.com/45801
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2017-09-12 15:24:00 +00:00
Ravi Mistry
ff72a0857f Add SK_DEBUG to SkUserConfig.h from upload_to_android.py if "--debug" flag is specified
Example uploaded change: https://googleplex-android-review.git.corp.google.com/#/c/platform/external/skia/+/2884102/

NoTry: true
Bug: skia:7016
Change-Id: Ia213e04532c7e4b8c90d01b8138a720f267bfa56
Reviewed-on: https://skia-review.googlesource.com/44822
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2017-09-12 13:54:30 +00:00
Ravi Mistry
a2bdf005f3 Add a "[DO NOT SUBMIT]" prefix to the uploaded Android change
Since the script cannot do anything to prevent submission via the API it might
help to atleast add a "[DO NOT SUBMIT]" prefix.

NoTry: true
Bug: skia:7016
Change-Id: I825f28947df85a4d54ead764f8d363e12f83fbfb
Reviewed-on: https://skia-review.googlesource.com/44840
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2017-09-11 15:28:05 +00:00
Ravi Mistry
b816322422 Sync only the current branch and use a shallow checkout
Tried this out locally and it shrunk the size of the checkout from 1010M
to 586M and shaved a few seconds off the running time as well.

NoTry: true
Bug: skia:7016
Change-Id: I472712e88d2cf30f0cfd71a373630d12a4937684
Reviewed-on: https://skia-review.googlesource.com/44820
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2017-09-11 15:23:00 +00:00
Mike Klein
11cd4640d4 explicitly set user email to <self>@google.com
I have my global user.email set to mtklein@chromium.org,
and Android's Gerrit won't let me upload that way.

Change-Id: Id5c1a0843fa7912b67ef6f32c0e262ca85a9139f
Reviewed-on: https://skia-review.googlesource.com/44500
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-09-08 22:57:17 +00:00
Ravi Mistry
e1e47b70e0 Script that uploads a specified Skia change to Android's Gerrit instance
This script does the following:
* Downloads the repo tool.
* Inits and checks out the bare-minimum required Android checkout.
* Sets the required git config options in external/skia.
* Cherry-picks the specified Skia patch.
* Modifies the change subject to append a "Test:" line required for presubmits.
* Uploads the Skia change to Android's Gerrit instance.

After the change is uploaded to Android, developers can trigger TH and download binaries (if required) after runs complete.
The script re-uses the workdir when it is run again. To start from a clean slate delete the workdir.

Timings:
* ~1m15s when using an empty/non-existent workdir for the first time.
* ~15s when using a workdir previously populated by the script.

Example usage:
  $ python upload_to_android.py -w /repos/testing -c 44200

Bug: skia:7016
Change-Id: I9a34b05de7f119a2c321687f7391add7e8cfd7ba
Reviewed-on: https://skia-review.googlesource.com/44380
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-09-08 21:19:20 +00:00
Chong Zhang
c1868cdf96 add heic extension to DM test
b/64077740

Change-Id: Ice0232d9be7ed4ba0421400b3b93ecd58d69f45f
Reviewed-on: https://skia-review.googlesource.com/43360
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-09-07 20:37:50 +00:00
Robert Phillips
276066b517 [MDBViz] Switch from a QListView to a QTreeView for the ops
This lets us open & close groups and automates the hierarchy.

Change-Id: Ib6f0850a49b793d824fc25aa16be78e6a1a93d9e
Reviewed-on: https://skia-review.googlesource.com/43280
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-09-06 23:12:28 +00:00
Robert Phillips
deaf568e07 Solidify Model/View split
Change-Id: Iecf034feaa009002b5f09c47052c915d22aec0e4
Reviewed-on: https://skia-review.googlesource.com/43040
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-09-06 20:46:01 +00:00
Robert Phillips
5fccf9d801 [MDBViz] Add tear off windows for the op list & main canvas window
Change-Id: I4086a17eafecccaf0bac34c850c249a5e4efc719
Reviewed-on: https://skia-review.googlesource.com/42524
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-09-06 01:02:22 +00:00
Ben Wagner
e000173f43 Add variation support to SkShaper.
Sets the variation position of the SkTypeface on th hb_font. This allows
for correct shaping of variation fonts. This also splits out the
creation of hb_font from SkTypeface for clarity.

Change-Id: I8e3476dea0f18f1f7cb3fe757a04f99f0ab6c0fe
Reviewed-on: https://skia-review.googlesource.com/41742
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-09-05 15:05:44 +00:00
Ben Wagner
2868b78f46 Improve utf16/utf8 mismatch with ubidi.
The ubidi code only works with utf16 and SkTextBlob only with utf8. This
requires translating indexes. The current code starts cold when
translating indexes for each run, leading to taking O(n^2) time on the
number of runs. However, since this code is iterating over the runs in
order and each run begins where the last left off, simply keeping the
previous run's utf8 and utf16 end positions and using them as the next
starting position makes this O(N).

Change-Id: I921a87511fb4cdf5f6e92cd483959cf758d95306
Reviewed-on: https://skia-review.googlesource.com/41503
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-09-05 14:44:15 +00:00
Robert Phillips
a6d2d708d7 Add gn plumbing for mdbviz tool
Change-Id: I06e6b63c2742da069f48ff5d7defafc63a485af7
Reviewed-on: https://skia-review.googlesource.com/41842
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-09-05 13:57:44 +00:00
Cary Clark
ce1012403b bookmaker spelling with fixed linux build
Work on spell-checker
to identify errors and
isolate more concepts
requiring definitions.

fix linux build

Docs-Preview: https://skia.org/?cl=42103
Docs-Preview: https://skia.org/?cl=41180
Tbr: caryclark@google.com
Bug: skia: 6898
Change-Id: Id939b0c2915c22e0fa1b15623c1a56fbe9d4051d
Reviewed-on: https://skia-review.googlesource.com/42103
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
2017-09-01 20:10:51 +00:00
Cary Clark
e040384627 Revert "wip spelling mania"
This reverts commit da65a0489a.

Reason for revert: fails to build on linux

Original change's description:
> wip spelling mania
> 
> Work on spell-checker
> to identify errors and
> isolate more concepts
> requiring definitions.
> 
> Docs-Preview: https://skia.org/?cl=41180
> TBR: reed@google.com
> Bug: skia: 6898
> Change-Id: I0759beb42eaf6095908a9bd7decfcd0026253609
> Reviewed-on: https://skia-review.googlesource.com/41180
> Reviewed-by: Cary Clark <caryclark@skia.org>
> Commit-Queue: Cary Clark <caryclark@skia.org>

TBR=caryclark@google.com,caryclark@skia.org

Change-Id: I173e50ea5b51273cd316ac9964af3a498b5300e4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia: 6898
Reviewed-on: https://skia-review.googlesource.com/42140
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
2017-09-01 19:21:40 +00:00
Cary Clark
da65a0489a wip spelling mania
Work on spell-checker
to identify errors and
isolate more concepts
requiring definitions.

Docs-Preview: https://skia.org/?cl=41180
TBR: reed@google.com
Bug: skia: 6898
Change-Id: I0759beb42eaf6095908a9bd7decfcd0026253609
Reviewed-on: https://skia-review.googlesource.com/41180
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
2017-09-01 18:19:37 +00:00
Jim Van Verth
dbb24efcc5 Get viewer running on iOS
Bug: skia:
Change-Id: Ic8b25ca2ecf51cfc190ac01bc9282396905a33b3
Reviewed-on: https://skia-review.googlesource.com/40862
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2017-09-01 17:30:57 +00:00
Robert Phillips
bdda0ba155 Cosmetic changes to GrDrawOpAtlas
It looks like we won't be going in the direction of:

https://skia-review.googlesource.com/c/skia/+/35962 (Allow GrDrawOpAtlas to grow & shrink)

Pull out what is worth keeping.

TBR=bsalomon@google.com

Change-Id: Ia14c3c621e7b1d2d7f303a455a3e4d9660af5f6e
Reviewed-on: https://skia-review.googlesource.com/41362
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2017-09-01 16:24:48 +00:00
Mike Klein
022cfa258d Add FIFO thread pool, use it for most things.
We like a LIFO default thread pool in tools like DM for better
memory/time locality... the bots use less memory this way, and
generally run faster.

But most use cases want a FIFO queue, so that they can get going
on the next parts of early work while later work is still running.

This splits the implementation into one using SkTArray and pop_back
for LIFO, and a new one using std::deque and pop_front for FIFO.

Change-Id: Ief203b6869a00f1f8084019431a781d15fc63750
Reviewed-on: https://skia-review.googlesource.com/41849
Commit-Queue: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Yuqian Li <liyuqian@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-09-01 16:19:47 +00:00
Mike Klein
5f13bef501 ok, rate limit forking
On Macs the user process limit is low, in the hundreds, and it's a
little annoying to mysteriously find other programs fail to start
because ok is greedily slurping up all the available process capacity.

On Linux the user process limit is up in the ten-thousands, so I don't
expect this to matter there, even on Android.  I haven't seen any
significant speed difference imposing a default ncpus limit.

Change-Id: Id284723808074441710c0436acbd75ab1c6bbbb3
Reviewed-on: https://skia-review.googlesource.com/41840
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-09-01 15:40:37 +00:00
Ben Wagner
a25fbef56a Add bidi to SkShaper.
Change-Id: Iaab9a1d5091a3b157a582b7e8c3261a6c3283ffc
Reviewed-on: https://skia-review.googlesource.com/40778
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-08-31 14:18:31 +00:00
Brian Osman
195c05b6d5 Move several GrContextOptions fields behind GR_TEST_UTILS
Bug: skia:
Change-Id: I35bc08ad72fb94d8e47fe342d314c4496b954226
Reviewed-on: https://skia-review.googlesource.com/40881
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-08-30 19:35:27 +00:00
Robert Phillips
ad8a43f769 DeferredDisplayList API proposal
Chrome would like to perform cpu-side preprocessing for gpu draws in parallel. 
They do not want to go through a picture (since they have their own display list format).


The general idea is that we add a new SkDeferredDisplayListRecorder class to
perform all of Ganesh's cpu-side preprocessing ahead of time and in parallel.

The SkDDLRecorder operates like SkPictureRecorder. The user can get an SkCanvas
from the SkDDLRecorder and feed it draw operations. Once finished, the user
calls 'detach' to get an SkDeferredDisplayList. All the work up to and 
including the 'detach' call can be done in parallel and will not touch
the GPU. To actually get pixels the client must call SkSurface::draw(SkDDL)
on an SkSurface that is "compatible" with the surface characterization
initially given to the SkDDLMaker.

The surface characterization contains the minimum amount of information Ganesh needs 
to know about the ultimate destination in order to perform its cpu-side work
(i.e., caps, width, height, config).



Change-Id: I75faa483ab5a6b779c8de56ea56b9d90b990f43a
Reviewed-on: https://skia-review.googlesource.com/30140
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-08-30 19:25:47 +00:00
Brian Osman
c0e66273f8 Make AA hairline renderer non-optional
Change-Id: I0d4166a4e9ea894f479755f9f7137c5941cf8a22
Reviewed-on: https://skia-review.googlesource.com/41081
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-08-30 19:05:27 +00:00
Mike Klein
94fef59239 use fcntl() to lock/unlock fds
This is portable back to older Android NDK APIs.
Seems to work fine.

Change-Id: I1f121f372d376909011ffd7063b73cbe50402a5f
Reviewed-on: https://skia-review.googlesource.com/40688
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-08-30 18:55:47 +00:00
Mike Klein
1b4602bd9b ok, backtrace support on Android
This adds a fallback backtracer for use on Android where <execinfo.h>
ins't present, instead using <unwind.h> to unwind and <dlfcn.h> to
lookup function names and addresses.

lockf() wasn't available until NDK API 24, so I've just no-op'd file
locking on older targets.  I tried switching from lockf() to flock(),
but flock() didn't see to _do_ anything, neither on Android nor on my
Mac laptop.  I think I should be able to use the lower-level fcntl()
APIs to restore file locking uniformly in a follow-up.  The upshot is
until then, we'll have interlaced logs and stack traces on Android
devices unless you set ndk_api=24 in GN.

We need to add a couple build flags to make backtraces useful:

   * -funwind-tables makes the call to _Unwind_Backtrace() actually
     traverse the call stack.  This is a small extra binary size cost.
   * -rdynamic makes symbols linked into the main executable visible
     to dladdr().  We do this on Linux already for the same reason.

Here's an example where I made aaxfermodes call SK_ABORT():

    650 ok, 1 crashed
    caught signal SIGABRT while running 'aaxfermodes'
        0x76ed936288 [unknown]+308
        0x76eec014e0 [unknown]+510811706592
        0x76ed367b2c tgkill+8
        0x76ed364f50 pthread_kill+68
        0x76ed31ff5c raise+28
        0x76ed318814 abort+56
        0x76edebd070 sk_out_of_memory()+12
        0x76ed99f664 AAXfermodesGM::draw_pass(SkCanvas*, AAXfermodesGM::DrawingPass)+96
        0x76ed99f4e4 AAXfermodesGM::onDraw(SkCanvas*)+36
        0x76ed9e8550 skiagm::GM::drawContent(SkCanvas*)+224
        0x76ed9e82ac skiagm::GM::draw(SkCanvas*)+288
        0x76ed93b10c GMStream::GMSrc::draw(SkCanvas*)+96
        0x76ed937b08 SWDst::draw(Src*)+284
        0x76ed936ca0 [unknown]+112
        0x76ed939b4c ForkEngine::spawn(std::function<Status ()>)+88
        0x76ed934d00 main+2200
        0x76ed316598 __libc_init+92
        0x76ed93434c [unknown]+510791992140

Change-Id: Ica4849d99a3b97f48d778f4c15a7fa36275b8133
Reviewed-on: https://skia-review.googlesource.com/40802
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-08-30 17:50:07 +00:00
Brian Salomon
f3b46e5193 Rename methods and enum on SkClipStack::Element to indicate "device space"
Change-Id: I83056843b530f76590f755f97e3d0a5a58f371fa
Reviewed-on: https://skia-review.googlesource.com/39402
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-08-30 15:58:12 +00:00
Brian Osman
f9810666bd Threaded generation of software paths
Re-land of: https://skia-review.googlesource.com/36560

All information needed by the thread is captured by the prepare
callback object, the lambda captures a pointer to that, and does the
mask render. Once it's done, it signals the semaphore (also owned by the
callback). The callback defers the semaphore wait even longer (into the
ASAP upload), so the odds of waiting for the thread are REALLY low.

Also did a bunch of cleanup along the way, and put in some trace markers
so we can monitor how well this is working.

Traces of a GM that includes GPU and SW path rendering (path-reverse):

Original:
    https://screenshot.googleplex.com/f5BG3901tQg.png
Threaded, with wait in the callback (notice pre flush callback blocking):
    https://screenshot.googleplex.com/htOSZFE2s04.png
Current version, with wait deferred to ASAP upload function:
    https://screenshot.googleplex.com/GHjD0U3C34q.png
Bug: skia:
Change-Id: Idb92f385590749f41328a9aec65b2a93f4775079
Reviewed-on: https://skia-review.googlesource.com/40775
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-08-30 15:27:42 +00:00
Cary Clark
a523d2d155 fix param return descriptions
enforce that param and return
descriptions are phrases (begin
with lower case, no trailing
period).

Docs-Preview: https://skia.org/?cl=40767
Bug: skia: 6898
Change-Id: Ib5f2a02441673f71c0780d81c5e4c61200a678e3
Reviewed-on: https://skia-review.googlesource.com/40767
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2017-08-30 13:16:12 +00:00
Cary Clark
73fa972d0b work on path
Work on SkPath.h documentation; fixed self-consistency
bugs identified by bookmaker. Fixed a couple of
minor typos in SkPath.h itself.

Also brought SkPaint and SkCanvas docs up to date.

TBR=reed@google.com
Docs-Preview: https://skia.org/?cl=39040
Bug: skia: 6898
Change-Id: Id89d4e2fa7fb6ee2e3cbec7ea762e06308b67d8b
Reviewed-on: https://skia-review.googlesource.com/39040
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Cary Clark <caryclark@skia.org>
2017-08-30 11:06:02 +00:00
Mike Klein
84c5435bcf print running task in both ok_log()
Change-Id: Ie69421ed36d596cb8c40f9858fac370ceba18c87
Reviewed-on: https://skia-review.googlesource.com/40022
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-08-30 00:18:21 +00:00
Brian Osman
8b0f265f70 Always include the default path renderer in the chain
This (plus SW) ensures that we can always draw any path. Changed the path
renderer command line flags so that 'default' means everything but CCPR,
and 'All' really means 'every path renderer'.

Bug: skia:
Change-Id: I2801d1c50ab939f23efb4600e0f90e6add2891b7
Reviewed-on: https://skia-review.googlesource.com/40221
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-08-29 19:37:32 +00:00
Brian Salomon
3416969605 Revert "Revert "Revert "Revert "Add GrTextureOp and use to implement SkGpuDevice::drawImage[Rect]() when possible""""
This reverts commit a184ac7e0c.

Change-Id: I2a4a1b713fd998ba33a5f85a34be1645438a7ac9
Reviewed-on: https://skia-review.googlesource.com/39400
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-08-28 20:02:16 +00:00