aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/nanobench.cpp
Commit message (Collapse)AuthorAge
* Remove const from `const int loops`.Gravatar mtklein2015-10-01
| | | | | | | | This drives me nuts, and prevents `while (loops --> 0)`. BUG=skia: Review URL: https://codereview.chromium.org/1379923005
* Fix for nexus 5 crashing in GL benchesGravatar joshualitt2015-09-30
| | | | | | | | | | GLBenches do not expect gl state to change between onPerCanvasPreDraw and *PostDraw, but we do a clear and sometimes we clear as draw. This causes us to bind vertex objects / programs / etc. This change creates two new virtual methods which are called right before and immediately after timing. BUG=skia: Review URL: https://codereview.chromium.org/1379853003
* Merge SkCodec with SkScanlineDecoderGravatar scroggo2015-09-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Benefits: - This mimics other decoding APIs (including the ones SkCodec relies on, e.g. a png_struct, which can be used to decode an entire image or one line at a time). - It allows a client to ask us to do what we can do efficiently - i.e. start from encoded data and either decode the whole thing or scanlines. - It removes the duplicate methods which appeared in both SkCodec and SkScanlineDecoder (some of which, e.g. in SkJpegScanlineDecoder, just call fCodec->sameMethod()). - It simplifies moving more checks into the base class (e.g. the examples in skbug.com/4284). BUG=skia:4175 BUG=skia:4284 ===================================================================== SkScanlineDecoder.h/.cpp: Removed. SkCodec.h/.cpp: Add methods, enums, and variables which were previously in SkScanlineDecoder. Default fCurrScanline to -1, as a sentinel that start has not been called. General changes: Convert SkScanlineDecoders to SkCodecs. General changes in SkCodec subclasses: Merge SkScanlineDecoder implementation into SkCodec. Most (all?) owned an SkCodec, so they now call this-> instead of fCodec->. SkBmpCodec.h/.cpp: Replace the unused rowOrder method with an override for onGetScanlineOrder. Make getDstRow const, since it is called by onGetY, which is const. SkCodec_libpng.h/.cpp: Make SkPngCodec an abstract class, with two subclasses which handle scanline decoding separately (they share code for decoding the entire image). Reimplement onReallyHasAlpha so that it can return the most recent result (e.g. after a scanline decode which only decoded part of the image) or a better answer (e.g. if the whole image is known to be opaque). Compute fNumberPasses early, so we know which subclass to instantiate. Make SkPngInterlaceScanlineDecoder use the base class' fCurrScanline rather than a separate variable. CodexTest.cpp: Add tests for the state changes in SkCodec (need to call start before decoding scanlines; calling getPixels means that start will need to be called again before decoding more scanlines). Add a test which decodes in stripes, currently only used for an interlaced PNG. TODO: Add tests for onReallyHasAlpha. Review URL: https://codereview.chromium.org/1365313002
* Add nanobench tests for BitmapRegionDecoderGravatar msarett2015-09-22
| | | | | | | | | | | | | | | | SkBitmapRegionDecoderInterface provides an interface for multiple implementations of Android's BitmapRegionDecoder. We already have correctness tests in DM that will enable us to compare the quality of our various BRD implementations. We also need these performance tests to compare the speed of our various implementations. BUG=skia:4357 Review URL: https://codereview.chromium.org/1344993003
* skia: Add ANGLE with GL backend to nanobench/DMGravatar hendrikw2015-09-11
| | | | | | | This will allow us to test this without hacking it in, might be useful for others too. Review URL: https://codereview.chromium.org/1338003002
* Rename flag from "distance field" to "device independent."Gravatar bsalomon2015-08-31
| | | | Review URL: https://codereview.chromium.org/1322433006
* skia: add ability to load command_buffer_gles2Gravatar hendrikw2015-08-27
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1306823003
* Style Change: NULL->nullptrGravatar halcanary2015-08-27
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002
* Style Change: SkNEW->new; SkDELETE->deleteGravatar halcanary2015-08-26
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316123003 Review URL: https://codereview.chromium.org/1316123003
* Remove include of stdlib.h from SkTypes.h.Gravatar bungeman2015-08-26
| | | | | | | | | | | | | | | Unfortunately, immintrin.h (which is also included by SkTypes) includes xmmintrin.h which includes mm_malloc.h which includes stdlib.h for malloc even though, from the implementation, it is difficult to see why. Fortunately, arm_neon.h does not seem to be involved in such shenanigans, so building for Android will keep things sane. TBR=reed@google.com Doesn't change Skia API, just moves an include. Review URL: https://codereview.chromium.org/1313203003
* Create a scanline decoder without creating a codecGravatar scroggo2015-08-04
| | | | | | | | | | | | | | Prior to this CL, if a client wanted to decode scanlines, they had to create an SkCodec in order to get an SkScanlineDecoder. This introduces complications if input data is not easily shared between the two objects. Instead, add methods to SkScanlineDecoder for creating a new one from input data, and remove the creation functions from SkCodec. Update DM and tests. Review URL: https://codereview.chromium.org/1267583002
* Allow creating multiple scanline decoders.Gravatar scroggo2015-07-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make getScanlineDecoder return a new object each time, which is owned by the caller, and independent from any existing scanline decoders and the SkCodec itself. Since the SkCodec already contains the entire state machine, and it is used by the scanline decoders, simply create a new SkCodec which is now owned by the scanline decoder. Move code that cleans up after using a scanline decoder into its destructor One side effect is that creating the first scanline decoder requires a duplication of the stream and re-reading the header. (With some more complexity/changes, we could pass the state machine to the scanline decoder and make the SkCodec recreate its own state machine instead.) The typical client of the scanline decoder (region decoder) uses an SkMemoryStream, so the duplication is cheap, although we should consider the extra time to reread the header/recreate the state machine. (If/when we use the scanline decoder for other purposes, where the stream may not be cheaply duplicated, we should consider passing the state machine.) One (intended) result of this change is that a client can create a new scanline decoder in a new thread, and decode different pieces of the image simultaneously. In SkPngCodec::decodePalette, use fBitDepth rather than a parameter. Review URL: https://codereview.chromium.org/1230033004
* Have nanobench pay attention to --threads.Gravatar mtklein2015-07-09
| | | | | | | | TBR= BUG=skia: Review URL: https://codereview.chromium.org/1229953002
* SkCodec no longer inherits from SkImageGenerator.Gravatar scroggo2015-07-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SkImageGenerator makes some assumptions that are not necessarily valid for SkCodec. For example, SkCodec does not assume that it can always be rewound. We also have an ongoing question of what an SkCodec should report as its default settings (i.e. the return from getInfo). It makes sense for an SkCodec to report that its pixels are unpremultiplied, if that is the case for the underlying data, but if a client of SkImageGenerator uses the default settings (as many do), they will receive unpremultiplied pixels which cannot (currently) be drawn with Skia. We may ultimately decide to revisit SkCodec reporting an SkImageInfo, but I have left it unchanged for now. Import features of SkImageGenerator used by SkCodec into SkCodec. I have left SkImageGenerator unchanged for now, but it no longer needs Result or Options. This will require changes to Chromium. Manually handle the lifetime of fScanlineDecoder, so SkScanlineDecoder.h can include SkCodec.h (where Result is), and SkCodec.h does not need to include it (to delete fScanlineDecoder). In many places, make the following simple changes: - Now include SkScanlineDecoder.h, which is no longer included by SkCodec.h - Use the enums in SkCodec, rather than SkImageGenerator - Stop including SkImageGenerator.h where no longer needed Review URL: https://codereview.chromium.org/1220733013
* Make nanobench zoom animation time basedGravatar cdalton2015-06-29
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1211253003
* Don't suppress nanobench output table in verbose modeGravatar cdalton2015-06-26
| | | | | | | | | Changes verbose mode to print both the table and the individual sample values. No need to hold back information in verbose mode. BUG=skia: Review URL: https://codereview.chromium.org/1208763003
* Fix nanobench to reset gl/gr context after every config run.Gravatar egdaniel2015-06-26
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1214703002
* Add samplingTime mode to nanobenchGravatar cdalton2015-06-25
| | | | | | | | | Adds a nanobench mode that takes samples for a fixed amount of time, rather than taking a fixed amount of samples. BUG=skia: Review URL: https://codereview.chromium.org/1204153002
* Add loopSKP flag to nanobenchGravatar cdalton2015-06-25
| | | | | | | | Adds a loopSKP flag that forces SKPBenches to draw with only 1 loop. BUG=skia: Review URL: https://codereview.chromium.org/1203193002
* Implement SkGLContext swapBuffers with fence syncsGravatar cdalton2015-06-23
| | | | | | | | | | | Improves the GPU measuring accuracy of nanobench by using fence syncs. Fence syncs are very widely supported and available on almost every platform. NO_MERGE_BUILDS BUG=skia: Review URL: https://codereview.chromium.org/1194783003
* Improved subset benchmarksGravatar msarett2015-06-17
| | | | | | | | | | | | I think these changes to the subset benchmarks cover what we discussed yesterday. I removed the divisor benchmarks (2x2, 3x3) and changed the single subset benchmarks. Also, we will no longer benchmark subset decodes on small images. BUG=skia: Review URL: https://codereview.chromium.org/1188223002
* When --mpd is true, run _mpd variants first, then non-mpd.Gravatar mtklein2015-06-15
| | | | | | | | | | | | This makes it easier to benchmark _mpd variants in a profiler. E.g., <profiler> out/Release/nanobench --images --config 8888 --loops -1 --match sp_desk_nytimes BUG=skia: Review URL: https://codereview.chromium.org/1184673006
* Subset decoding benchmarksGravatar msarett2015-06-09
| | | | | | | | | | | | | | | It was my goal to create benchmarks that could measure all of the use cases that we have identified. I think single subsets, translating, and scaling are the important ones. It might be a good idea to discuss the document in greater detail as well. I just wanted to share this to aid the discussion. https://docs.google.com/a/google.com/document/d/1OxW96GDMAlw6dnzNXmiNX-F9oDBBlGXzSsgd0DMIkbI/edit?usp=sharing BUG=skia: Review URL: https://codereview.chromium.org/1160953002
* Add direct getter for GrCaps to GrContext.Gravatar bsalomon2015-05-29
| | | | | | | | TBR=joshualitt@google.com Committed: https://skia.googlesource.com/skia/+/9138c46e572085870638b6f7ad7fcdfcdf3cac99 Review URL: https://codereview.chromium.org/1149773005
* Revert of Add direct getter for GrCaps to GrContext. (patchset #4 id:60001 ↵Gravatar bsalomon2015-05-28
| | | | | | | | | | | | | | | | | | | | | of https://codereview.chromium.org/1149773005/) Reason for revert: Breaking Original issue's description: > Add direct getter for GrCaps to GrContext. > > TBR=joshualitt@google.com > > Committed: https://skia.googlesource.com/skia/+/9138c46e572085870638b6f7ad7fcdfcdf3cac99 TBR=joshualitt@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1164443002
* Add direct getter for GrCaps to GrContext.Gravatar bsalomon2015-05-28
| | | | | | TBR=joshualitt@google.com Review URL: https://codereview.chromium.org/1149773005
* Store context options on caps.Gravatar bsalomon2015-05-22
| | | | | | Committed: https://skia.googlesource.com/skia/+/f28cff71db2cbb1ff18a8fbf1e80ca761d1f69bc Review URL: https://codereview.chromium.org/1158433006
* Revert of Store context options on caps. (patchset #3 id:40001 of ↵Gravatar bsalomon2015-05-22
| | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1158433006/) Reason for revert: breaking chromeos build (???) Original issue's description: > Store context options on caps. > > Committed: https://skia.googlesource.com/skia/+/f28cff71db2cbb1ff18a8fbf1e80ca761d1f69bc TBR=joshualitt@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1151603005
* Store context options on caps.Gravatar bsalomon2015-05-22
| | | | Review URL: https://codereview.chromium.org/1158433006
* DM+nanobench: print both current and max RSS.Gravatar mtklein2015-04-30
| | | | | | | | | | | | | | | | | out/Debug/dm: ( 360/380 MB 2112) 396ms gpu gm xfermodes out/Release/nanobench: 32/33 MB 1659 2.46µs 2.55µs 2.54µs 2.67µs 2% ▄▄▄▅▅▃▂▁▂█ gpu gradient_conicalZero_clamp_hicolor out/Debug/nanobench: 42/42 MB desk_css3gradients.skp_1 8888 BUG=skia: NOTREECHECKS=true Review URL: https://codereview.chromium.org/1115203002
* Change to add zoom animations to nanobenchGravatar joshualitt2015-04-27
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1061323003
* Do not crash nanobench in debug modeGravatar msarett2015-04-24
| | | | | | | | Instead print an error message BUG=skia: Review URL: https://codereview.chromium.org/1102083002
* Test SkCodec to kIndex8 in nanobench.Gravatar scroggo2015-04-02
| | | | | | | BUG=skia:3257 BUG=skia:3475 Review URL: https://codereview.chromium.org/1051973002
* nanobench does not need to handle failed rewind.Gravatar scroggo2015-04-01
| | | | | | | | | | | Now that all SkCodecs can rewind (assuming the stream is rewindable), we do not need to special case it. Pointed out by Derek in the code review that added this. TBR=djsollen Review URL: https://codereview.chromium.org/1058633002
* Add timing SkCodec to nanobench.Gravatar scroggo2015-04-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CodecBench: Add new class for timing using SkCodec. DecodingBench: Include creating a decoder inside the loop. This is to have a better comparison against SkCodec. SkCodec's factory function does not necessarily read the same amount as SkImageDecoder's, so in order to have a meaningful comparison, read the entire stream from the beginning. Also for comparison, create a new SkStream from the SkData each time. Add a debugging check to make sure we have an SkImageDecoder. Add include guards. nanobench.cpp: Decode using SkCodec. When decoding using SkImageDecoder, exclude benches where we decoded to a different color type than requested. SkImageDecoder may decide to decode to a different type, in which case the name is misleading. TODOs: Now that we ignore color types that do not match the desired color type, we should add Index8. This also means calling the more complex version of getPixels so CodecBench can support kIndex8. BUG=skia:3257 Review URL: https://codereview.chromium.org/1044363002
* Minor cleanup in nanobenchGravatar tomhudson2015-03-27
| | | | | | | | | | | Simplify time() by removing conditionals; reduce the amount of parameter passing. Add a convenience function to Target. R=mtklein@google.com BUG=skia:3595 Review URL: https://codereview.chromium.org/1039253002
* Android HWUI backend NanobenchGravatar tomhudson2015-03-26
| | | | | | | | | Uses filtering canvas from utils/android, shared with DM. Follow-up plans in https://skbug.com/3589, https://skbug.com/3595 R=djsollen@google.com Review URL: https://codereview.chromium.org/1029423010
* small fix for nanobench segfault when not running any testsGravatar joshualitt2015-03-26
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1030353004
* DM: display current memory usage (instead of peak) when available.Gravatar mtklein2015-03-12
| | | | | | | | | | | | | | | Seems strictly more useful. This implements Mac and Windows, which seemed easy. Don't know how to do this on Linux yet. BUG=skia: CQ_EXTRA_TRYBOTS=client.skia:Test-Mac10.9-MacMini6.2-HD4000-x86_64-Debug-Trybot NOTREECHECKS=true TBR=halcanary@google.com Review URL: https://codereview.chromium.org/990723002
* Adding new benchmark to test image decoding performance.Gravatar msarett2015-02-13
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/918673002
* Revert of nanobench: lazily decode bitmaps in .skps. (patchset #1 id:1 of ↵Gravatar mtklein2015-02-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/743613005/) Reason for revert: Well, it still crashes. Original issue's description: > nanobench: lazily decode bitmaps in .skps. > > This cuts down on tool overhead when running something like recording only, > $ out/Release/nanobench --match skp --config nonrendering > which doesn't usually ever need to decode the images. > > The actual measurements for recording don't change, as the decode is not in the timed section. It just skips irrelevant code, removing it from the profile and making the tool run faster. > > This does, however, make a significant difference for playback speed. Most skps draw faster with this patch, some slower. I don't really have a good intuition for what's going on here. There is a fixed clip acting as a viewport, so there are probably lots of images that don't ever need to be decoded. Ideas? Is this perhaps because we're now blitting from smaller, partially decoded source images? > > ~/skia (clean) $ compare clean.log lazy-decode-bitmaps.log > tabl_slashdot.skp_1 2.76ms -> 4.33ms 1.57x > tabl_slashdot.skp_1_mpd 2.79ms -> 4.07ms 1.46x > tabl_sahadan.skp_1 3.41ms -> 4.87ms 1.43x > tabl_googleblog.skp_1 1.52ms -> 2.05ms 1.35x > tabl_techmeme.skp_1_mpd 1.14ms -> 1.51ms 1.32x > tabl_transformice.skp_1 2.61ms -> 3.43ms 1.31x > tabl_sahadan.skp_1_mpd 3.54ms -> 4.48ms 1.26x > tabl_techmeme.skp_1 1.01ms -> 1.27ms 1.26x > tabl_nytimes.skp_1_mpd 1ms -> 1.23ms 1.23x > tabl_worldjournal.skp_1_mpd 1.98ms -> 2.43ms 1.23x > tabl_pravda.skp_1_mpd 2.05ms -> 2.51ms 1.22x > tabl_transformice.skp_1_mpd 2.75ms -> 3.19ms 1.16x > tabl_nytimes.skp_1 874us -> 1.01ms 1.15x > tabl_pravda.skp_1 1.83ms -> 1.99ms 1.09x > tabl_worldjournal.skp_1 1.76ms -> 1.91ms 1.09x > desk_wowwiki.skp_1_mpd 3.7ms -> 3.9ms 1.05x > tabl_digg.skp_1 3.99ms -> 4.16ms 1.04x > tabl_ukwsj.skp_1_mpd 3ms -> 3.12ms 1.04x > desk_booking.skp_1 3.74ms -> 3.81ms 1.02x > desk_googlespreadsheetdashed.skp_1 10.6ms -> 10.6ms 1x > tabl_ukwsj.skp_1 2.88ms -> 2.89ms 1x > desk_googlespreadsheetdashed.skp_1_mpd 11.8ms -> 11.8ms 1x > desk_jsfiddlehumperclip.skp_1_mpd 891us -> 888us 1x > desk_googlespreadsheet.skp_1 4.65ms -> 4.62ms 0.99x > tabl_gspro.skp_1_mpd 1.97ms -> 1.94ms 0.99x > desk_booking.skp_1_mpd 4.1ms -> 4ms 0.98x > desk_carsvg.skp_1 18.2ms -> 17.7ms 0.97x > desk_gmailthread.skp_1_mpd 2.81ms -> 2.73ms 0.97x > desk_tigersvg.skp_1_mpd 19.5ms -> 18.9ms 0.97x > desk_mapsvg.skp_1 88.4ms -> 85.6ms 0.97x > tabl_cnet.skp_1_mpd 1.43ms -> 1.38ms 0.97x > desk_jsfiddlebigcar.skp_1 1.26ms -> 1.22ms 0.96x > desk_gws.skp_1 1.87ms -> 1.8ms 0.96x > desk_linkedin.skp_1 2.07ms -> 1.98ms 0.96x > tabl_deviantart.skp_1_mpd 118ms -> 113ms 0.96x > tabl_cnet.skp_1 1.2ms -> 1.14ms 0.95x > tabl_androidpolice.skp_1_mpd 5.95ms -> 5.63ms 0.95x > desk_sfgate.skp_1 1.75ms -> 1.64ms 0.94x > desk_twitter.skp_1 74ms -> 69.6ms 0.94x > desk_youtube.skp_1_mpd 3.17ms -> 2.96ms 0.93x > desk_gmailthread.skp_1 2.73ms -> 2.54ms 0.93x > desk_silkfinance.skp_1_mpd 1.71ms -> 1.59ms 0.93x > desk_jsfiddlebigcar.skp_1_mpd 1.45ms -> 1.35ms 0.93x > desk_pokemonwiki.skp_1_mpd 2.72ms -> 2.51ms 0.92x > desk_gws.skp_1_mpd 2.14ms -> 1.98ms 0.92x > desk_googlehome.skp_1 563us -> 517us 0.92x > desk_espn.skp_1 4.24ms -> 3.89ms 0.92x > tabl_culturalsolutions.skp_1 12.7ms -> 11.6ms 0.91x > desk_sfgate.skp_1_mpd 1.91ms -> 1.74ms 0.91x > tabl_hsfi.skp_1 1.06ms -> 966us 0.91x > desk_samoasvg.skp_1_mpd 10.5ms -> 9.47ms 0.91x > desk_facebook.skp_1_mpd 3.8ms -> 3.43ms 0.9x > desk_youtube.skp_1 3.52ms -> 3.14ms 0.89x > desk_ebay.skp_1_mpd 2.95ms -> 2.62ms 0.89x > desk_samoasvg.skp_1 10.9ms -> 9.66ms 0.89x > desk_googlespreadsheet.skp_1_mpd 5.59ms -> 4.94ms 0.88x > desk_mapsvg.skp_1_mpd 100ms -> 87.9ms 0.88x > desk_espn.skp_1_mpd 4.7ms -> 4.12ms 0.88x > desk_wordpress.skp_1_mpd 1.92ms -> 1.68ms 0.87x > tabl_deviantart.skp_1 140ms -> 122ms 0.87x > tabl_cuteoverload.skp_1_mpd 4.41ms -> 3.83ms 0.87x > desk_tigersvg.skp_1 19.6ms -> 17ms 0.87x > tabl_googlecalendar.skp_1 4.01ms -> 3.44ms 0.86x > desk_blogger.skp_1 2.49ms -> 2.14ms 0.86x > desk_chalkboard.skp_1_mpd 52.7ms -> 45ms 0.85x > desk_weather.skp_1 2.88ms -> 2.46ms 0.85x > desk_chalkboard.skp_1 51ms -> 43.4ms 0.85x > desk_yahooanswers.skp_1 2.74ms -> 2.32ms 0.85x > desk_forecastio.skp_1_mpd 1.26ms -> 1.07ms 0.85x > tabl_androidpolice.skp_1 5.18ms -> 4.34ms 0.84x > desk_yahooanswers.skp_1_mpd 3.44ms -> 2.85ms 0.83x > tabl_cnn.skp_1_mpd 2.59ms -> 2.15ms 0.83x > desk_pinterest.skp_1 2.69ms -> 2.22ms 0.83x > tabl_hsfi.skp_1_mpd 1.6ms -> 1.32ms 0.82x > tabl_culturalsolutions.skp_1_mpd 13.8ms -> 11.3ms 0.82x > desk_twitter.skp_1_mpd 76.6ms -> 63ms 0.82x > desk_ebay.skp_1 3.11ms -> 2.51ms 0.81x > tabl_mlb.skp_1_mpd 3.17ms -> 2.53ms 0.8x > tabl_mozilla.skp_1 2.42ms -> 1.91ms 0.79x > desk_pokemonwiki.skp_1 2.84ms -> 2.22ms 0.78x > desk_carsvg.skp_1_mpd 23.3ms -> 17.8ms 0.77x > desk_wowwiki.skp_1 4.21ms -> 3.21ms 0.76x > desk_amazon.skp_1 963us -> 728us 0.76x > desk_css3gradients.skp_1 2.58ms -> 1.92ms 0.74x > tabl_cuteoverload.skp_1 4.55ms -> 3.38ms 0.74x > tabl_cnn.skp_1 3.13ms -> 2.29ms 0.73x > tabl_googleblog.skp_1_mpd 2.32ms -> 1.7ms 0.73x > desk_mobilenews.skp_1 3.65ms -> 2.61ms 0.71x > desk_googleplus.skp_1 3.76ms -> 2.66ms 0.71x > tabl_mozilla.skp_1_mpd 2.88ms -> 2.03ms 0.71x > desk_pinterest.skp_1_mpd 3.17ms -> 2.21ms 0.7x > desk_css3gradients.skp_1_mpd 2.98ms -> 2.07ms 0.69x > desk_silkfinance.skp_1 2.06ms -> 1.42ms 0.69x > desk_facebook.skp_1 4.5ms -> 3.07ms 0.68x > desk_mobilenews.skp_1_mpd 4.05ms -> 2.73ms 0.68x > desk_baidu.skp_1_mpd 2.73ms -> 1.81ms 0.66x > desk_weather.skp_1_mpd 3.93ms -> 2.5ms 0.64x > desk_wordpress.skp_1 2.15ms -> 1.36ms 0.63x > desk_googlehome.skp_1_mpd 1.02ms -> 605us 0.59x > desk_fontwipe.skp_1 722us -> 402us 0.56x > desk_fontwipe.skp_1_mpd 897us -> 486us 0.54x > desk_baidu.skp_1 3.02ms -> 1.6ms 0.53x > desk_forecastio.skp_1 2.01ms -> 999us 0.5x > desk_amazon.skp_1_mpd 1.77ms -> 860us 0.49x > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/7e225bdb1f00ae4aed524ff8d0a61df3d3abb109 > > Committed: https://skia.googlesource.com/skia/+/1b6b626f9bc0deebe4fe2e63f422d6b122419205 TBR=reed@google.com,robertphillips@google.com,scroggo@google.com,mtklein@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/902783005
* nanobench: lazily decode bitmaps in .skps.Gravatar mtklein2015-02-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This cuts down on tool overhead when running something like recording only, $ out/Release/nanobench --match skp --config nonrendering which doesn't usually ever need to decode the images. The actual measurements for recording don't change, as the decode is not in the timed section. It just skips irrelevant code, removing it from the profile and making the tool run faster. This does, however, make a significant difference for playback speed. Most skps draw faster with this patch, some slower. I don't really have a good intuition for what's going on here. There is a fixed clip acting as a viewport, so there are probably lots of images that don't ever need to be decoded. Ideas? Is this perhaps because we're now blitting from smaller, partially decoded source images? ~/skia (clean) $ compare clean.log lazy-decode-bitmaps.log tabl_slashdot.skp_1 2.76ms -> 4.33ms 1.57x tabl_slashdot.skp_1_mpd 2.79ms -> 4.07ms 1.46x tabl_sahadan.skp_1 3.41ms -> 4.87ms 1.43x tabl_googleblog.skp_1 1.52ms -> 2.05ms 1.35x tabl_techmeme.skp_1_mpd 1.14ms -> 1.51ms 1.32x tabl_transformice.skp_1 2.61ms -> 3.43ms 1.31x tabl_sahadan.skp_1_mpd 3.54ms -> 4.48ms 1.26x tabl_techmeme.skp_1 1.01ms -> 1.27ms 1.26x tabl_nytimes.skp_1_mpd 1ms -> 1.23ms 1.23x tabl_worldjournal.skp_1_mpd 1.98ms -> 2.43ms 1.23x tabl_pravda.skp_1_mpd 2.05ms -> 2.51ms 1.22x tabl_transformice.skp_1_mpd 2.75ms -> 3.19ms 1.16x tabl_nytimes.skp_1 874us -> 1.01ms 1.15x tabl_pravda.skp_1 1.83ms -> 1.99ms 1.09x tabl_worldjournal.skp_1 1.76ms -> 1.91ms 1.09x desk_wowwiki.skp_1_mpd 3.7ms -> 3.9ms 1.05x tabl_digg.skp_1 3.99ms -> 4.16ms 1.04x tabl_ukwsj.skp_1_mpd 3ms -> 3.12ms 1.04x desk_booking.skp_1 3.74ms -> 3.81ms 1.02x desk_googlespreadsheetdashed.skp_1 10.6ms -> 10.6ms 1x tabl_ukwsj.skp_1 2.88ms -> 2.89ms 1x desk_googlespreadsheetdashed.skp_1_mpd 11.8ms -> 11.8ms 1x desk_jsfiddlehumperclip.skp_1_mpd 891us -> 888us 1x desk_googlespreadsheet.skp_1 4.65ms -> 4.62ms 0.99x tabl_gspro.skp_1_mpd 1.97ms -> 1.94ms 0.99x desk_booking.skp_1_mpd 4.1ms -> 4ms 0.98x desk_carsvg.skp_1 18.2ms -> 17.7ms 0.97x desk_gmailthread.skp_1_mpd 2.81ms -> 2.73ms 0.97x desk_tigersvg.skp_1_mpd 19.5ms -> 18.9ms 0.97x desk_mapsvg.skp_1 88.4ms -> 85.6ms 0.97x tabl_cnet.skp_1_mpd 1.43ms -> 1.38ms 0.97x desk_jsfiddlebigcar.skp_1 1.26ms -> 1.22ms 0.96x desk_gws.skp_1 1.87ms -> 1.8ms 0.96x desk_linkedin.skp_1 2.07ms -> 1.98ms 0.96x tabl_deviantart.skp_1_mpd 118ms -> 113ms 0.96x tabl_cnet.skp_1 1.2ms -> 1.14ms 0.95x tabl_androidpolice.skp_1_mpd 5.95ms -> 5.63ms 0.95x desk_sfgate.skp_1 1.75ms -> 1.64ms 0.94x desk_twitter.skp_1 74ms -> 69.6ms 0.94x desk_youtube.skp_1_mpd 3.17ms -> 2.96ms 0.93x desk_gmailthread.skp_1 2.73ms -> 2.54ms 0.93x desk_silkfinance.skp_1_mpd 1.71ms -> 1.59ms 0.93x desk_jsfiddlebigcar.skp_1_mpd 1.45ms -> 1.35ms 0.93x desk_pokemonwiki.skp_1_mpd 2.72ms -> 2.51ms 0.92x desk_gws.skp_1_mpd 2.14ms -> 1.98ms 0.92x desk_googlehome.skp_1 563us -> 517us 0.92x desk_espn.skp_1 4.24ms -> 3.89ms 0.92x tabl_culturalsolutions.skp_1 12.7ms -> 11.6ms 0.91x desk_sfgate.skp_1_mpd 1.91ms -> 1.74ms 0.91x tabl_hsfi.skp_1 1.06ms -> 966us 0.91x desk_samoasvg.skp_1_mpd 10.5ms -> 9.47ms 0.91x desk_facebook.skp_1_mpd 3.8ms -> 3.43ms 0.9x desk_youtube.skp_1 3.52ms -> 3.14ms 0.89x desk_ebay.skp_1_mpd 2.95ms -> 2.62ms 0.89x desk_samoasvg.skp_1 10.9ms -> 9.66ms 0.89x desk_googlespreadsheet.skp_1_mpd 5.59ms -> 4.94ms 0.88x desk_mapsvg.skp_1_mpd 100ms -> 87.9ms 0.88x desk_espn.skp_1_mpd 4.7ms -> 4.12ms 0.88x desk_wordpress.skp_1_mpd 1.92ms -> 1.68ms 0.87x tabl_deviantart.skp_1 140ms -> 122ms 0.87x tabl_cuteoverload.skp_1_mpd 4.41ms -> 3.83ms 0.87x desk_tigersvg.skp_1 19.6ms -> 17ms 0.87x tabl_googlecalendar.skp_1 4.01ms -> 3.44ms 0.86x desk_blogger.skp_1 2.49ms -> 2.14ms 0.86x desk_chalkboard.skp_1_mpd 52.7ms -> 45ms 0.85x desk_weather.skp_1 2.88ms -> 2.46ms 0.85x desk_chalkboard.skp_1 51ms -> 43.4ms 0.85x desk_yahooanswers.skp_1 2.74ms -> 2.32ms 0.85x desk_forecastio.skp_1_mpd 1.26ms -> 1.07ms 0.85x tabl_androidpolice.skp_1 5.18ms -> 4.34ms 0.84x desk_yahooanswers.skp_1_mpd 3.44ms -> 2.85ms 0.83x tabl_cnn.skp_1_mpd 2.59ms -> 2.15ms 0.83x desk_pinterest.skp_1 2.69ms -> 2.22ms 0.83x tabl_hsfi.skp_1_mpd 1.6ms -> 1.32ms 0.82x tabl_culturalsolutions.skp_1_mpd 13.8ms -> 11.3ms 0.82x desk_twitter.skp_1_mpd 76.6ms -> 63ms 0.82x desk_ebay.skp_1 3.11ms -> 2.51ms 0.81x tabl_mlb.skp_1_mpd 3.17ms -> 2.53ms 0.8x tabl_mozilla.skp_1 2.42ms -> 1.91ms 0.79x desk_pokemonwiki.skp_1 2.84ms -> 2.22ms 0.78x desk_carsvg.skp_1_mpd 23.3ms -> 17.8ms 0.77x desk_wowwiki.skp_1 4.21ms -> 3.21ms 0.76x desk_amazon.skp_1 963us -> 728us 0.76x desk_css3gradients.skp_1 2.58ms -> 1.92ms 0.74x tabl_cuteoverload.skp_1 4.55ms -> 3.38ms 0.74x tabl_cnn.skp_1 3.13ms -> 2.29ms 0.73x tabl_googleblog.skp_1_mpd 2.32ms -> 1.7ms 0.73x desk_mobilenews.skp_1 3.65ms -> 2.61ms 0.71x desk_googleplus.skp_1 3.76ms -> 2.66ms 0.71x tabl_mozilla.skp_1_mpd 2.88ms -> 2.03ms 0.71x desk_pinterest.skp_1_mpd 3.17ms -> 2.21ms 0.7x desk_css3gradients.skp_1_mpd 2.98ms -> 2.07ms 0.69x desk_silkfinance.skp_1 2.06ms -> 1.42ms 0.69x desk_facebook.skp_1 4.5ms -> 3.07ms 0.68x desk_mobilenews.skp_1_mpd 4.05ms -> 2.73ms 0.68x desk_baidu.skp_1_mpd 2.73ms -> 1.81ms 0.66x desk_weather.skp_1_mpd 3.93ms -> 2.5ms 0.64x desk_wordpress.skp_1 2.15ms -> 1.36ms 0.63x desk_googlehome.skp_1_mpd 1.02ms -> 605us 0.59x desk_fontwipe.skp_1 722us -> 402us 0.56x desk_fontwipe.skp_1_mpd 897us -> 486us 0.54x desk_baidu.skp_1 3.02ms -> 1.6ms 0.53x desk_forecastio.skp_1 2.01ms -> 999us 0.5x desk_amazon.skp_1_mpd 1.77ms -> 860us 0.49x BUG=skia: Committed: https://skia.googlesource.com/skia/+/7e225bdb1f00ae4aed524ff8d0a61df3d3abb109 Review URL: https://codereview.chromium.org/743613005
* Add texture create/upload stats and make nanobench have explicit gpu stats flagGravatar bsalomon2015-02-02
| | | | Review URL: https://codereview.chromium.org/891973002
* Spin off GM::runAsBench() from flags.Gravatar mtklein2015-01-23
| | | | | | | | This will let us kill flags. BUG=skia: Review URL: https://codereview.chromium.org/873753002
* More natural way to serialize GPU tasks and tests.Gravatar mtklein2015-01-21
| | | | | | | | | | | | | This basically takes out the Windows-only hacks and promotes them to cross-platform behavior driven by --gpu_threading. - When --gpu_threading is false (the default), this puts GPU tasks and tests together in the same GPU enclave. They all run serially. - When --gpu_threading is true, both the tests and the tasks run totally independently, just like the thread-safe CPU-bound work. BUG=skia:3255 Review URL: https://codereview.chromium.org/847273005
* Make SkStream *not* ref counted.Gravatar scroggo2015-01-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SkStream is a stateful object, so it does not make sense for it to have multiple owners. Make SkStream inherit directly from SkNoncopyable. Update methods which previously called SkStream::ref() (e.g. SkImageDecoder::buildTileIndex() and SkFrontBufferedStream::Create(), which required the existing owners to call SkStream::unref()) to take ownership of their SkStream parameters and delete when done (including on failure). Switch all SkAutoTUnref<SkStream>s to SkAutoTDelete<SkStream>s. In some cases this means heap allocating streams that were previously stack allocated. Respect ownership rules of SkTypeface::CreateFromStream() and SkImageDecoder::buildTileIndex(). Update the comments for exceptional methods which do not affect the ownership of their SkStream parameters (e.g. SkPicture::CreateFromStream() and SkTypeface::Deserialize()) to be explicit about ownership. Remove test_stream_life, which tested that buildTileIndex() behaved correctly when SkStream was a ref counted object. The test does not make sense now that it is not. In SkPDFStream, remove the SkMemoryStream member. Instead of using it, create a new SkMemoryStream to pass to fDataStream (which is now an SkAutoTDelete). Make other pdf rasterizers behave like SkPDFDocumentToBitmap. SkPDFDocumentToBitmap delete the SkStream, so do the same in the following pdf rasterizers: SkPopplerRasterizePDF SkNativeRasterizePDF SkNoRasterizePDF Requires a change to Android, which currently treats SkStreams as ref counted objects. Review URL: https://codereview.chromium.org/849103004
* Require budget decision when creating a RenderTarget SkSurface.Gravatar bsalomon2015-01-16
| | | | | | | | | Restructure SkGpuDevice creation: *SkSurfaceProps are optional. *Use SkSurfaceProps to communicate DF text rather than a flag. *Tell SkGpuDevice::Create whether RT comes from cache or not. Review URL: https://codereview.chromium.org/848903004
* Sketch DM refactor.Gravatar mtklein2015-01-15
| | | | | | | | | | | | | | | | | | | BUG=skia:3255 I think this supports everything DM used to, but has completely refactored how it works to fit the design in the bug. Configs like "tiles-gpu" are automatically wired up. I wouldn't suggest looking at this as a diff. There's just a bunch of deleted files, a few new files, and one new file that shares a name with a deleted file (DM.cpp). NOTREECHECKS=true Committed: https://skia.googlesource.com/skia/+/709d2c3e5062c5b57f91273bfc11a751f5b2bb88 Review URL: https://codereview.chromium.org/788243008
* Revert of Sketch DM refactor. (patchset #45 id:850001 of ↵Gravatar mtklein2015-01-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/788243008/) Reason for revert: plenty of data Original issue's description: > Sketch DM refactor. > > BUG=skia:3255 > > > I think this supports everything DM used to, but has completely refactored how > it works to fit the design in the bug. > > Configs like "tiles-gpu" are automatically wired up. > > I wouldn't suggest looking at this as a diff. There's just a bunch of deleted > files, a few new files, and one new file that shares a name with a deleted file > (DM.cpp). > > NOTREECHECKS=true > > Committed: https://skia.googlesource.com/skia/+/709d2c3e5062c5b57f91273bfc11a751f5b2bb88 TBR=bsalomon@google.com,mtklein@chromium.org NOTREECHECKS=true NOTRY=true BUG=skia:3255 Review URL: https://codereview.chromium.org/853883004
* Sketch DM refactor.Gravatar mtklein2015-01-15
| | | | | | | | | | | | | | | | | BUG=skia:3255 I think this supports everything DM used to, but has completely refactored how it works to fit the design in the bug. Configs like "tiles-gpu" are automatically wired up. I wouldn't suggest looking at this as a diff. There's just a bunch of deleted files, a few new files, and one new file that shares a name with a deleted file (DM.cpp). NOTREECHECKS=true Review URL: https://codereview.chromium.org/788243008