aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/nanobench.cpp
Commit message (Collapse)AuthorAge
* update software DM/nanobench configs for color testingGravatar Mike Klein2018-06-19
| | | | | | | | | | | | | | - Rename 'srgbnl' to just 'srgb'. - Add 'narrow' and 'enarrow' for testing a gamut narrower than sRGB. Tested by running xfermodes2 in DM... all look different, what a mess. I also ran a few nanobenches and they seemed somewhat sane. Change-Id: Iacdc391dc0eef4153a76f5b4f78d72c57a4371ee Reviewed-on: https://skia-review.googlesource.com/135871 Commit-Queue: Mike Klein <mtklein@chromium.org> Auto-Submit: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Osman <brianosman@google.com>
* remove "srgb" config from DM,nanobenchGravatar Mike Klein2018-06-07
| | | | | | | | | | | | | | | | | | Now that "srgb" is broken I don't want to accidentally run it. "srgbnl" if of course identical, and not broken so much as simply not yet working. :) While here, simplify the configs we run in nanobench too, eliminating 565 and moving F16 to GCE-only (i.e. fast, abundant machines). Similarly, remove "adobe" VIA that doesn't use Adobe RGB correctly... Change-Id: Ic295dec97a2caadadbe8500655243db36dd2c43d Reviewed-on: https://skia-review.googlesource.com/132932 Commit-Queue: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Osman <brianosman@google.com>
* Dest color space no longer impacts mipmaps or texture samplingGravatar Brian Osman2018-06-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PS5: Removes SkDestinationSurfaceColorMode, tracking of mipmap mode on GrTexture, sRGB decode state per-texture. Because we were often choosing sRGB configs for RGB color types, legacy rendering would then be incorrect (too dark). So... PS7: Stops ever using sRGB pixel configs when translating image info or color type. Also removes a bunch of GrCaps bits and a GrContextOption that are no longer relevant. PS9: Adjusts surface creation unit test expectations, and changes the raster rules accordingly. At this point, sRGB configs are (obviously) going to be broken. Locally, I ran 8888, gl, and the gbr- versions of both. Across all GMs x configs, there are 13 diffs. 12 are GMs that create surfaces with a color-space attached (and thus, the offscreen is no longer getting sRGB pixel config). The only remainder constructs an SkPictureImageGenerator, (with an attached color space) and renders it to the gbr-gl canvas, which triggers a a tagged surface inside the generator. Bug: skia: Change-Id: Ie5edfa157dd799f3121e8173fc4f97f6c8ed6789 Reviewed-on: https://skia-review.googlesource.com/131282 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Remove SK_SUPPORT_GPU checks in tool-only codeGravatar Brian Osman2018-05-31
| | | | | | | | | | | | | | | | Most of this is (obviously) not necessary to do, but once I started, I figured I'd just get it all. Tools (nanobench, DM, skiaserve), all GMs, benches, and unit tests, plus support code (command line parsing and config stuff). This is almost entirely mechanical. Bug: skia: Change-Id: I209500f8df8c5bd43f8298ff26440d1c4d7425fb Reviewed-on: https://skia-review.googlesource.com/131153 Reviewed-by: Mike Klein <mtklein@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Remove ColorCodecBenchGravatar Brian Osman2018-05-23
| | | | | | | | | | | This wasn't being run (AFAICT) and was built on pre-skcms color management. Change-Id: I506e8767f716bc6e4590ce255c5e40f1064fc152 Reviewed-on: https://skia-review.googlesource.com/129644 Commit-Queue: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@google.com> Auto-Submit: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* Make GrCaps and GrShaderCaps private.Gravatar Brian Salomon2018-05-11
| | | | | | | | | Moves getCaps() from GrContext to GrContextPriv and removes unused refCaps(). Change-Id: Ic6a8951b656c0d1b2773eae73bff8e88af819866 Reviewed-on: https://skia-review.googlesource.com/127389 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Revert "allow timing in release-with-assert builds"Gravatar Mike Klein2018-03-30
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 97708e59ce483f4f15706ab91101bbc4c75392ba. Reason for revert: pain in the butt Original change's description: > allow timing in release-with-assert builds > > Change-Id: Ia85811bc113f951f3d7791371a5f97b49d156f70 > Reviewed-on: https://skia-review.googlesource.com/117368 > Reviewed-by: Brian Osman <brianosman@google.com> > Commit-Queue: Mike Klein <mtklein@chromium.org> TBR=mtklein@chromium.org,brianosman@google.com Change-Id: I4282f5e887c7ec3198adde11a7300552644d22de No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/117441 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* allow timing in release-with-assert buildsGravatar Mike Klein2018-03-30
| | | | | | | Change-Id: Ia85811bc113f951f3d7791371a5f97b49d156f70 Reviewed-on: https://skia-review.googlesource.com/117368 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Remove legacy GrContext factories function and supporting code/types.Gravatar Brian Salomon2018-03-23
| | | | | | | Change-Id: I437a4a0a58bf70ea1b8b0659b099a2af2bfa64fe Reviewed-on: https://skia-review.googlesource.com/116197 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* BUILD: build when !skia_use_expatGravatar Hal Canary2018-03-22
| | | | | | | Change-Id: I17a695c64be0e2081ad4937b23038b7ce88ae293 Reviewed-on: https://skia-review.googlesource.com/115988 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Hal Canary <halcanary@google.com>
* Add GM configs that test rendering to a GL backend texture and render targetGravatar Brian Salomon2018-03-09
| | | | | | | | | This also adds GrGpu::create/deleteTestingOnlyBackendRenderTarget. Implemented in GL only for now. Change-Id: I9e5fdc953c4a249959af89e08332f520cefe9d90 Reviewed-on: https://skia-review.googlesource.com/113305 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Move internal calls from GrContext to GrContextPrivGravatar Robert Phillips2018-03-06
| | | | | | | | | | A mechanical bulk move just to get these out of the public API. TBR=bsalomon@google.com Change-Id: I813efbd54a09dd448275697c0e50947753a5cfd3 Reviewed-on: https://skia-review.googlesource.com/112262 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Revert "Revert "Revert "Revert "Revert "Revert "Redefine the meaning of ↵Gravatar Brian Salomon2018-02-03
| | | | | | | | | | | | | sample counts in GPU backend."""""" This reverts commit 3a2cc2c2ec124de36d2544b2a523ef1dd317ca32. Fix code with samplecnt=0 that slipped in between trybots/CQ and landing of previous version Change-Id: Iab19f2e8d1e9901601c8c76244d7a88c5d707fab Reviewed-on: https://skia-review.googlesource.com/103181 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Revert "Revert "Revert "Revert "Redefine the meaning of sample ↵Gravatar Brian Salomon2018-02-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | counts in GPU backend.""""" This reverts commit 5bb82cbecd740d21b92e8d2944280ab6eb6af7a6. Reason for revert: <INSERT REASONING HERE> Original change's description: > Revert "Revert "Revert "Revert "Redefine the meaning of sample counts in GPU backend."""" > > This reverts commit 18c52a7b52211de5d0dcd86dc048adef758c6c75. > > Also relands "More sample count cleanup:" and "Add new GrContext queries for imagability, surfacability, and max sample count of color types" > > > Bug: skia: > Change-Id: I4028105a3a1f16ce3944e134619eb6245af6b947 > Reviewed-on: https://skia-review.googlesource.com/102940 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> TBR=egdaniel@google.com,bsalomon@google.com Change-Id: Idee23be2f1719f0bdc9305043e95a2d589bee8d1 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/103220 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Revert "Revert "Revert "Redefine the meaning of sample counts in GPU ↵Gravatar Brian Salomon2018-02-02
| | | | | | | | | | | | | | | backend."""" This reverts commit 18c52a7b52211de5d0dcd86dc048adef758c6c75. Also relands "More sample count cleanup:" and "Add new GrContext queries for imagability, surfacability, and max sample count of color types" Bug: skia: Change-Id: I4028105a3a1f16ce3944e134619eb6245af6b947 Reviewed-on: https://skia-review.googlesource.com/102940 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Revert "Revert "Redefine the meaning of sample counts in GPU backend."""Gravatar Brian Salomon2018-02-02
| | | | | | | | | | | | | | | | | | | | This reverts commit d0d7270fcc32546005b8e847df516cb11592cd30. Revert "More sample count cleanup:" This reverts commit d653cac70ed17983125ceed053138c09f1401846. Revert "Add new GrContext queries for imagability, surfacability, and max sample count of color types" This reverts commit 85ae7159c9c8a9186a4c7e74304eabb35bca9a79. Need to understand NVPR perf changes before relanding Change-Id: I0db075fb42438ef2a1f9885df184dce52892ac4b Reviewed-on: https://skia-review.googlesource.com/102780 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* More sample count cleanup:Gravatar Brian Salomon2018-02-01
| | | | | | | | | | | | | | | | | | | rename getSampleCount -> getRenderTargetSampleCount because it will return 0 when a config is not renderable but *is* supported as a texture format. (Old name kept around until Chrome stops calling it) Add virtual GrCaps::maxRenderTargetSampleCount(GrPixelConfig). Devirtualize isConfigRenderable() and implement as maxRTSC != 0. Separate implementation for version with bool withMSAA param to be removed after Flutter is updated to no longer call. Consolidate various file static GrSurfaceDesc validators fns into GrCaps::validateSurfaceDesc(). Bug: skia: Change-Id: Ie30a291aa027e910df3bd90fac8518ccdb39e53f Reviewed-on: https://skia-review.googlesource.com/102141 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Revert "hide picture virtuals (no public callers)"Gravatar Mike Klein2018-01-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 8005bff7e631a269f0dfaae93ff9963dc0e5ff39. Reason for revert: hwui, flutter, and headless blink in G3 all still using these. Original change's description: > hide picture virtuals (no public callers) > > This prepares the way for a clean impl of a "placeholder" picture that never unrolls > > Bug: skia: > Change-Id: I3b5785c5c94432b54e9a7dc280b2a6e716592473 > Reviewed-on: https://skia-review.googlesource.com/100260 > Commit-Queue: Mike Reed <reed@google.com> > Reviewed-by: Mike Klein <mtklein@chromium.org> TBR=mtklein@chromium.org,mtklein@google.com,reed@google.com Change-Id: I385789dd420588ea9a9390c8a44c6ecb96c7f358 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/100880 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* hide picture virtuals (no public callers)Gravatar Mike Reed2018-01-27
| | | | | | | | | | This prepares the way for a clean impl of a "placeholder" picture that never unrolls Bug: skia: Change-Id: I3b5785c5c94432b54e9a7dc280b2a6e716592473 Reviewed-on: https://skia-review.googlesource.com/100260 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* eliminate SK_BUILD_FOR_WIN32Gravatar Mike Klein2018-01-26
| | | | | | | | | | SK_BUILD_FOR_WIN and SK_BUILD_FOR_WIN32 have long meant the same thing. Chrome fix is https://chromium-review.googlesource.com/c/chromium/src/+/884007 Change-Id: I0e907b1bcd2a358eabf776f414fd3aeb3c689561 Reviewed-on: https://skia-review.googlesource.com/99340 Reviewed-by: Mike Reed <reed@google.com>
* Revert "remove approxbytes api from SkPicture"Gravatar Mike Reed2017-12-25
| | | | | | | | | | This reverts commit bfc11853a88cda6951ae97399577fadadf2adcd5. Bug: skia: Change-Id: Ied4baad0496a06a52bec6965f9c97e13ebe2ab0a Reviewed-on: https://skia-review.googlesource.com/89442 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "re-add dummy printf to fix bots"Gravatar Mike Reed2017-12-25
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 1395994aa02795d6c887124cb15813484ba65061. Reason for revert: broke flutter Original change's description: > re-add dummy printf to fix bots > > Bug: skia: > Change-Id: I3184736f37481c5ac20eae1a15c17aed4f3c3e52 > Reviewed-on: https://skia-review.googlesource.com/89441 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Mike Reed <reed@google.com> TBR=borenet@google.com,rmistry@google.com,jcgregorio@google.com,reed@google.com Change-Id: I36b9efffe8a0c9df1970a31ffee5cb59171d967f No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/89381 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* re-add dummy printf to fix botsGravatar Mike Reed2017-12-24
| | | | | | | | Bug: skia: Change-Id: I3184736f37481c5ac20eae1a15c17aed4f3c3e52 Reviewed-on: https://skia-review.googlesource.com/89441 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* remove approxbytes api from SkPictureGravatar Mike Reed2017-12-24
| | | | | | | | Bug: skia: Change-Id: I292bc9ab52fe8df3ce97a2ad4b06085b0332b19d Reviewed-on: https://skia-review.googlesource.com/89440 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Add a tools flag to suppress geometry shadersGravatar Chris Dalton2017-12-19
| | | | | | | | | Bug: skia: Change-Id: I38736c5d49e3b281c2d23af3908575274ff97b5c Reviewed-on: https://skia-review.googlesource.com/86282 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* remove ThermalManagerGravatar Mike Klein2017-12-06
| | | | | | | | | | | | It throttles 1000x more than intended, and I suspect that some of the trip points it uses to decide when to throttle make no sense. We've already turned it off on the Nexus 5x. Change-Id: Idf556a83fe61ccc5f63c7bede3eecbe80087e28b Reviewed-on: https://skia-review.googlesource.com/81303 Reviewed-by: Kevin Lubick <kjlubick@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* add benchType deserial to time deserializing picturesGravatar Mike Reed2017-12-06
| | | | | | | | | | | Piece of the larger effort to merge readbuffer and validatingreadbuffer Bug: skia: Change-Id: I79305e27c4712c3b91d213d09d6c2ef24b86e671 Reviewed-on: https://skia-review.googlesource.com/81120 Commit-Queue: Mike Reed <reed@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* remove SkThread, using std::thread insteadGravatar Mike Klein2017-10-30
| | | | | | | Change-Id: I871dd5eea4496e87c206b46d9eae81cb521b11ce Reviewed-on: https://skia-review.googlesource.com/65103 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Add a tooling flag for path mask cachingGravatar Chris Dalton2017-10-13
| | | | | | | | | | | 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>
* Add benchmark for comparing multitexturing to non-multitexturing image draws.Gravatar Brian Salomon2017-10-11
| | | | | | | | | | | 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>
* Warmup for one extra frame in nanobenchGravatar Brian Osman2017-10-10
| | | | | | | | | | On ANGLE, at least, this frame gives us much more consistent results. Bug: skia: Change-Id: Ifdecc8451ef51490c08057645214738180b1a366 Reviewed-on: https://skia-review.googlesource.com/57884 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Revert[4] "guard old apis for querying byte-size of a bitmap/imageinfo/pixmap"Gravatar Mike Reed2017-10-03
| | | | | | | | | | This reverts commit 5a2e50edc51006ce91366e177a9d21a16775d7fd. Bug: skia: Change-Id: I8d28b5c07d90130e5a1653923740eaf189ecb954 Reviewed-on: https://skia-review.googlesource.com/53900 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Do not try to time kFailedLoopsGravatar Leon Scroggins III2017-10-02
| | | | | | | | | | | | Move the check for kFailedLoops above code that times the benchmark. This matches the comment ("Can't be timed") and prevents an infinite loop. Bug: skia:6774 Change-Id: Iacdc1ca1d11afcf05afac60e4eb0d8d9a12f800e Reviewed-on: https://skia-review.googlesource.com/53803 Reviewed-by: Yuqian Li <liyuqian@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* Revert "Revert "Revert "guard old apis for querying byte-size of a ↵Gravatar Mike Reed2017-10-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bitmap/imageinfo/pixmap""" This reverts commit cd284c532376d16fcc4ed75baf3da65c3e4a2e95. Reason for revert: assert fired in SkMallocPixelRef.cpp:61: fatal error: "assert(info.computeByteSize(rowBytes) == info.getSafeSize(rowBytes))" google3 thinks it was from surface_rowbytes Original change's description: > Revert "Revert "guard old apis for querying byte-size of a bitmap/imageinfo/pixmap"" > > This reverts commit 809cbedd4b252be221b2ac3b4269d312fd8f53a0. > > Bug: skia: > Change-Id: I680d8daeeeeb15526b44c1305d8fb0c6bfa38e1d > Reviewed-on: https://skia-review.googlesource.com/52665 > Commit-Queue: Mike Reed <reed@google.com> > Reviewed-by: Florin Malita <fmalita@chromium.org> TBR=fmalita@chromium.org,reed@google.com Change-Id: I41e3f7a3f791cc8183291847e783ed8a53bc91d2 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/53802 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Revert "guard old apis for querying byte-size of a ↵Gravatar Mike Reed2017-10-02
| | | | | | | | | | | | bitmap/imageinfo/pixmap"" This reverts commit 809cbedd4b252be221b2ac3b4269d312fd8f53a0. Bug: skia: Change-Id: I680d8daeeeeb15526b44c1305d8fb0c6bfa38e1d Reviewed-on: https://skia-review.googlesource.com/52665 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* Revert "guard old apis for querying byte-size of a bitmap/imageinfo/pixmap"Gravatar Jim Van Verth2017-09-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 88757dacd4f532a0f647c02ae0ee596d31ab5c68. Reason for revert: Still seems to be failing Chromium "telemetry_perf_unittests (with patch) on Android" on android_n5x_swarming_rel. Original change's description: > guard old apis for querying byte-size of a bitmap/imageinfo/pixmap > > Now with legacy behavior for allocpixels > > This was reverted, so the current CL is a "fix" on top of ... > https://skia-review.googlesource.com/c/skia/+/50980 > > Related update to Chrome (in preparation for this change) > https://chromium-review.googlesource.com/c/chromium/src/+/685719 > > Bug: skia: > Change-Id: I4b370ee7e95083ab27421f008132219c9c7b86e9 > Reviewed-on: https://skia-review.googlesource.com/51341 > Reviewed-by: Florin Malita <fmalita@chromium.org> > Commit-Queue: Mike Reed <reed@google.com> TBR=fmalita@chromium.org,reed@google.com Change-Id: I827a0ca1d1e3909e648fde3342cdb8601d34da8d No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/52381 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* guard old apis for querying byte-size of a bitmap/imageinfo/pixmapGravatar Mike Reed2017-09-27
| | | | | | | | | | | | | | | | Now with legacy behavior for allocpixels This was reverted, so the current CL is a "fix" on top of ... https://skia-review.googlesource.com/c/skia/+/50980 Related update to Chrome (in preparation for this change) https://chromium-review.googlesource.com/c/chromium/src/+/685719 Bug: skia: Change-Id: I4b370ee7e95083ab27421f008132219c9c7b86e9 Reviewed-on: https://skia-review.googlesource.com/51341 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* Revert "guard old apis for querying byte-size of a bitmap/imageinfo/pixmap"Gravatar Greg Daniel2017-09-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 98a6216b18b57c2f7a0d58f542c60503686aed69. Reason for revert: breaking the chrome roll. Looks like they may be writing data to create an image across all the row bytes and thus writing to unalloced data on the last row. Link to example failing bot: https://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/539960 Original change's description: > guard old apis for querying byte-size of a bitmap/imageinfo/pixmap > > Previously we had size_t and uint64_t variations. > > The new (simpler) API always.. > - returns size_t, or 0 if the calculation overflowed > - returns the trimmed size (does not include rowBytes padding for the last row) > > Bug: skia: > Change-Id: I05173e877918327c7b207d2f7f1ab0db36892e2e > Reviewed-on: https://skia-review.googlesource.com/50980 > Commit-Queue: Mike Reed <reed@google.com> > Reviewed-by: Florin Malita <fmalita@chromium.org> > Reviewed-by: Leon Scroggins <scroggo@google.com> TBR=mtklein@google.com,herb@google.com,scroggo@google.com,fmalita@chromium.org,reed@google.com Change-Id: I726f6ab1b36b14979ba6f37105e0a469b3f0dbc0 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/51262 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* guard old apis for querying byte-size of a bitmap/imageinfo/pixmapGravatar Mike Reed2017-09-26
| | | | | | | | | | | | | | | Previously we had size_t and uint64_t variations. The new (simpler) API always.. - returns size_t, or 0 if the calculation overflowed - returns the trimmed size (does not include rowBytes padding for the last row) Bug: skia: Change-Id: I05173e877918327c7b207d2f7f1ab0db36892e2e Reviewed-on: https://skia-review.googlesource.com/50980 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Leon Scroggins <scroggo@google.com>
* Run the first bench for 1000ms to warm up the nanobench if FLAGS_ms < 1000.Gravatar Yuqian Li2017-09-21
| | | | | | | | | | | | | | | | | | | | | | | | Otherwise, the first few benches' measurements will be inaccurate. For example, without this CL, the first few measurements are: 337ns, 566µs, 1000µs, ... without "--ms 1000" arg 211ns, 285µs, 874µs, ... with "--ms 1000" arg With this CL, the first few measurements are: 195ns, 296µs, 1.03ms, ... without "--ms 1000" arg 204ns, 280µs, 859µs, ... with "--ms 1000" arg In the example above, the first two measurements are vastly (>50%) different without this CL. I think that's the reason why I keep using "--ms 1000" arg locally. But it's really only necessary for the first bench to warm up nanobench. It's a waste to apply "--ms 1000" to all the following benches. Bug: skia: Change-Id: I1924ba3ff9185ed89aeda72794fafd1fe6625eef Reviewed-on: https://skia-review.googlesource.com/49742 Reviewed-by: Yuqian Li <liyuqian@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* Copy benchmark names, which may be transient stringsGravatar Brian Osman2017-09-08
| | | | | | | | | Bug: skia: Change-Id: Ic4073aa17a04e8b400cc4a9db9a0669ee4a5c894 Reviewed-on: https://skia-review.googlesource.com/44203 Commit-Queue: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* Fix config strings in nanobench tracingGravatar Brian Osman2017-08-31
| | | | | | | | | | These are transient, so need to be copied. Bug: skia: Change-Id: Id24db0b96f343ecd034dd015da6e19ea61579b56 Reviewed-on: https://skia-review.googlesource.com/41741 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Add top-level trace markers for each benchmarkGravatar Brian Osman2017-08-31
| | | | | | | | | | Also add new paragraph about using systrace correctly Docs-Preview: https://skia.org/?cl=41502 Change-Id: I114c14cc2e87a8b72aec46d8c354d3ea877a41ab Reviewed-on: https://skia-review.googlesource.com/41502 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Threaded generation of software pathsGravatar Brian Osman2017-08-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* add 'a8' config for nanobench, specialize blitV for raster-pipelineGravatar Mike Reed2017-08-28
| | | | | | | | | | Motivated by wanting to speed-up A8 blits in general (and at the moment, aarect blits). More to come in these areas. Bug: skia: Change-Id: I45e8ef951b8e89a825af72b1918049be10920137 Reviewed-on: https://skia-review.googlesource.com/39401 Reviewed-by: Yuqian Li <liyuqian@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Threaded generation of software paths"Gravatar Brian Salomon2017-08-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 76323bc0615044a5921afef0e19a350f3d04ffe0. Reason for revert: Breaking NUC bots in threaded gm comparison: https://chromium-swarm.appspot.com/task?id=382e589753187f10&refresh=10 Original change's description: > Threaded generation of software paths > > 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: I3d5a230bbd68eb35e1f0574b308485c691435790 > Reviewed-on: https://skia-review.googlesource.com/36560 > Commit-Queue: Brian Osman <brianosman@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com,robertphillips@google.com,brianosman@google.com Change-Id: Icac0918a3771859f671b69ae07ae0fedd3ebb3db No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/38560 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Threaded generation of software pathsGravatar Brian Osman2017-08-24
| | | | | | | | | | | | | | | | | | | | | | | | | | 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: I3d5a230bbd68eb35e1f0574b308485c691435790 Reviewed-on: https://skia-review.googlesource.com/36560 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Abort dm/nanobench on bad configs.Gravatar Ben Wagner2017-08-11
| | | | | | | | | 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>
* New analytic AA scan converter using delta (I call it DAA for now)Gravatar Yuqian Li2017-07-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DAA is: 1. Much simpler than AAA. SkScan_AAAPath.cpp is about 1700 lines. SkScan_DAAPath.cpp is about 300 lines. The whole DAA CL is only about 800 lines. 2. Much faster than AAA for complicated paths. The speedup applies to GL backend (including ccpr)! Here's the frame time of 'SampleApp --slide Chart' on macbook pro: AAA-raster: 33ms DAA-raster: 21ms AAA-gl: 30ms DAA-gl: 20ms AAA-ccpr: 18ms DAA-ccpr: 12ms My linux desktop doesn't have SSE3 so the speedup is smaller (~25% for Chart). I believe that DAA is so fast that I can enable it for any paths (AAA is not enabled by default for complicated paths because it is slow; hence our older supersampling scan converter is used for stroking on Chart for AAA-xxx config.) 3. The SkCoverageDelta is suitable for threaded backend with out-of-order concurrent scan conversion as commented in the source code. Maybe we can also just send deltas to GPU. 4. Similar to most analytic path renderers, the quality is on the best ground-truth level, unless there are intersections within a pixel. The intersections look good to my eyes although theoretically that could be arbitrary far from the ground truth (see my AAA slides). 5. For simple paths, such as circle, triangle, rrect, etc., DAA is slower than AAA. But DAA is faster than our older supersampling scan converter in most cases. As those simple paths usually don't constitute the bottleneck of a picture (skp or svg), I strongly recommend use DAA. 6. DAA also heavily favors blitMask so it may work quite well with SkRasterPipeline and SkRasterPipelineBlitter. Finally, please check https://skia-review.googlesource.com/c/22420/ which accelerate DAA by specializing blitCoverageDeltas for SkARGB32_Blitter and SkARGB32_Black_Blitter. It brings a little(<5%) speedup. But I couldn't figure out how to reduce the duplicate code so I don't intend to land it. Bug: skia: Change-Id: I3b7ed6a727447922e645b1acb737a506e7c09a4c Reviewed-on: https://skia-review.googlesource.com/19666 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* use unique_ptr for codec factoriesGravatar Mike Reed2017-07-25
| | | | | | | | | | Will need guards for android (at least) Bug: skia: Change-Id: I2bb8e656997984489ef1f2e41cd3d301c4e7b947 Reviewed-on: https://skia-review.googlesource.com/26040 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Reed <reed@google.com>