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>
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>
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>
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>
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>
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>
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>
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=46523TBR=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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>