Commit Graph

1228 Commits

Author SHA1 Message Date
reed
7c44ca926b replace SkFixedDiv impl with native 64bit math
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1022543003
2015-03-18 19:04:43 -07:00
senorblanco
24e06d5244 Remove uniqueID from all filter serialization.
(This is essentially a revert of https://codereview.chromium.org/503833002/.)

This was necessary back when SkPaint was flattened even for in-process use. Now that we only flatten SkPaint for cross-process use, there's no need to serialize UniqueIDs.

Note: SkDropShadowImageFilter is being constructed with a croprect and UniqueID (of 0) in Blink. I've made the uniqueID param default to 0 temporarily, until this rolls in and Blink can be changed. (Blink can't be changed first, since unlike the other filters, there's no constructor that takes a cropRect but not a uniqueID.)

BUG=skia:

Review URL: https://codereview.chromium.org/1019493002
2015-03-18 12:11:33 -07:00
reed
93a1215fe0 SkPaint::FilterLevel -> SkFilterQuality
clone (+rebase) of https://codereview.chromium.org/1009183002/

BUG=skia:
TBR=scroggo@google.com

Review URL: https://codereview.chromium.org/1014533004
2015-03-16 10:08:34 -07:00
mtklein
95553d917c DM: display current memory usage (instead of peak) when available.
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
2015-03-12 08:24:21 -07:00
bsalomon
cc4d6673a9 Increase default tile sizes in nanobench
R=mtklein@google.com

Review URL: https://codereview.chromium.org/982863003
2015-03-05 13:42:27 -08:00
mtklein
548bf38b28 4-at-a-time SkPMColor -> SkPMFloat API.
Please see if this looks usable.  It may even give a perf boost if you use it, even without custom implementations for each instruction set.

I've been trying this morning to beat this naive loop implementation, but so far no luck with either _SSE2.h or _SSSE3.h.  It's possible this is an artifact of the microbenchmark, because we're not doing anything between the conversions.  I'd like to see how this fits into real code, what assembly's generated, what the hot spots are, etc.

I've updated the tests to test these new APIs, and splintered off a pair of new benchmarks that use the new APIs.  This required some minor rejiggering in the benches.

BUG=skia:

Review URL: https://codereview.chromium.org/978213003
2015-03-05 11:31:59 -08:00
mtklein
4e644f5d50 Update SkPMFloat API a bit.
Instead of set(SkPMColor), add a constructor SkPMFloat(SkPMColor).
Replace setA(), setR(), etc. with a 4 float constructor.

And, promise to stick to SkPMColor order.

BUG=skia:

Review URL: https://codereview.chromium.org/977773002
2015-03-04 11:25:27 -08:00
mtklein
60ff4582ae Trim the fat off SkPMFloat bench.
This bench was ~75% overhead, ~25% good bench.  It is now just about the
opposite: about 30% of the runtime is loop and random number overhead, and
about 70% of the time is spent doing SkPMColor <-> SkPMFloat work.

BUG=skia:

NOPRESUBMIT=true

Review URL: https://codereview.chromium.org/968133005
2015-03-03 08:03:27 -08:00
reed
7eeba25877 Notify resource caches when pixelref genID goes stale
patch from issue 954443002 at patchset 40001 (http://crrev.com/954443002#ps40001)

BUG=skia:

Review URL: https://codereview.chromium.org/950363002
2015-02-24 13:54:23 -08:00
mtklein
a2f4be76a9 Sketch SkPMFloat
BUG=skia:

Committed: https://skia.googlesource.com/skia/+/50d2b3114b3e59dc84811881591bf25b2c1ecb9f

CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu13.10-GCC4.8-Arm7-Release-Android_Neon-Trybot

http://build.chromium.org/p/client.skia.compile/builders/Build-Ubuntu13.10-GCC4.8-Arm7-Release-Android_Neon/builds/2120/steps/build%20most/logs/stdio

Review URL: https://codereview.chromium.org/936633002
2015-02-23 10:04:34 -08:00
mtklein
088302756b Revert of Sketch SkPMFloat (patchset #15 id:270001 of https://codereview.chromium.org/936633002/)
Reason for revert:
http://build.chromium.org/p/client.skia.compile/builders/Build-Ubuntu13.10-GCC4.8-Arm7-Release-Android_Neon/builds/2120/steps/build%20most/logs/stdio

Original issue's description:
> Sketch SkPMFloat
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/50d2b3114b3e59dc84811881591bf25b2c1ecb9f

TBR=reed@google.com,msarrett@google.com,mtklein@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/952453004
2015-02-23 09:44:34 -08:00
mtklein
50d2b3114b Sketch SkPMFloat
BUG=skia:

Review URL: https://codereview.chromium.org/936633002
2015-02-23 09:39:27 -08:00
bsalomon
8718aafec2 Rename GrContentKey to GrUniqueKey
Review URL: https://codereview.chromium.org/940463006
2015-02-19 07:24:21 -08:00
bsalomon
3582d3ee9f Split out methods in GrGpuResource::CacheAccess that can be called outside of the cache.
Review URL: https://codereview.chromium.org/923143002
2015-02-13 14:20:05 -08:00
msarett
95f192d199 Adding new benchmark to test image decoding performance.
BUG=skia:

Review URL: https://codereview.chromium.org/918673002
2015-02-13 09:05:42 -08:00
bsalomon
0ea80f43a1 Rename GrResourceCache2->GrResourceCache
TBR=robertphillips@google.com

Review URL: https://codereview.chromium.org/921453002
2015-02-11 10:49:59 -08:00
joshualitt
02b05015b5 Small change to use a GrGeometryProcessor for all BitmapText draw calls
BUG=skia:

Review URL: https://codereview.chromium.org/914723002
2015-02-11 06:56:30 -08:00
mtklein
bfd5bff75c Simplify SkBBH::insert API
No one's exploiting the ability to take ownership of the array anymore.

BUG=skia:

Review URL: https://codereview.chromium.org/913833002
2015-02-10 13:44:27 -08:00
mtklein
57f27bdcbd Revert of nanobench: lazily decode bitmaps in .skps. (patchset #1 id:1 of 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
2015-02-09 11:58:41 -08:00
mtklein
1b6b626f9b 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

Review URL: https://codereview.chromium.org/743613005
2015-02-09 11:44:23 -08:00
reed
70a8ca8351 add rounded-join option to bigpath bench
BUG=skia:
TBR=
NOTRY=True
... win bot offline

Review URL: https://codereview.chromium.org/909893002
2015-02-09 08:05:52 -08:00
reed
37a4736971 add bench for very big paths
BUG= 455429
TBR=

Review URL: https://codereview.chromium.org/909563002
2015-02-06 13:04:16 -08:00
bsalomon
b12ea41286 Add texture create/upload stats and make nanobench have explicit gpu stats flag
Review URL: https://codereview.chromium.org/891973002
2015-02-02 21:19:50 -08:00
reed
96638d1db4 add bench for building mipmaps
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/873293003
2015-01-26 12:28:54 -08:00
cwallez
c12b74dc41 Collapse consecutive SkTableColorFilters
BUG=skia:1366

For the added bench, the collapsing makes the bench take:
- 70% of the time for CPU rendering of 3 consecutive matrix filters
- almost no change in the GPU rendering of the matrix filters
- 50% of the time for CPU and GPU rendering of 3 consecutive table filters

Review URL: https://codereview.chromium.org/776673002
2015-01-26 07:45:53 -08:00
tfarina
0004e7db42 Update references to skiaperf.com.
The new server is being run in perf.skia.org.

BUG=None
R=jcgregorio@google.com

Review URL: https://codereview.chromium.org/866943003
2015-01-26 06:47:55 -08:00
mtklein
1c4029296f remove unused GM flags
Depends on https://codereview.chromium.org/873753002/

Thumbs up to CLion for refactoring this for me.

BUG=skia:

Review URL: https://codereview.chromium.org/867963004
2015-01-23 11:07:08 -08:00
mtklein
cf5d9c993d Spin off GM::runAsBench() from flags.
This will let us kill flags.

BUG=skia:

Review URL: https://codereview.chromium.org/873753002
2015-01-23 10:31:45 -08:00
bsalomon
24db3b1c35 Add specialized content key class for resources.
Review URL: https://codereview.chromium.org/858123002
2015-01-23 04:24:05 -08:00
mtklein
55e88b226c More natural way to serialize GPU tasks and tests.
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
2015-01-21 15:50:13 -08:00
scroggo
a1193e4b0e Make SkStream *not* ref counted.
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
2015-01-21 12:09:53 -08:00
bsalomon
afe3005be3 Require budget decision when creating a RenderTarget SkSurface.
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
2015-01-16 07:32:33 -08:00
mtklein
748ca3bf2d 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

Review URL: https://codereview.chromium.org/788243008
2015-01-15 10:56:12 -08:00
mtklein
114c3cd054 Revert of Sketch DM refactor. (patchset #45 id:850001 of 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
2015-01-15 10:15:02 -08:00
mtklein
709d2c3e50 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

Review URL: https://codereview.chromium.org/788243008
2015-01-15 08:30:25 -08:00
bsalomon
5236cf480d Make uncached textures uncached from the get go.
This avoids the problem of a newly created uncached texture causing a purge of cached resources.

BUG=chromium:445885

Review URL: https://codereview.chromium.org/846303002
2015-01-14 10:42:08 -08:00
mtklein
72c9faab45 Fix up all the easy virtual ... SK_OVERRIDE cases.
This fixes every case where virtual and SK_OVERRIDE were on the same line,
which should be the bulk of cases.  We'll have to manually clean up the rest
over time unless I level up in regexes.

for f in (find . -type f); perl -p -i -e 's/virtual (.*)SK_OVERRIDE/\1SK_OVERRIDE/g' $f; end

BUG=skia:

Review URL: https://codereview.chromium.org/806653007
2015-01-09 10:06:40 -08:00
mtklein
d0256a2fbc PictureNestingBench: stay in ints.
BUG=skia:

Review URL: https://codereview.chromium.org/784173004
2015-01-09 08:33:36 -08:00
mtklein
703dd2ed18 Remove SkTileGrid (except for TileGridInfo).
TBR=reed@google.com

BUG=skia:3085

Review URL: https://codereview.chromium.org/845623002
2015-01-09 06:41:48 -08:00
reed
5965c8ae4e add ImageGenerator::NewFromData to porting layer
BUG=skia:3275

Review URL: https://codereview.chromium.org/834633006
2015-01-07 18:04:45 -08:00
tfarina
aa458fb20a Cleanup: More override fixes - another round.
BUG=skia:3075
TEST=ninja -C out/Debug
TBR=reed@google.com

Review URL: https://codereview.chromium.org/831113002
2015-01-05 17:18:51 -08:00
bsalomon
7775c85611 Add a simpler key type for scratch resource keys.
BUG=skia:2889

Review URL: https://codereview.chromium.org/815833004
2014-12-30 12:50:52 -08:00
tfarina
1348dfd5df Cleanup: Remove a bunch of SkFontHost.h includes (unused).
Nobody that is including SkFontHost is using SkFontHost API, so lets
remove this includes, since the API per se is deprecated.

BUG=None
R=reed@google.com

Review URL: https://codereview.chromium.org/803733006
2014-12-18 05:48:53 -08:00
bsalomon
0aa5cea869 fix last warnings on w64 and turn on w.a.e.
Review URL: https://codereview.chromium.org/801413002
2014-12-15 09:13:35 -08:00
Florin Malita
c54d8db4d1 Remove SkCanvas::drawBitmapMatrix()
R=mtklein@google.com, reed@google.com, robertphillips@google.com

Review URL: https://codereview.chromium.org/789033002
2014-12-10 12:02:16 -05:00
qiankun.miao
e18a530afd Add bench to measure blur rects performance
BUG=skia:

Review URL: https://codereview.chromium.org/787913002
2014-12-09 17:47:05 -08:00
robertphillips
e451c4df73 Update nanobench so the non-MPD path doesn't permit layer hoisting
Review URL: https://codereview.chromium.org/787923002
2014-12-09 10:28:00 -08:00
robertphillips
a3e52724ac Switch non-MPD nanobench path to use a separate canvas per tile
It is desirable that, when layer hoisting is disabled, the MPD and non-MPD timings be
roughly the same. Unfortunately, using a separate canvas for each tile (a requirement
for MPD) introduces its own discrepancy into the timing. Using a separate canvas for
each tile doesn't seem to make a difference for 8888 (see the non-MPD 8888 column below)
but slows down GPU rendering (see the non-MPD GPU column below). Since this is how
Chromium renders I propose switching to this regimen (even though it is "slowing down"
GPU rendering).

nanobench mean times (ms) with layer hoisting disabled (for desk_amazon.skp)

8888
                          MPD     non-MPD
1 canvas (old-style)     0.628    1.71
separate (new-style)     0.795    1.63

GPU
                          MPD     non-MPD
1 canvas (old-style)     2.34     1.69
separate (new-style)     2.32     2.66

Review URL: https://codereview.chromium.org/779643002
2014-12-09 10:27:54 -08:00
mtklein
5a8fc33320 Don't upload metrics we don't want to track.
BUG=skia:

Review URL: https://codereview.chromium.org/758853004
2014-12-05 07:25:16 -08:00
mtklein
e109145bf3 nanobench: upload peak memory usage as its own trace.
We'll end up with a result like this:
      "memory_usage" : {
         "meta" : {
            "max_rss_mb" : 57
         }
      }

BUG=skia:

Review URL: https://codereview.chromium.org/780013002
2014-12-04 10:47:02 -08:00
mtklein
051e56df8f Upload picture byte size and op count metrics for SKP recording.
Look okay?

{
   "results" : {
      "desk_amazon.skp_1264_3999" : {
         "nonrendering" : {
            "bytes" : 75656,
            "max_ms" : 1.150187,
            "mean_ms" : 1.150187,
            "median_ms" : 1.150187,
            "min_ms" : 1.150187,
            "ops" : 659,
            "options" : {
               "bench_type" : "recording",
               "clip" : "0 0 1000 1000",
               "name" : "desk_amazon.skp",
               "scale" : "1",
               "source_type" : "skp"
            }
         }
      },
...

BUG=skia:

Review URL: https://codereview.chromium.org/773323002
2014-12-04 08:46:51 -08:00
robertphillips
63242d7d24 Fix SKPBench tiling so MPD and non-MPD match
Two issues with the SKPBench tile computation were causing the MPD path to do more work:

The clip from the parent canvas wasn't being used to trim content off the edges of the MPD tiles

The non-MPD path was not taking the scale into account in its tile placement (resulting in it having fewer, larger active tiles when scaling).

Review URL: https://codereview.chromium.org/776273002
2014-12-04 08:31:03 -08:00
mtklein
4f10844149 Turn on MPD threading in nanobench.
Seems okay after this small patch to skip lockPixels() / unlockPixels().

BUG=skia:3149

CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu13.10-GCE-NoGPU-x86_64-Release-TSAN-Trybot

Review URL: https://codereview.chromium.org/773203003
2014-12-03 13:07:39 -08:00
mtklein
535776eb28 Revert of nanobench: lazily decode bitmaps in .skps. (patchset #1 id:1 of https://codereview.chromium.org/743613005/)
Reason for revert:
Some bots crashing.

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

TBR=reed@google.com,robertphillips@google.com,scroggo@google.com,mtklein@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/759753004
2014-11-25 14:57:26 -08:00
mtklein
7e225bdb1f 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:

Review URL: https://codereview.chromium.org/743613005
2014-11-25 14:34:03 -08:00
bsalomon
10e23caea3 Use scratch keys for stencil buffers.
BUG=skia:2889

Committed: https://skia.googlesource.com/skia/+/91175f19664a62851da4ca4e0984a7c7c45b258f

Review URL: https://codereview.chromium.org/747043004
2014-11-25 05:52:06 -08:00
bsalomon
19cd0f1813 Revert "Use scratch keys for stencil buffers."
This reverts commit 91175f1966.

Revert "Cleanup res cache bench and split out into a unit test."

This reverts commit 4e4303f002.

Revert "rebaselines"

This reverts commit 65ba7b5775.

TBR=tomhudson@google.com

Review URL: https://codereview.chromium.org/752233002
2014-11-24 12:19:06 -08:00
reed
90d0ff013b add some debugging to SkNVRefCnt
BUG=skia:

Review URL: https://codereview.chromium.org/745383003
2014-11-24 12:02:31 -08:00
bsalomon
4e4303f002 Cleanup res cache bench and split out into a unit test.
BUG=skia:2889

Review URL: https://codereview.chromium.org/754833002
2014-11-24 08:25:05 -08:00
bsalomon
91175f1966 Use scratch keys for stencil buffers.
BUG=skia:2889

Review URL: https://codereview.chromium.org/747043004
2014-11-24 07:05:15 -08:00
robertphillips
186a08ed72 Fix memory leak in nanobench
This is cleanup for (Add MultiPictureDraw to nanobench - https://codereview.chromium.org/731973005/)

Review URL: https://codereview.chromium.org/730343003
2014-11-21 06:53:00 -08:00
robertphillips
5b69377507 Add MultiPictureDraw to nanobench
I would like some guard against performance regressions on our side before turning layer hoisting on in Chromium.

TBR=bsalomon@google.com

Committed: https://skia.googlesource.com/skia/+/0ddad31012dabfc1267effc8071d37f7d606efbe

Review URL: https://codereview.chromium.org/731973005
2014-11-21 06:19:36 -08:00
robertphillips
e77dadd91a Revert of Add MultiPictureDraw to nanobench (patchset #7 id:120001 of https://codereview.chromium.org/731973005/)
Reason for revert:
Needs more work

Original issue's description:
> Add MultiPictureDraw to nanobench
>
> I would like some guard against performance regressions on our side before turning layer hoisting on in Chromium.
>
> TBR=bsalomon@google.com
>
> Committed: https://skia.googlesource.com/skia/+/0ddad31012dabfc1267effc8071d37f7d606efbe

TBR=mtklein@google.com,bsalomon@google.com
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/750583002
2014-11-21 05:50:21 -08:00
robertphillips
0ddad31012 Add MultiPictureDraw to nanobench
I would like some guard against performance regressions on our side before turning layer hoisting on in Chromium.

TBR=bsalomon@google.com

Review URL: https://codereview.chromium.org/731973005
2014-11-21 05:35:54 -08:00
robertphillips
8037653195 Add computation of saveLayer information to RecordingBench
In (Add flag to beginRecording to request saveLayer information - https://codereview.chromium.org/721883002/) I claimed the extra recording cost would be negligible. This CL attempts to put some numbers behind that.

Review URL: https://codereview.chromium.org/741523002
2014-11-18 11:53:02 -08:00
mtklein
a06a953121 Prune SkRTree
- Propagate a bunch of constant parameters through.
  - Delete code that's not used when bulk loading.
  - Allocate all Nodes together.
  - Stay in SkRect.

Doing a single malloc for the nodes can't not have improved memory usage.

Looks like this might improve record performance ~5%, probably mostly from
staying in SkRects.  This finally dethrones building the BBH as the hot spot.
(Now it's mapping user bounds back to device bounds and adjusting for paints.)

Recording time changes from my MBP:
    desk_rectangletransition.skp	11.5us -> 11.7us	1x
             desk_forecastio.skp	 115us ->  114us	0.98x
                desk_booking.skp	 550us ->  541us	0.98x
            tabl_mercurynews.skp	 176us ->  173us	0.98x
                   tabl_hsfi.skp	 294us ->  287us	0.98x
              desk_wordpress.skp	 351us ->  343us	0.98x
           tabl_worldjournal.skp	 439us ->  426us	0.97x
                  tabl_gmail.skp	20.3us -> 19.7us	0.97x
         desk_youtubetvvideo.skp	10.8us -> 10.4us	0.97x
             desk_googleplus.skp	 1.1ms -> 1.07ms	0.97x
               tabl_slashdot.skp	 106us ->  103us	0.97x
         desk_jsfiddlebigcar.skp	26.7us -> 25.7us	0.96x
               tabl_techmeme.skp	95.4us -> 91.7us	0.96x
             tabl_deviantart.skp	 133us ->  127us	0.96x
              desk_pinterest.skp	40.6us -> 38.9us	0.96x
                 desk_carsvg.skp	 195us ->  187us	0.96x
               tabl_engadget.skp	 376us ->  359us	0.96x
                tabl_sahadan.skp	60.5us -> 57.5us	0.95x
      tabl_culturalsolutions.skp	 255us ->  242us	0.95x
                  tabl_gspro.skp	58.3us -> 55.5us	0.95x
               desk_linkedin.skp	 146us ->  138us	0.94x
                   desk_ebay.skp	 192us ->  181us	0.94x
                    tabl_cnn.skp	 467us ->  440us	0.94x
     desk_jsfiddlehumperclip.skp	29.9us -> 28.1us	0.94x
               desk_tigersvg.skp	43.2us -> 40.5us	0.94x
           desk_yahooanswers.skp	 131us ->  123us	0.94x
desk_googlespreadsheetdashed.skp	1.18ms -> 1.11ms	0.94x
                desk_blogger.skp	 193us ->  181us	0.94x
                tabl_mozilla.skp	1.82ms ->  1.7ms	0.94x
                    tabl_mlb.skp	 145us ->  136us	0.93x
              mobi_wikipedia.skp	 577us ->  539us	0.93x
               tabl_frantzen.skp	54.1us -> 50.4us	0.93x
                  desk_baidu.skp	87.9us -> 81.9us	0.93x
             desk_techcrunch.skp	 224us ->  209us	0.93x
                 desk_sfgate.skp	 206us ->  192us	0.93x
                  tabl_ukwsj.skp	 269us ->  250us	0.93x
               desk_facebook.skp	 316us ->  293us	0.93x
            desk_gmailthread.skp	 205us ->  190us	0.93x
         tabl_googlecalendar.skp	 158us ->  147us	0.93x
                   tabl_digg.skp	 382us ->  354us	0.93x
                 desk_amazon.skp	 106us -> 98.5us	0.93x
          tabl_androidpolice.skp	 693us ->  642us	0.93x
                tabl_nytimes.skp	 206us ->  191us	0.92x
                    desk_gws.skp	 124us ->  114us	0.92x
                desk_youtube.skp	 255us ->  235us	0.92x
           tabl_cuteoverload.skp	 583us ->  537us	0.92x
            desk_oldinboxapp.skp	  18us -> 16.6us	0.92x
             desk_mobilenews.skp	 297us ->  273us	0.92x
                 tabl_pravda.skp	 168us ->  154us	0.92x
              tabl_vnexpress.skp	 236us ->  217us	0.92x
          desk_css3gradients.skp	 202us ->  185us	0.92x
            tabl_gamedeksiam.skp	 508us ->  464us	0.91x
                desk_wowwiki.skp	1.02ms ->  929us	0.91x
                   desk_espn.skp	 209us ->  191us	0.91x
             desk_chalkboard.skp	 315us ->  284us	0.9x
                 desk_mapsvg.skp	 607us ->  543us	0.89x
            desk_pokemonwiki.skp	5.18ms -> 4.62ms	0.89x
               desk_samoasvg.skp	 335us ->  298us	0.89x
        desk_youtubetvbrowse.skp	10.1us -> 8.59us	0.85x
BUG=skia:3085, skia:2834

Review URL: https://codereview.chromium.org/734723002
2014-11-18 09:27:49 -08:00
kkinnunen
b33402bc87 Do not calculate many sierpinski fractals for each nanobench run unless needed
Removes work done by the constructors of picture_nesting benches,
and moves the work to the Benchmark::onPreDraw override.

This avoids PictureNesting::sierpinsky showing up in profile traces
when profiling other benches.

Review URL: https://codereview.chromium.org/725523002
2014-11-18 04:50:50 -08:00
bsalomon
12299ab7a1 Make GrResourceCache2 responsible for calling release, abandon, and ~.
BUG=skia:2889

TBR=robertphillips@google.com

NOTRY=true

Review URL: https://codereview.chromium.org/729683002
2014-11-14 13:33:09 -08:00
bsalomon
71cb0c241e Replace GrResourceCache with GrResourceCache2.
BUG=skia:2889

Committed: https://skia.googlesource.com/skia/+/66a450f21a3da174b7eed89a1d5fc8591e8b6ee6

Committed: https://skia.googlesource.com/skia/+/407aa584d183c1bf314f5defd1cf0202e8a96c89

Review URL: https://codereview.chromium.org/716143004
2014-11-14 12:10:15 -08:00
bsalomon
ac49acda52 Revert of Replace GrResourceCache with GrResourceCache2. (patchset #7 id:120001 of https://codereview.chromium.org/716143004/)
Reason for revert:
broken again

Original issue's description:
> Replace GrResourceCache with GrResourceCache2.
>
> BUG=skia:2889
>
> Committed: https://skia.googlesource.com/skia/+/66a450f21a3da174b7eed89a1d5fc8591e8b6ee6
>
> Committed: https://skia.googlesource.com/skia/+/407aa584d183c1bf314f5defd1cf0202e8a96c89

TBR=robertphillips@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2889

Review URL: https://codereview.chromium.org/726913002
2014-11-14 06:47:39 -08:00
bsalomon
407aa584d1 Replace GrResourceCache with GrResourceCache2.
BUG=skia:2889

Committed: https://skia.googlesource.com/skia/+/66a450f21a3da174b7eed89a1d5fc8591e8b6ee6

Review URL: https://codereview.chromium.org/716143004
2014-11-14 06:29:40 -08:00
bsalomon
f21dab9540 Revert of Replace GrResourceCache with GrResourceCache2. (patchset #6 id:100001 of https://codereview.chromium.org/716143004/)
Reason for revert:
Breaking stuff

Original issue's description:
> Replace GrResourceCache with GrResourceCache2.
>
> BUG=skia:2889
>
> Committed: https://skia.googlesource.com/skia/+/66a450f21a3da174b7eed89a1d5fc8591e8b6ee6

TBR=robertphillips@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2889

Review URL: https://codereview.chromium.org/715333003
2014-11-13 13:33:28 -08:00
bsalomon
66a450f21a Replace GrResourceCache with GrResourceCache2.
BUG=skia:2889

Review URL: https://codereview.chromium.org/716143004
2014-11-13 13:19:10 -08:00
jcgregorio
3b27adef0a Revert of Make nanobench and dm be usable from Chromium build (patchset #5 id:80001 of https://codereview.chromium.org/657373002/)
Reason for revert:
Causing breakages on Mac build.

Original issue's description:
> Make nanobench and dm be usable from Chromium build
>
> Move the app logic for each app as follows:
>
> <app>.cpp -- the file which contains main(). Embedders that compile
> their own apps, such as ios shell, upcoming Chromium dm etc, do not use this.
>
> <app>_main.cpp -- the main logic of the Skia test application. This will be
> used by Skia -compiled apps as well as embedder -compiled apps.
>
> <app>_main.h -- the API for the main logic. This will be
> used by Skia -compiled apps as well as embedder -compiled apps.
>
> This way (the upcoming) Chromium dm can setup its Chromium-specific setup
> in custom main(), and then call dm_main(), without the need of any
> SK_BUILD_FOR_XXXX defines controlling whether the tool defines main or not.
>
> BUG=skia:2992
>
> Committed: https://skia.googlesource.com/skia/+/c092d3bdab5f723576cc0346cea3ee282a9cb444

TBR=mtklein@chromium.org,mtklein@google.com,borenet@google.com,kkinnunen@nvidia.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2992

Review URL: https://codereview.chromium.org/724073002
2014-11-13 08:06:40 -08:00
kkinnunen
c092d3bdab Make nanobench and dm be usable from Chromium build
Move the app logic for each app as follows:

<app>.cpp -- the file which contains main(). Embedders that compile
their own apps, such as ios shell, upcoming Chromium dm etc, do not use this.

<app>_main.cpp -- the main logic of the Skia test application. This will be
used by Skia -compiled apps as well as embedder -compiled apps.

<app>_main.h -- the API for the main logic. This will be
used by Skia -compiled apps as well as embedder -compiled apps.

This way (the upcoming) Chromium dm can setup its Chromium-specific setup
in custom main(), and then call dm_main(), without the need of any
SK_BUILD_FOR_XXXX defines controlling whether the tool defines main or not.

BUG=skia:2992

Review URL: https://codereview.chromium.org/657373002
2014-11-13 05:00:57 -08:00
bsalomon
69ed47f42d Make GrGpuResource::gpuMemorySize non-virtual w/ onGpuMemorySize virtual impl
BUG=skia:2889

Review URL: https://codereview.chromium.org/702413003
2014-11-12 11:13:39 -08:00
mtklein
bf5dd4170f Add benchmark to compare different BBH query patterns.
On my laptop:
maxrss	loops	min	median	mean	max	stddev	samples   	config	bench
  37M	1	14ms	14.2ms	14.6ms	18.2ms	9%	▁█▁▁▁▁▂▂▂▁	gpu	tiled_playback_tilegrid_tiled
  40M	1	17ms	17.2ms	17.2ms	17.6ms	1%	▆▃▁█▄▇▂▁▁▁	gpu	tiled_playback_tilegrid_random
  40M	1	14.6ms	14.9ms	15.8ms	19.1ms	11%	▂▁▁▁▁▁▁█▅█	gpu	tiled_playback_rtree_tiled
  43M	1	16.5ms	16.7ms	16.8ms	17.4ms	1%	▂▃▅█▃▂▁▃▃▂	gpu	tiled_playback_rtree_random
  43M	1	15.9ms	16.1ms	16.5ms	18.7ms	6%	▁▁█▇▁▁▁▂▁▁	gpu	tiled_playback_none_tiled
  44M	1	17.9ms	17.9ms	18ms	18.1ms	1%	▂▁▅▁▇▃▁▂█▇	gpu	tiled_playback_none_random

TileGrid and RTree perform pretty much the same, both beating no BBH.

BUG=skia:3085

Review URL: https://codereview.chromium.org/699313006
2014-11-11 10:39:27 -08:00
kkinnunen
839425177c Avoid warning in nanobench related to loop count with nvprmsaa4
The tests path_hairline_{small,big}_AA_conic were calling the test
function with NVPR. This caused a warning in nanobench.

The here removed hunk comes from commit referring to skia:2042 ("Enable
NVPR by default"). This is a workaround for a bug. The bug is fixed by
the commit referring to skia:2078 ("Logan bot fails NVPR assertion in
bench").

The proper fix is indeed make sure that path renderer chain ends up
trying software path renderer, if the path contains conics and is a
hairline.

The removed hunk refers also to skia:2033 ("Figure out what is happening
with conic path segments in NVPR"). The above solution is correct also in case
NVPR would support conics, as NVPR would not still support hairlines.

BUG=skia:2078

Review URL: https://codereview.chromium.org/685213005
2014-11-11 06:57:07 -08:00
bsalomon
8b79d23f82 Use GrResourceCache2 to service content key lookups
BUG=skia:2889

Review URL: https://codereview.chromium.org/707493002
2014-11-10 10:19:06 -08:00
jvanverth
4736e1434a Get gpudft support working in dm, gm, nanobench and bench_pictures
Adds a new config to test distance field text.
Clean up some flags and #defines to read "distance field text",
not "distance field fonts" to be consistent with Chromium

NOTREECHECKS=true

Committed: https://skia.googlesource.com/skia/+/06ba179838ba4fe187cf290750aeeb4a02a2960b

Review URL: https://codereview.chromium.org/699453005
2014-11-07 07:12:46 -08:00
jvanverth
aa30ab3079 Revert of Get gpudft support working in dm, gm, nanobench and bench_pictures (patchset #2 id:20001 of https://codereview.chromium.org/699453005/)
Reason for revert:
Not compiling in ANGLE build

Original issue's description:
> Get gpudft support working in dm, gm, nanobench and bench_pictures
>
> Adds a new config to test distance field text.
> Clean up some flags and #defines to read "distance field text",
> not "distance field fonts" to be consistent with Chromium
>
> NOTREECHECKS=true
>
> Committed: https://skia.googlesource.com/skia/+/06ba179838ba4fe187cf290750aeeb4a02a2960b

TBR=bsalomon@google.com,mtklein@google.com,reed@google.com
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/707723005
2014-11-06 13:52:45 -08:00
jvanverth
06ba179838 Get gpudft support working in dm, gm, nanobench and bench_pictures
Adds a new config to test distance field text.
Clean up some flags and #defines to read "distance field text",
not "distance field fonts" to be consistent with Chromium

NOTREECHECKS=true

Review URL: https://codereview.chromium.org/699453005
2014-11-06 13:38:52 -08:00
mtklein
527930fdbb Detect loops overflow for gpu benches.
NOTREECHECKS=true

BUG=skia:

Review URL: https://codereview.chromium.org/709473002
2014-11-06 08:04:35 -08:00
mtklein
a30b2ee0da PictureRecordBench's benchmarks are no longer relevant with SkRecord.
BUG=skia:

Review URL: https://codereview.chromium.org/698163004
2014-11-04 11:14:48 -08:00
mtklein
6838d854a8 Try out SkTree in nanobench.
Looks like a fairly large recording speed win with no playback cost.

BUG=skia:

Review URL: https://codereview.chromium.org/653023003
2014-10-29 14:15:10 -07:00
bsalomon
f2703d83da rename GrTextureDesc->GrSurfaceDesc, GrTextureFlags->GrSurfaceFlags
Review URL: https://codereview.chromium.org/682223002
2014-10-28 14:33:06 -07:00
mtklein
4477c3c0e6 Cut down SkBBH API more.
- The expected case is now a single bulk-load insert() call instead of N;
  - reserve() and flushDeferredInserts() can fold into insert() now;
  - SkBBH subclasses may take ownership of the bounds

This appears to be a performance no-op on both my Mac and N5.  I guess
even the simplest indirect branch predictor ("same as last time") can predict
the repeated virtual calls to SkBBH::insert() perfectly.

BUG=skia:

Review URL: https://codereview.chromium.org/670213002
2014-10-27 10:27:10 -07:00
bsalomon
06cddec857 Print GPU cache stats in nanobench/dm with veryVerbose
Review URL: https://codereview.chromium.org/680553002
2014-10-24 10:40:50 -07:00
mtklein
14e4d392d4 Revert "Revert of create shaderproc for nofilter-opaque-dx (patchset #7 id:120001 of https://codereview.chromium.org/664783004/)"
This reverts commit 430b795cc8 and adds suppressions.

BUG=skia:

Review URL: https://codereview.chromium.org/673023002
2014-10-23 14:35:01 -07:00
mtklein
430b795cc8 Revert of create shaderproc for nofilter-opaque-dx (patchset #7 id:120001 of https://codereview.chromium.org/664783004/)
Reason for revert:
Many GMs fixed.  Needs rebaseline, perhaps layout test rebaselines.

Original issue's description:
> create shaderproc for nofilter-opaque-dx
>
>
> speedup nofilter
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/a40a276bcee2246439dcf816273c1307f5c3c69f

TBR=djsollen@google.com,reed@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/656913005
2014-10-23 12:44:40 -07:00
reed
a40a276bce create shaderproc for nofilter-opaque-dx
speedup nofilter

BUG=skia:

Review URL: https://codereview.chromium.org/664783004
2014-10-23 12:22:40 -07:00
scroggo
2a1208017d Qualify the return value of SkImageDecoder::decode
Add a new enum to differentiate between a complete decode and a
partial decode (with the third value being failure). Return this
value from SkImageDecoder::onDecode (in all subclasses, plus
SkImageDecoder_empty) and ::decode.

For convenience, if the enum is treated as a boolean, success and
partial success are both considered true.

Note that the static helper functions (DecodeFile etc) still return
true and false (for one thing, this allows us to continue to use
SkImageDecoder::DecodeMemory as an SkPicture::InstallPixelRefProc in
SkPicture::CreateFromStream).

Also correctly report failure in SkASTCImageDecoder::onDecode when
SkTextureCompressor::DecompressBufferFromFormat fails.

BUG=skia:3037
BUG:b/17419670

Review URL: https://codereview.chromium.org/647023006
2014-10-22 12:07:00 -07:00
fmalita
171e5b73a8 SkResourceCache::Key namespace support.
Add a unique-per-subclass namespace tag to make Keys from different
domains comparable.

Also drop the SkPictureShader cache and convert to using the global
resource cache instead.

R=reed@google.com,mtklein@google.com,robertphillips@google.com

Review URL: https://codereview.chromium.org/668223002
2014-10-22 11:20:40 -07:00
mtklein
c7f7f467df Draw SKPs in 256x256 tiles in nanobench.
(This CL will certainly trigger performance regression alerts.  Tiled drawing is slower than non-tiled drawing.)

BUG=skia:

Review URL: https://codereview.chromium.org/669983002
2014-10-21 12:29:25 -07:00
mtklein
dba3e64ab9 Revert of Start to vectorize SkTileGrid. (patchset #48 id:1670001 of https://codereview.chromium.org/634543004/)
Reason for revert:
breaks chrome GPU debug bots

Original issue's description:
> Start to vectorize SkTileGrid.
>
> This adds Sk4x.h to help.
>
> BUG=skia:3041
>
> Committed: https://skia.googlesource.com/skia/+/90c7992bfc6330f070f7704d63372a0ec8410170
>
> CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu12-ShuttleA-GTX660-x86-Debug-Trybot
>
> Committed: https://skia.googlesource.com/skia/+/958e9628d5f9a81aeafa78572cb4afc4b19a455a

TBR=reed@google.com,mtklein@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:3041

Review URL: https://codereview.chromium.org/637863005
2014-10-20 10:43:55 -07:00
mtklein
958e9628d5 Start to vectorize SkTileGrid.
This adds Sk4x.h to help.

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/90c7992bfc6330f070f7704d63372a0ec8410170

CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu12-ShuttleA-GTX660-x86-Debug-Trybot

Review URL: https://codereview.chromium.org/634543004
2014-10-20 07:12:34 -07:00
mtklein
2348199907 Revert of Start to vectorize SkTileGrid. (patchset #45 id:1430002 of https://codereview.chromium.org/634543004/)
Reason for revert:
Many GCC bots missing __builtin_shuffle, e.g. Test-Ubuntu12-ShuttleA-GTX660-x86-Debug-Trybot.

Original issue's description:
> Start to vectorize SkTileGrid.
>
> This adds Sk4x.h to help.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/90c7992bfc6330f070f7704d63372a0ec8410170

TBR=reed@google.com,mtklein@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/663663002
2014-10-16 15:27:47 -07:00
mtklein
90c7992bfc Start to vectorize SkTileGrid.
This adds Sk4x.h to help.

BUG=skia:

Review URL: https://codereview.chromium.org/634543004
2014-10-16 15:21:43 -07:00
mtklein
e070c2bf54 nanobench: flush after recording every Nth data point.
Got to keep our precious data in event of a crash.

With --flushEvery 10 I'm not seeing this cost any wall time.

BUG=skia:

Review URL: https://codereview.chromium.org/653083003
2014-10-14 08:40:43 -07:00
reed
5324978a88 detect --loops is < 0 and interpret that as running forever (mostly)
BUG=skia:

Review URL: https://codereview.chromium.org/643143002
2014-10-10 09:09:52 -07:00
reed
40636a5303 faster SkRect::sort
BUG=skia:

Review URL: https://codereview.chromium.org/646863002
2014-10-10 05:50:15 -07:00
reed
1119c87065 cleanup and optimize rect intersect routines
BUG=skia:

Review URL: https://codereview.chromium.org/640723004
2014-10-09 14:29:01 -07:00
sugoi
12b1831ea4 Attempt at fixing color cube bench
The original bench was hitting the cache since it was using the same color filter for all loops. By creating a new color filter within the loop, at least this part of it is solved. I'm not 100% sure this is the right way, but at least the numbers are a bit more reasonable and are affected by the output resolution.

BUG=skia:

Review URL: https://codereview.chromium.org/648483002
2014-10-09 11:35:09 -07:00
bsalomon
1e2530babb Use presence of a content key as non-scratch indicator
BUG=skia:2889

Committed: https://skia.googlesource.com/skia/+/9eefe0851eeaa8ded05b4774ebcb38ed201d5dbf

Review URL: https://codereview.chromium.org/639873002
2014-10-09 09:57:18 -07:00
caryclark
feff7d2d77 Draw more accurate thick-stroked Beziers (disabled)
Draw thick-stroked Beziers by computing the outset quadratic, measuring the error, and subdividing until the error is within a predetermined limit.

To try this CL out, change src/core/SkStroke.h:18 to

  #define QUAD_STROKE_APPROXIMATION 1

or from the command line: CPPFLAGS="-D QUAD_STROKE_APPROXIMATION=1" ./gyp_skia

Here's what's in this CL:

bench/BezierBench.cpp : a microbench for examining where the time is going
gm/beziers.cpp        : random Beziers with various thicknesses
gm/smallarc.cpp       : a distillation of bug skia:2769
samplecode/SampleRotateCircles.cpp : controls added for error, limit, width
src/core/SkStroke.cpp : the new stroke implementation (disabled)
tests/StrokerTest.cpp : a stroke torture test that checks normal and extreme values

The new stroke algorithm has a tweakable parameter:

  stroker.setError(1);  (SkStrokeRec.cpp:112)

The stroke error is the allowable gap between the midpoint of the stroke quadratic and the center Bezier. As the projection from the quadratic approaches the endpoints, the error is decreased proportionally so that it is always inside the quadratic curve.

An overview of how this works:
- For a given T range of a Bezier, compute the perpendiculars and find the points outset and inset for some radius.
- Construct tangents for the quadratic stroke.
- If the tangent don't intersect between them (may happen with cubics), subdivide.
- If the quadratic stroke end points are close (again, may happen with cubics), draw a line between them.
- Compute the quadratic formed by the intersecting tangents.
- If the midpoint of the quadratic is close to the midpoint of the Bezier perpendicular, return the quadratic.
- If the end of the stroke at the Bezier midpoint doesn't intersect the quad's bounds, subdivide.
- Find where the Bezier midpoint ray intersects the quadratic.
- If the intersection is too close to the quad's endpoints, subdivide.
- If the error is large proportional to the intersection's distance to the quad's endpoints, subdivide.

BUG=skia:723,skia:2769

Review URL: https://codereview.chromium.org/558163005
2014-10-09 05:36:04 -07:00
sugoi
ce686270f5 Adding 3D lut color filter
Included in this cl is support for 3D textures.

BUG=skia:

Review URL: https://codereview.chromium.org/580863004
2014-10-09 05:27:23 -07:00
kkinnunen
9e61bb7815 Make the Sk GL context class an abstract base class
Make the Sk GL context class, SkGLNativeContext, an abstract base class. Before,
it depended on ifdefs to implement the platform dependent polymorphism.  Move
the logic to subclasses of the various platform implementations.

This a step to enable Skia embedders to compile dm and bench_pictures. The
concrete goal is to support running these test apps with Chromium command buffer.

With this change, Chromium can implement its own version of SkGLNativeContext
that uses command buffer, and host the implementation in its own repository.

Implements the above by renaming the SkGLContextHelper to SkGLContext and
removing the unneeded SkGLNativeContext. Also removes
SkGLNativeContext::AutoRestoreContext functionality, it appeared to be unused:
no use in Skia code, and no tests.

BUG=skia:2992

Committed: https://skia.googlesource.com/skia/+/a90ed4e83897b45d6331ee4c54e1edd4054de9a8

Review URL: https://codereview.chromium.org/630843002
2014-10-09 05:24:15 -07:00
bsalomon
bcf0a52d4f GrResourceCache2 manages scratch texture.
BUG=skia:2889

Review URL: https://codereview.chromium.org/608883003
2014-10-08 08:40:09 -07:00
bsalomon
10805961ce Revert of Make the Sk GL context class an abstract base class (patchset #4 id:60001 of https://codereview.chromium.org/630843002/)
Reason for revert:
nanobech failing on Android

Original issue's description:
> Make the Sk GL context class an abstract base class
>
> Make the Sk GL context class, SkGLNativeContext, an abstract base class. Before,
> it depended on ifdefs to implement the platform dependent polymorphism.  Move
> the logic to subclasses of the various platform implementations.
>
> This a step to enable Skia embedders to compile dm and bench_pictures. The
> concrete goal is to support running these test apps with Chromium command buffer.
>
> With this change, Chromium can implement its own version of SkGLNativeContext
> that uses command buffer, and host the implementation in its own repository.
>
> Implements the above by renaming the SkGLContextHelper to SkGLContext and
> removing the unneeded SkGLNativeContext. Also removes
> SkGLNativeContext::AutoRestoreContext functionality, it appeared to be unused:
> no use in Skia code, and no tests.
>
> BUG=skia:2992
>
> Committed: https://skia.googlesource.com/skia/+/a90ed4e83897b45d6331ee4c54e1edd4054de9a8

TBR=kkinnunen@nvidia.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2992

Review URL: https://codereview.chromium.org/639793002
2014-10-08 04:45:10 -07:00
kkinnunen
a90ed4e838 Make the Sk GL context class an abstract base class
Make the Sk GL context class, SkGLNativeContext, an abstract base class. Before,
it depended on ifdefs to implement the platform dependent polymorphism.  Move
the logic to subclasses of the various platform implementations.

This a step to enable Skia embedders to compile dm and bench_pictures. The
concrete goal is to support running these test apps with Chromium command buffer.

With this change, Chromium can implement its own version of SkGLNativeContext
that uses command buffer, and host the implementation in its own repository.

Implements the above by renaming the SkGLContextHelper to SkGLContext and
removing the unneeded SkGLNativeContext. Also removes
SkGLNativeContext::AutoRestoreContext functionality, it appeared to be unused:
no use in Skia code, and no tests.

BUG=skia:2992

Review URL: https://codereview.chromium.org/630843002
2014-10-08 04:14:24 -07:00
mtklein
38c05871c6 Save/Restore around bench runs.
BUG=skia:

Review URL: https://codereview.chromium.org/619353002
2014-10-02 13:03:58 -07:00
reed
337c2dd420 check for newSurface failure
BUG=skia:

Review URL: https://codereview.chromium.org/622063003
2014-10-02 12:58:49 -07:00
mtklein
8f8c25eabb Demote getCount, getDepth, and clear to RTree-only methods.
We use them only to test RTree.

BUG=skia:

Review URL: https://codereview.chromium.org/622773003
2014-10-02 09:53:04 -07:00
mtklein
6bd41969a0 BBHs: void* data -> unsigned data
Now that the old backend's not using BBHs, we can specialize them for
SkRecord's needs.  The only thing we really want to store is op index, which
should always be small enough to fit into an unsigned (unsigned also helps keep
it straight from other ints floating around).

This means we'll need half (32-bit) or a quarter (64-bit) the bytes in SkTileGrid,
because we don't have to store an extra int for ordering.

BUG=skia:2834

Review URL: https://codereview.chromium.org/617393004
2014-10-02 07:41:56 -07:00
mtklein
8e12656096 Remove DEPRECATED_beginRecording().
This removes:
  1) ability to record old pictures with SkPictureRecorder;
  2) a couple tests specific to the old backend.

The functionality of DEPRECATED_beginRecording() now lives in
(private) SkPicture::Backport(), which is the only place we
need it now.

BUG=skia:
TBR=reed@google.com

Review URL: https://codereview.chromium.org/618303002
2014-10-01 09:29:35 -07:00
bsalomon
afbf2d6273 Make "priv" classes for GrTexure and GrSurface.
R=robertphillips@google.com, egdaniel@google.com, joshualitt@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/596053002
2014-09-30 12:18:44 -07:00
robertphillips
b06e5a2f55 Revert of Make "priv" classes for GrTexure and GrSurface. (patchset #9 id:260001 of https://codereview.chromium.org/596053002/)
Reason for revert:
Breaking the Chrome builds with:

 lib/libcc.so: error: undefined reference to 'GrAutoScratchTexture::detach()'

(http://108.170.220.120:10117/builders/Canary-Chrome-Ubuntu13.10-Ninja-x86_64-DRT/builds/2990/steps/Retry_BuildContentShell_1/logs/stdio)

Original issue's description:
> Make "priv" classes for GrTexure and GrSurface.

R=egdaniel@google.com, joshualitt@google.com, bsalomon@google.com
TBR=bsalomon@google.com, egdaniel@google.com, joshualitt@google.com
NOTREECHECKS=true
NOTRY=true

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/618733002
2014-09-30 06:58:20 -07:00
bsalomon
c0eb9b9818 Make "priv" classes for GrTexure and GrSurface.
R=robertphillips@google.com, egdaniel@google.com, joshualitt@google.com, joshualitt@chromium.org

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/596053002
2014-09-29 14:20:11 -07:00
reed
c5e15a1afa remove alphatype from colortable
the owning bitmap is (already) responsible for knowing the alphatype

BUG=skia:
R=djsollen@google.com

Author: reed@google.com

Review URL: https://codereview.chromium.org/611093002
2014-09-29 12:10:27 -07:00
mtklein
dc5bbab138 Have nanobench --verbose mode always just print integer nanoseconds.
Don't know that anyone but me is using this.  Speak up now!

BUG=skia:

NOTREECHECKS=true
R=mtklein@google.com, tfarina@chromium.org

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/599913002
2014-09-24 06:34:09 -07:00
mtklein
53d2562006 nanobench: print max RSS in debug mode too.
BUG=skia:2949
R=mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/581083002
2014-09-18 07:39:42 -07:00
mtklein
963504bd0a Revert of nanobench: lazily decode bitmaps from SKPs (patchset #1 id:1 of https://codereview.chromium.org/572933006/)
Reason for revert:
skia:2944

Original issue's description:
> nanobench: lazily decode bitmaps from SKPs
>
> This makes it considerably cheaper to run SKP recording benchmarks, without
> affecting their measurements and without really affecting SKP playback
> benchmarks at all.
>
> On my machine, running out/Release/nanobench --match skp --config nondrendering
> drops in run time from 6.7s to 2.5s, and the peak RAM usage drops from 129M to 50M.
>
> I'm strongly considering making this lazy decoding the default.
>
> BUG=skia:2944
>
> Committed: https://skia.googlesource.com/skia/+/d664c21a38de98d8db210c46f7a8c4187f1534da

R=robertphillips@google.com, mtklein@chromium.org
TBR=mtklein@chromium.org, robertphillips@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2944

Author: mtklein@google.com

Review URL: https://codereview.chromium.org/554583004
2014-09-17 06:58:39 -07:00
mtklein
d664c21a38 nanobench: lazily decode bitmaps from SKPs
This makes it considerably cheaper to run SKP recording benchmarks, without
affecting their measurements and without really affecting SKP playback
benchmarks at all.

On my machine, running out/Release/nanobench --match skp --config nondrendering
drops in run time from 6.7s to 2.5s, and the peak RAM usage drops from 129M to 50M.

I'm strongly considering making this lazy decoding the default.

BUG=skia:
R=robertphillips@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/572933006
2014-09-16 13:36:12 -07:00
mtklein
e1daac9b26 Tag recording picture nesting bench as nonrendering.
Doesn't hurt as is, but we're running it several times unneccesarily.

(I couldn't compile without removing an unused constant in that other GM...)

BUG=skia:
R=fmalita@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/570303002
2014-09-16 10:12:42 -07:00
fmalita
df886ea06f Fix leak in PictureNestingBench
R=mtklein@google.com
TBR=mtklein@google.com

Author: fmalita@chromium.org

Review URL: https://codereview.chromium.org/569313004
2014-09-15 18:20:11 -07:00
fmalita
44162675ca Nested picture nanobench
Measure picture overhead for recording & playback using a Sierpinski fractal (http://skfiddle.com/c/a2b6e60d775543b7c29a5d45d0371c02) with various picture nesting levels.

R=mtklein@google.com, reed@google.com

Author: fmalita@chromium.org

Review URL: https://codereview.chromium.org/566393002
2014-09-15 16:46:16 -07:00
reed
c90e0149ec Change SkResourceCache to take a Visitor inside its find().
This reverts commit 595aa05efc.

BUG=skia:
R=mtklein@google.com, danakj@chromium.org

Author: reed@google.com

Review URL: https://codereview.chromium.org/569353002
2014-09-15 11:39:45 -07:00
reed
595aa05efc Revert of Change SkResourceCache to take a Visitor inside its find(). (patchset #2 id:20001 of https://codereview.chromium.org/567393002/)
Reason for revert:
crashes on android bots, haven't diagnosed yet

Original issue's description:
> Change SkResourceCache to take a Visitor inside its find().
>
> This simplifies the API/contract, in that there are not any exposed
> lock/unlock scopes.
>
>
> patch from issue 572573002
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/dee6a8e67db39fcbde2b3bb09be1d088ebb9db8a

R=mtklein@google.com, danakj@chromium.org
TBR=danakj@chromium.org, mtklein@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Author: reed@google.com

Review URL: https://codereview.chromium.org/569303002
2014-09-15 10:15:18 -07:00
reed
dee6a8e67d Change SkResourceCache to take a Visitor inside its find().
This simplifies the API/contract, in that there are not any exposed
lock/unlock scopes.

patch from issue 572573002

BUG=skia:
R=mtklein@google.com, danakj@chromium.org

Author: reed@google.com

Review URL: https://codereview.chromium.org/567393002
2014-09-15 06:44:47 -07:00
mtklein
fd731ce804 Measure picture recording speed in nanobench.
Today we measure SkPicture playback speed, but not the time it takes to record
the SkPicture.  This fixes that by reading SKPs from disk and re-recording them.

On the console, recording shows up first as the nonrendering skp benches,
followed later by the usual playback benches:

maxrss  loops   min median  mean    max stddev  samples     config  bench
51M  2   165µs   168µs   169µs   178µs   3%  ▆▄▃█▂▄▁▂▁▁  nonrendering    tabl_slashdot.skp
57M  1   9.72ms  9.77ms  9.79ms  9.97ms  1%  █▂▂▅▃▂▁▄▂▁  nonrendering    desk_pokemonwiki.skp
57M  32  2.92µs  2.96µs  3.03µs  3.46µs  6%  ▅▁▁▁▁▁▁█▂▁  nonrendering    desk_yahoosports.skp
...
147M 1   3.86ms  3.87ms  3.97ms  4.81ms  7%  █▁▁▁▁▁▁▁▁▁  8888    tabl_slashdot.skp_1
147M 1   4.54ms  4.56ms  4.55ms  4.56ms  0%  █▅▇▅█▅▂▁▅▁  565     tabl_slashdot.skp_1
147M 2   3.08ms  3.24ms  4.17ms  8.18ms  50% █▁▁█▁▁▁▁▁▁  gpu     tabl_slashdot.skp_1
147M 1   1.61ms  1.62ms  1.69ms  2.33ms  13% █▁▁▁▁▁▁▁▁▁  8888    desk_pokemonwiki.skp_1
147M 1   1.44ms  1.44ms  1.45ms  1.47ms  1%  ▅▂█▂▂▅▁▁▂▁  565     desk_pokemonwiki.skp_1
...

On skiaperf.com, they'll also be separated out from playback benches by bench_type.

BUG=skia:
R=reed@google.com, mtklein@google.com, jcgregorio@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/559153002
2014-09-10 12:19:30 -07:00
mtklein
962890568d Distinguish common and unique names for skiaperf.com.
Turns out we tack on the size post-facto in ResultsWriter::bench(), so the only
place we need getUniqueName() to differ from getName() is SKPBench.

BUG=skia:
R=jcgregorio@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/552303004
2014-09-10 12:05:59 -07:00
qiankun.miao
8247ec313d Fix format of nanobench result
Column of samples is too wide. This makes config is not align with the
'config' title. Pad 'samples' tilte with some whitespaces to fix this
issue.

BUG=skia:
R=mtklein@google.com

Author: qiankun.miao@intel.com

Review URL: https://codereview.chromium.org/549153005
2014-09-09 19:24:36 -07:00
mtklein
ea65bfa8de Update DM JSON format.
Ex. dm --match patch -w bad --key arch x86 gpu nvidia model z620 --properties git_hash abcd build_number 20 ->

{
   "build_number" : "20",
   "git_hash" : "abcd",
   "key" : {
      "arch" : "x86",
      "gpu" : "nvidia",
      "model" : "z620"
   },
   "results" : [
      {
         "key" : {
            "config" : "565",
            "name" : "ninepatch-stretch"
         },
         "md5" : "f78cfafcbabaf815f3dfcf61fb59acc7",
         "options" : {
            "source_type" : "GM"
         }
      },
      {
         "key" : {
            "config" : "8888",
            "name" : "ninepatch-stretch"
         },
         "md5" : "3e8a42f35a1e76f00caa191e6310d789",
         "options" : {
            "source_type" : "GM"
         }
      },
...

This breaks -r, but that's okay.  Going to follow up this CL with one that removes that entirely.

BUG=skia:
R=stephana@google.com, jcgregorio@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/551873003
2014-09-09 07:59:46 -07:00
bsalomon
49f085dddf "NULL !=" = NULL
R=reed@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/544233002
2014-09-05 13:34:00 -07:00
robertphillips
c5ba71d2e5 Change SkPicture::draw to playback
R=reed@google.com

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/540963002
2014-09-04 08:42:50 -07:00
reed
e5ea500d47 Hide fields in SkImageInfo
R=rmistry@google.com
TBR=bsalomon

Author: reed@google.com

Review URL: https://codereview.chromium.org/536003002
2014-09-03 11:54:58 -07:00
robertphillips
a8d7f0b13c Try out scalar picture sizes
This paves the way for removing the 'fTile' parameter from SkPictureShader (although that should be a different CL). If we like this we could also move to providing an entire cull SkRect.

R=reed@google.com, mtklein@google.com, fmalita@google.com, fmalita@chromium.org

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/513983002
2014-08-29 08:03:56 -07:00
reed
011f39aeb2 rename ScaledImageCache to ResourceCache
BUG=skia:
R=bsalomon@google.com, mtklein@google.com

Author: reed@google.com

Review URL: https://codereview.chromium.org/511283002
2014-08-28 13:35:23 -07:00
mtklein
533eb782ed Convert BBH APIs to use SkRect.
Still TODO: convert internals of SkTileGrid.cpp and SkRTree.cpp to work in floats too.

NOTREECHECKS=true

BUG=skia:1021
R=robertphillips@google.com, reed@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/511613002
2014-08-27 10:39:42 -07:00
mtklein
4473be874f Clean up some benches that answer questions we're no longer asking.
NOTREECHECKS=true

BUG=skia:
R=reed@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/512503002
2014-08-27 06:34:16 -07:00
mtklein
2a65a238b0 Remove SkQuadTree.
We're not testing it to the same degree we do RTree and TileGrid.  Any changes
we'll make to BBH APIs become 33% easier without it.  If find we want it again,
we can always resurrect it.

BUG=skia:1021,skia:2834
R=robertphillips@google.com, mtklein@google.com
TBR=reed

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/500373005
2014-08-26 14:07:04 -07:00
bsalomon
169612621f Make GrGpuResources register with GrResourceCache2 after fully constructed.
Committed: https://skia.googlesource.com/skia/+/d68b3e491bb765beb7ca5e4ac8e0c80dedf5a83b

R=robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/504313002
2014-08-26 14:01:07 -07:00
bsalomon
a2b0af82f0 Revert of Make GrGpuResources register with GrResourceCache2 after fully constructed. (patchset #3 of https://codereview.chromium.org/504313002/)
Reason for revert:
Breaking the bots

Original issue's description:
> Make GrGpuResources register with GrResourceCache2 after fully constructed.
>
> Committed: https://skia.googlesource.com/skia/+/d68b3e491bb765beb7ca5e4ac8e0c80dedf5a83b

R=robertphillips@google.com
TBR=robertphillips@google.com
NOTREECHECKS=true
NOTRY=true

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/488463004
2014-08-26 13:11:11 -07:00
bsalomon
d68b3e491b Make GrGpuResources register with GrResourceCache2 after fully constructed.
R=robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/504313002
2014-08-26 12:51:20 -07:00
reed
680fb9e8f1 retool image cache to be generic cache, allowing the client to subclass "Rec", so they can provide a custom Key and arbitrary Value.
Follow-on CLs

- rename ScaledimageCache to something like GeneralCache
- explore if we can use call-backs or some mechanism to completely hide "lock/unlock", by forcing all clients to support "copying" their value out of the cache as the result of a Find.

R=mtklein@google.com, senorblanco@google.com, bsalomon@google.com, qiankun.miao@intel.com, senorblanco@chromium.org

Author: reed@google.com

Review URL: https://codereview.chromium.org/507483002
2014-08-26 09:08:04 -07:00
djsollen
5387c83f81 Revert of Benchmark designed to exercise fractional image scale/translation (patchset #2 of https://codereview.chromium.org/491793003/)
Reason for revert:
fires asserts on Linux Debug builds

http://108.170.220.120:10115/builders/Test-Ubuntu12-ShuttleA-GTX660-x86_64-Debug/builds/1910

Original issue's description:
> Benchmark designed to exercise fractional image scale/translation
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/5fc226641a0926dddbf70ba784f344881f4c05b9

R=reed@google.com, humper@google.com
TBR=humper@google.com, reed@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Author: djsollen@google.com

Review URL: https://codereview.chromium.org/470063007
2014-08-25 12:03:11 -07:00
humper
5fc226641a Benchmark designed to exercise fractional image scale/translation
BUG=skia:
R=reed@google.com

Author: humper@google.com

Review URL: https://codereview.chromium.org/491793003
2014-08-25 11:17:48 -07:00
reed
233c295980 fix numerical overflows in 565 blends
BUG=skia:2797
R=mtklein@google.com

Author: reed@google.com

Review URL: https://codereview.chromium.org/474983007
2014-08-22 07:27:14 -07:00
tfarina
efafe9484f Cleanup: Remove BenchTool xcode project file.
BUG=None
TEST=None
R=mtklein@google.com

Author: tfarina@chromium.org

Review URL: https://codereview.chromium.org/491263003
2014-08-22 05:42:44 -07:00
mtklein
2084050a33 Add --bbh (default true) to nanobench.
Chrome's using a bounding box, so it's a good idea for our
bots to do so too.

When set, we'll create an SkTileGrid to match the
parameters of --clip, and so should always hit its fast
path.

This will impose a small overhead (querying the BBH) on all
SKPs, but make large SKPs render more quickly.  E.g. on
GPU desk_pokemonwiki should show about a 30% improvement,
tabl_mozilla about 40%, and one very long page from my
personal suite, askmefast.com, gets 5x faster.

(The performance changes are not the point of the CL, but
something we should be aware of.)

BUG=
R=bsalomon@google.com, mtklein@google.com, robertphillips@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/497493003
2014-08-21 15:51:22 -07:00
reed
04617139f7 expose generalized imagecache key
BUG=skia:
R=mtklein@google.com, halcanary@google.com, qiankun.miao@intel.com

Author: reed@google.com

Review URL: https://codereview.chromium.org/483493003
2014-08-21 09:46:49 -07:00
mtklein
1915b62637 Add --properties for things like gitHash that describe the current nanobench run.
--key describes the type of run (describes the line on the chart), --properties
describes the run itself (describes the dot on the chart).

We'll pass --properties gitHash <git hash> build_number <build number>  --key
... to nanobench from the bots.

And... delete a whole lot of dead code.

Example: nanobench --properties gitHash foo build_number 1234 --key bar baz

{
   "build_number" : "1234",
   "gitHash" : "foo",
   "key" : {
      "bar" : "baz"
   },
   "results" : {
....

Friends with https://codereview.chromium.org/491943002
BUG=skia:
R=jcgregorio@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/488213002
2014-08-20 11:45:00 -07:00
mtklein
753b870c62 Define NDEBUG instead of SK_DEBUG/SK_RELEASE.
This makes our builds more like Chrome's, and will make our builds fail
if we accidentally use if SK_DEBUG instead of ifdef SK_DEBUG.

BUG=skia:
R=mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/481513004
2014-08-20 07:38:46 -07:00
mtklein
afb4379dbc Print max RSS in GM and nanobench too.
Everyone used MB, so update the API to just return that.

BUG=skia:
R=halcanary@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/483323002
2014-08-19 15:55:55 -07:00
mtklein
94e51567dd Add --options to nanobench, similar to --key but for non-identifying options.
Friends with https://codereview.chromium.org/487233003/

Example of out/Release/nanobench --options build_number 12374 --match patch_grid_texs_small

{
   "gitHash":"unknown-revision",
   "options":{
      "build_number":"12374",
      "system":"UNIX"
   },
   "results":{
      "patch_grid_texs_small_640_480":{
         "565":{
            "max_ms":0.268116,
            "mean_ms":0.2318529,
            "median_ms":0.235337,
            "min_ms":0.219158,
            "options":{
               "source_type":"bench"
            },
            "stddev_ms":0.01491263917658814
         },
         "8888":{
            "max_ms":0.231881,
            "mean_ms":0.2214668,
            "median_ms":0.219356,
            "min_ms":0.218887,
            "options":{
               "source_type":"bench"
            },
            "stddev_ms":0.004595541070791701
         },
         "gpu":{
            "max_ms":0.1398304782608696,
            "mean_ms":0.128833402173913,
            "median_ms":0.1316798695652174,
            "min_ms":0.1111915434782609,
            "options":{
               "GL_RENDERER":"Quadro 600/PCIe/SSE2",
               "GL_SHADING_LANGUAGE_VERSION":"4.40 NVIDIA via Cg compiler",
               "GL_VENDOR":"NVIDIA Corporation",
               "GL_VERSION":"4.4.0 NVIDIA 331.79",
               "source_type":"bench"
            },
            "stddev_ms":0.008923738937837156
         }
      }
   }
}

BUG=skia:
R=jcgregorio@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/490683002
2014-08-19 12:41:56 -07:00
dandov
7e5598a004 Added bench for grid of patches.
It is on top of my previous cl to fix the mem leaks of the regular patch bench.

NOTREECHECKS=true
BUG=skia:
R=egdaniel@google.com, bsalomon@google.com

Author: dandov@google.com

Review URL: https://codereview.chromium.org/470543004
2014-08-15 13:30:47 -07:00
bsalomon
87c35adbda Remove aarects benchmark. Redundant with rotated_rects* bench and *much* slower.
NOTREECHECKS=true
R=robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/469373003
2014-08-14 13:03:58 -07:00
bsalomon
a7f79b47fa remove internal repeat count from gradient benches
NOTREECHECKS=true
R=mtklein@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/476923002
2014-08-14 12:24:46 -07:00
krajcevski
12b3544028 Add runtime flag to turn compressed alpha masks on
R=bsalomon@google.com, robertphillips@google.com, mtklein@google.com

Author: krajcevski@google.com

Review URL: https://codereview.chromium.org/468293002
2014-08-13 12:06:26 -07:00
krajcevski
69a5560ea5 Add entry point for passing options to the GrContextFactory
R=bsalomon@google.com, mtklein@google.com, robertphillips@google.com

Author: krajcevski@google.com

Review URL: https://codereview.chromium.org/465073002
2014-08-13 10:46:31 -07:00
mtklein
e556be7084 Don't leak the shader in PatchBench.
BUG=skia:
R=dandov@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/465083003
2014-08-13 10:41:16 -07:00
dandov
b3c9d1c33c SkCanvas::drawPatch param SkPoint[12]
drawPatch now receives as parameter const SkPoint cubics[12]

Adjusted derived classes and serialization.

Ajusted GM's and benches that take into account combinations of optional
parameters, the scale of the patch and 4 different types of patches.

Planning on adding the extra functionality of SkPatch in another CL.

BUG=skia:
R=egdaniel@google.com, reed@google.com

Author: dandov@google.com

Review URL: https://codereview.chromium.org/463493002
2014-08-12 08:34:29 -07:00
joshualitt
5acfea789d 2D kernel initial wiring for Guassian
BUG=skia:
R=senorblanco@chromium.org, bsalomon@chromium.org, bsalomon@google.com

Author: joshualitt@chromium.org

Review URL: https://codereview.chromium.org/418223009
2014-08-11 13:55:34 -07:00
Mike Klein
e530eb370c Restore bench_util.py
BUG=skia:2819

Review URL: https://codereview.chromium.org/450253003
2014-08-08 17:28:53 -04:00
bsalomon
6563562cb6 Make the rotated rects bench allow more alpha/color variations and an arbitrary xfermode::mode.
R=robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/448253002
2014-08-08 07:43:29 -07:00
mtklein
b511042bb0 Fix iOS build by centralizing --writePath.
CQ_EXTRA_TRYBOTS=tryserver.skia:Build-Mac10.7-Clang-Arm7-Debug-iOS-Trybot

BUG=skia:
R=mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/452633002
2014-08-07 15:20:02 -07:00
bsalomon
6eb03cc06d Add option to dump images from nanobench.
Add option to set the repeat count to any number, replacs the --runOnce flag.

R=mtklein@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/450743002
2014-08-07 14:28:50 -07:00
bsalomon
3b4d077fba Add angle config to nanobench and make angle a default config for dm and nanobench.
NOTREECHECKS=true
R=mtklein@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/441333003
2014-08-06 10:52:34 -07:00
mtklein
be21e3432e Bye bye bench.
NOTREECHECKS=true

BUG=skia:
R=djsollen@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/442343004
2014-08-06 08:39:38 -07:00
mtklein
2069e22003 Fix calibration loop failure condition.
With the old logic, if the last attempt succeeded, we'd say we failed.

We also print two lines for loop calibration failures.  Quiet that down.

BUG=skia:
R=djsollen@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/431503004
2014-08-04 13:57:39 -07:00
mtklein
6e33e232df Skip all .skps in 565.
More SKPs are failing with a 565 target on other platforms:

http://108.170.220.120:10117/builders/Test-Win7-ShuttleA-HD2000-x86-Debug/builds/2938/steps/RunNanobench/logs/stdio

BUG=skia:2797
R=mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/431983006
2014-08-01 08:23:39 -07:00
mtklein
92007583e4 SKPs-as-benches in nanobench
This is meant to replace bench_pictures.

CQ_EXTRA_TRYBOTS=tryserver.skia:Build-Mac10.7-Clang-Arm7-Release-iOS-Trybot

BUG=skia:
R=bsalomon@google.com, jcgregorio@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/425393004
2014-08-01 07:46:53 -07:00
mtklein
e714e75c72 nanobench: support GMs-as-benches
BUG=skia:
R=jcgregorio@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/438683002
2014-07-31 12:13:48 -07:00
bsalomon
3342ed55e1 Add rotated rects benchmarks
R=robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/425263003
2014-07-30 08:58:20 -07:00
tfarina
a8e2e1504b Cleanup: Rename SkOSPath functions.
Mostly for brevity and matches better with Python:

Python           | Old C++                 | New C++
os.path.join     | SkOSPath::SkPathJoin    | SkOSPath::Join
os.path.basename | SkOSPath::SkBasename    | SkOSPath::Basename

BUG=None
TEST=make all
R=mtklein@google.com, bsalomon@google.com

Author: tfarina@chromium.org

Review URL: https://codereview.chromium.org/428443002
2014-07-28 19:26:58 -07:00
bsalomon
2354f8432a Test abandoning GL context in dm/nanobench.
Rename GrContext::contextDestroyed to GrContext::abandonContext.

Remove GrContext::resetContext.

R=robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/422903002
2014-07-28 13:48:36 -07:00
bungeman
d6aeb6dc8f Fix thread unsafe mutex initialization.
BUG=skia:2779
R=robertphillips@google.com, mtklein@google.com, reed@android.com, bsalomon@google.com

Author: bungeman@google.com

Review URL: https://codereview.chromium.org/419113002
2014-07-25 11:52:48 -07:00
bsalomon
6d3fe022d6 Rename GrGpuObject to GrGpuResource
R=robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/418143004
2014-07-25 08:35:45 -07:00
kelvinly
570c392a00 Fix the other microbench schema
BUG=skia:
R=bensong@google.com, jcgregorio@google.com

Author: kelvinly@google.com

Review URL: https://codereview.chromium.org/420723004
2014-07-25 08:30:11 -07:00
bsalomon
c44be0e9e4 Merge GrGpuObject and GrCacheable.
We want to create a new base class for "meta" gr resources as part of the GrResourceCache rewrite and this is an iterim step towards that goal.s

R=robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/414013005
2014-07-25 07:32:33 -07:00
bsalomon
c2553373ee Make nanobench setup configs outside of loop over benchmarks
R=mtklein@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/410683005
2014-07-22 13:09:05 -07:00
caryclark
17f0b6df72 share dm and command flags
Share command flags between dm and unit tests.
Also, allow dm's core to be included by itself and iOSShell.

Command line flags that are the same (or nearly the same) in DM
and in skia_tests have been moved to common_flags. Authors,
please check to see that the shared common flag is correct for
the tool.

For iOS, the 'tool_main' entry point has a wrapper to allow multiple
tools to be statically linked in the iOSShell.
Since SkCommandLineFlags::Parse can only be called once, these calls
are disabled in the IOS build.

Since the iOS app directory is dynamically assigned a name, use '@' to
select it. (This is the same convention chosen by the Mobile Harness
iOS file system utilities.)

Move the heart of dm.gyp into dm.gypi so that it can be included by
itself and iOSShell.gyp.

Add tools/flags/SkCommonFlags.* to define and declare common
command line flags.

Add support for dm to iOSShell.

BUG=skia:
R=scroggo@google.com, mtklein@google.com, jvanverth@google.com, bsalomon@google.com

Author: caryclark@google.com

Review URL: https://codereview.chromium.org/389653004
2014-07-22 10:15:35 -07:00
egdaniel
02cafcc1bf Remove gpu shader optimatization for solid white or trans black colors
Running test on the added bench which draws a grid of all white paths, all blue paths, or alternating checkered white/blue paths.

With optimization in (ms):
         White       Blue        Checkered
Linux    ~80         ~80         ~160
N7       ~800        ~1100       ~1500
Moto-e   ~830        ~1100       ~2500

Without optimization in (ms):
         White       Blue        Checkered
Linux    ~80         ~80         ~80
N7       ~1100       ~1100       ~1100
Moto-e   ~1100       ~1100       ~1500

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/5f78d2251a440443c9eaa321dad058d7a32bfef7

R=bsalomon@google.com

Author: egdaniel@google.com

Review URL: https://codereview.chromium.org/375823005
2014-07-21 11:37:28 -07:00
jcgregorio
05c4560ab3 Fix GLubyte to GrGLubyte.
BUG=skia:
R=mtklein@google.com

Author: jcgregorio@google.com

Review URL: https://codereview.chromium.org/405433008
2014-07-17 13:54:36 -07:00
jcgregorio
bf5e5237b8 Change JSON output of nanobench.
We're moving away from BigQuery for storing results so the output doens't have to conform to BQ requirements, which allows simplifying the format. Also stop parsing the filename for information and pass in buildbot parameters explicitly.

Adds the following flags to nanobench:

  --key
  --gitHash

BUG=skia:
R=mtklein@google.com, bsalomon@google.com

Author: jcgregorio@google.com

Review URL: https://codereview.chromium.org/392393002
2014-07-17 13:14:17 -07:00
mtklein
04d53a5cd5 Revert of nanobench: --veryVerbose for more Win7 debugging (https://codereview.chromium.org/401663002/)
Reason for revert:
Shouldn't be needed anymore.

Original issue's description:
> nanobench: --veryVerbose for more Win7 debugging
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/e57452d

R=mtklein@chromium.org
TBR=mtklein@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Author: mtklein@google.com

Review URL: https://codereview.chromium.org/404543004
2014-07-17 11:23:07 -07:00
Mike Klein
e57452debd nanobench: --veryVerbose for more Win7 debugging
BUG=skia:

Review URL: https://codereview.chromium.org/401663002
2014-07-17 13:19:22 -04:00
mtklein
55b0ffc486 nanobench: Protect more against infinite loops.
BUG=skia:
R=mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/404543002
2014-07-17 08:38:23 -07:00
halcanary
805ef159d1 Set maximum output size for scaled-image-cache images
Accessable via:
  SkScaledImageCache::{G,S}etMaximumOutputSizeForHighQualityFilter

Also, a unit test.

BUG=389439
R=humper@google.com, tomhudson@google.com, reveman@chromium.org, vangelis@chromium.org, reed@google.com

Author: halcanary@google.com

Review URL: https://codereview.chromium.org/394003003
2014-07-17 06:58:01 -07:00
Mike Klein
3f376a5500 (temporarily?) disable no-oped benches
BUG=skia:

Review URL: https://codereview.chromium.org/391343007
2014-07-16 20:23:43 -04:00
Mike Klein
912947737a Use __rdtsc on Windows.
This seems to be ~100x higher resolution than QueryPerformanceCounter.  AFAIK, all our Windows perf bots have constant_tsc, so we can be a bit more direct about using rdtsc directly: it'll always tick at the max CPU frequency.

Now, the question remains, what is the max CPU frequency to divide through by?  It looks like QueryPerformanceFrequency actually gives the CPU frequency in kHz, suspiciously exactly what we need to divide through to get elapsed milliseconds.  That was a freebie.

I did some before/after comparison on slow benchmarks.  Timings look the same.  Going to land this without review tonight to see what happens on the bots; happy to review carefully tomorrow.

R=mtklein@google.com
TBR=bungeman

BUG=skia:

Review URL: https://codereview.chromium.org/394363003
2014-07-16 19:59:32 -04:00
Mike Klein
e3631364e9 Try to debug Windows infinite loops in nanobench.
NOTREECHECKS=true

BUG=skia:

Review URL: https://codereview.chromium.org/396753004
2014-07-15 17:56:37 -04:00
Mike Klein
3944a1d237 destroyContexts after each bench instead of before
BUG=skia:

Review URL: https://codereview.chromium.org/394893002
2014-07-15 13:40:19 -04:00
mtklein
6238688af0 Give windows boring bars and use 'us' for microseconds.
NOTREECHECKS=true

BUG=skia:
R=bsalomon@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/393673006
2014-07-15 10:30:31 -07:00
mtklein
1e319f7342 Add --resetGpuContext to both DM and nanobench.
Defaulting to true to be conservative for now.

BUG=skia:

NOTREECHECKS=true
R=mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/398483005
2014-07-15 08:27:06 -07:00
mtklein
a189ccdb4d nanobench: add --runOnce.
BUG=skia:
R=egdaniel@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/392583005
2014-07-14 12:28:48 -07:00
mtklein
60317d0ffb nanobench: support --outResultsFile
BUG=skia:
R=kelvinly@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/390933002
2014-07-14 11:30:37 -07:00
mtklein
5d9d10e821 nanobench: add a cute bar chart
Give this a try?  Helpful, or gets in the way?

BUG=skia:
R=krajcevski@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/390483002
2014-07-11 11:57:07 -07:00
scroggo
fa04776d3a Use unpremul for premul_and_unpremul_alpha_ bench.
Using the wrong color type resulted in invalid colors.

R=bsalomon@google.com, reed@google.com

Author: scroggo@google.com

Review URL: https://codereview.chromium.org/382243005
2014-07-11 10:45:11 -07:00
egdaniel
c855ca0c94 Revert of Remove gpu shader optimatization for solid white or trans black colors (https://codereview.chromium.org/375823005/)
Reason for revert:
possible test and gm failures

Original issue's description:
> Remove gpu shader optimatization for solid white or trans black colors
>
> Running test on the added bench which draws a grid of all white paths, all blue paths, or alternating checkered white/blue paths.
>
> With optimization in (ms):
>          White       Blue        Checkered
> Linux    ~80         ~80         ~160
> N7       ~800        ~1100       ~1500
> Moto-e   ~830        ~1100       ~2500
>
> Without optimization in (ms):
>          White       Blue        Checkered
> Linux    ~80         ~80         ~80
> N7       ~1100       ~1100       ~1100
> Moto-e   ~1100       ~1100       ~1500
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/5f78d2251a440443c9eaa321dad058d7a32bfef7

R=bsalomon@google.com
TBR=bsalomon@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Author: egdaniel@google.com

Review URL: https://codereview.chromium.org/385163004
2014-07-11 09:13:37 -07:00