aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkPictureFlat.h
Commit message (Collapse)AuthorAge
* SkTDynamicHash: pick up GetKey(), Hash() from T by default.Gravatar commit-bot@chromium.org2014-04-02
| | | | | | | | | | | | | | | | | | This also has a somewhat obscure technical benefit: it removes the requirement that GetKey() and Hash() must be functions with external linkage, which is required when passing a function pointer to a template. A future CL that's run into this problem and the obvious simplification are about 50/50 why I'm sending this CL. BUG=skia: DIFFBASE= https://codereview.chromium.org/222343002/ R=bsalomon@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/222473002 git-svn-id: http://skia.googlecode.com/svn/trunk@14028 2bbb7eff-a529-9590-31e7-b0007b416f81
* SkTDynamicHash: remove need for Equals(const T&, const Key&) param.Gravatar commit-bot@chromium.org2014-04-02
| | | | | | | | | | | | | | All implementations are relying on bool operator==(const Key&, const Key&) anyway, which makes total sense, so just make that required. BUG=skia: R=bsalomon@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/222343002 git-svn-id: http://skia.googlecode.com/svn/trunk@14027 2bbb7eff-a529-9590-31e7-b0007b416f81
* Pulling these out of other reviews so avoid code review clutter.Gravatar commit-bot@chromium.org2014-03-10
| | | | | | | | | | R=jvanverth@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/192783002 git-svn-id: http://skia.googlecode.com/svn/trunk@13724 2bbb7eff-a529-9590-31e7-b0007b416f81
* Culling APIGravatar commit-bot@chromium.org2014-02-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | *** SKP format breaking change *** Adding a couple of culling primitives: pushCull(SkRect) & popCull(). These are currently only plumbed for SKP playback quickreject. At record time, we perform a couple of optimizations to trim down the number of redundant culls: * collapse empty pushCull/popCull pairs * skip pushCull/popCull pairs nested within an identical cull rect Things still missing/to consider: * use an inlineable, simplified quickreject (Mike's old prototype) * debugger visualization for cull boxes * BBH integration: the initial prototype had some minimal BBH support, but since the optimizations required expensive rewinds and culling is expected to be a BBH alternative, it got dropped. R=bsalomon@google.com, reed@google.com, robertphillips@google.com, caryclark@google.com, tomhudson@google.com, iancottrell@google.com Author: fmalita@chromium.org Review URL: https://codereview.chromium.org/138013009 git-svn-id: http://skia.googlecode.com/svn/trunk@13611 2bbb7eff-a529-9590-31e7-b0007b416f81
* Merge tomhudson and mtklein SkPaint shrinking approaches.Gravatar commit-bot@chromium.org2014-02-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I think this is cherry picking the best parts of both our CLs. We've got dirty bit tracking from Tom's, picture format stability from Mike's, etc. Paints are typically 1/3 their original size when flattened in the dictionary. bench_record on my desktop looks promising. Generally, looks faster. (Best in monospace.) a/b skp before after 0.83 desk_techcrunch.skp 0.29 0.24 0.83 tabl_gamedeksiam.skp 0.52 0.43 0.87 desk_carsvg.skp 0.4 0.35 0.87 desk_googlehome.skp 0.038 0.033 0.87 desk_pokemonwiki.skp 3.9 3.4 0.88 desk_fontwipe.skp 0.0089 0.0078 0.88 desk_googlespreadsheet.skp 0.16 0.14 0.89 desk_jsfiddlebigcar.skp 0.027 0.024 0.89 desk_tigersvg.skp 0.038 0.034 0.89 desk_weather.skp 0.19 0.17 0.89 tabl_engadget.skp 0.37 0.33 0.89 tabl_googleblog.skp 0.28 0.25 0.9 desk_facebook.skp 0.2 0.18 0.91 desk_mapsvg.skp 0.45 0.41 0.91 desk_youtube.skp 0.22 0.2 0.92 desk_forecastio.skp 0.12 0.11 0.92 desk_googlespreadsheetdashed.skp 0.49 0.45 0.92 desk_gws.skp 0.13 0.12 0.92 desk_pinterest.skp 0.037 0.034 0.92 desk_twitter.skp 0.25 0.23 0.92 tabl_culturalsolutions.skp 0.26 0.24 0.92 tabl_gspro.skp 0.072 0.066 0.92 tabl_mercurynews.skp 0.26 0.24 0.93 desk_booking.skp 0.46 0.43 0.93 desk_chalkboard.skp 0.28 0.26 0.93 desk_linkedin.skp 0.14 0.13 0.93 desk_mobilenews.skp 0.28 0.26 0.93 tabl_cuteoverload.skp 0.46 0.43 0.93 tabl_deviantart.skp 0.15 0.14 0.93 tabl_gmail.skp 0.029 0.027 0.93 tabl_googlecalendar.skp 0.15 0.14 0.93 tabl_mlb.skp 0.15 0.14 0.94 desk_blogger.skp 0.18 0.17 0.94 desk_jsfiddlehumperclip.skp 0.034 0.032 0.94 desk_wordpress.skp 0.33 0.31 0.94 desk_wowwiki.skp 0.94 0.88 0.94 desk_yahooanswers.skp 0.17 0.16 0.94 desk_youtubetvvideo.skp 0.017 0.016 0.94 tabl_sahadan.skp 0.093 0.087 0.94 tabl_worldjournal.skp 0.35 0.33 0.95 desk_css3gradients.skp 0.21 0.2 0.95 desk_gmailthread.skp 0.19 0.18 0.95 tabl_cnet.skp 0.42 0.4 0.95 tabl_mozilla.skp 1.9 1.8 0.95 tabl_pravda.skp 0.19 0.18 0.96 mobi_wikipedia.skp 0.55 0.53 0.96 tabl_cnn.skp 0.48 0.46 0.96 tabl_nofolo.skp 0.05 0.048 0.97 desk_googleplus.skp 0.29 0.28 0.97 tabl_frantzen.skp 0.059 0.057 0.97 tabl_onlinewsj.skp 0.38 0.37 0.97 tabl_slashdot.skp 0.1 0.097 0.97 tabl_vnexpress.skp 0.29 0.28 0.99 desk_amazon.skp 0.088 0.087 1 desk_baidu.skp 0.097 0.099 1 desk_ebay.skp 0.18 0.18 1 desk_espn.skp 0.24 0.24 1 desk_oldinboxapp.skp 0.026 0.026 1 desk_rectangletransition.skp 0.014 0.014 1 desk_samoasvg.skp 0.23 0.24 1 desk_yahoogames.skp 0.029 0.029 1 desk_yahoosports.skp 0.0033 0.0033 1 desk_youtubetvbrowse.skp 0.01 0.01 1 tabl_androidpolice.skp 0.65 0.65 1 tabl_digg.skp 0.33 0.33 1 tabl_hsfi.skp 0.32 0.32 1 tabl_nytimes.skp 0.22 0.22 1 tabl_techmeme.skp 0.069 0.072 1 tabl_ukwsj.skp 0.35 0.35 1.1 desk_sfgate.skp 0.25 0.28 BUG=skia:2190,skia:2194 Committed: http://code.google.com/p/skia/source/detail?r=13487 Committed: http://code.google.com/p/skia/source/detail?r=13496 R=tomhudson@google.com, reed@google.com, mtklein@google.com, robertphillips@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/158913005 git-svn-id: http://skia.googlecode.com/svn/trunk@13536 2bbb7eff-a529-9590-31e7-b0007b416f81
* add SkCanvas::drawDRRectGravatar commit-bot@chromium.org2014-02-21
| | | | | | | | | | | BUG=skia: R=bsalomon@google.com, robertphillips@google.com, humper@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/174243003 git-svn-id: http://skia.googlecode.com/svn/trunk@13524 2bbb7eff-a529-9590-31e7-b0007b416f81
* Reverting r13496 (Merge tomhudson and mtklein SkPaint shrinking approaches) ↵Gravatar robertphillips@google.com2014-02-20
| | | | | | due to memory leaks git-svn-id: http://skia.googlecode.com/svn/trunk@13509 2bbb7eff-a529-9590-31e7-b0007b416f81
* Merge tomhudson and mtklein SkPaint shrinking approaches.Gravatar commit-bot@chromium.org2014-02-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I think this is cherry picking the best parts of both our CLs. We've got dirty bit tracking from Tom's, picture format stability from Mike's, etc. Paints are typically 1/3 their original size when flattened in the dictionary. bench_record on my desktop looks promising. Generally, looks faster. (Best in monospace.) a/b skp before after 0.83 desk_techcrunch.skp 0.29 0.24 0.83 tabl_gamedeksiam.skp 0.52 0.43 0.87 desk_carsvg.skp 0.4 0.35 0.87 desk_googlehome.skp 0.038 0.033 0.87 desk_pokemonwiki.skp 3.9 3.4 0.88 desk_fontwipe.skp 0.0089 0.0078 0.88 desk_googlespreadsheet.skp 0.16 0.14 0.89 desk_jsfiddlebigcar.skp 0.027 0.024 0.89 desk_tigersvg.skp 0.038 0.034 0.89 desk_weather.skp 0.19 0.17 0.89 tabl_engadget.skp 0.37 0.33 0.89 tabl_googleblog.skp 0.28 0.25 0.9 desk_facebook.skp 0.2 0.18 0.91 desk_mapsvg.skp 0.45 0.41 0.91 desk_youtube.skp 0.22 0.2 0.92 desk_forecastio.skp 0.12 0.11 0.92 desk_googlespreadsheetdashed.skp 0.49 0.45 0.92 desk_gws.skp 0.13 0.12 0.92 desk_pinterest.skp 0.037 0.034 0.92 desk_twitter.skp 0.25 0.23 0.92 tabl_culturalsolutions.skp 0.26 0.24 0.92 tabl_gspro.skp 0.072 0.066 0.92 tabl_mercurynews.skp 0.26 0.24 0.93 desk_booking.skp 0.46 0.43 0.93 desk_chalkboard.skp 0.28 0.26 0.93 desk_linkedin.skp 0.14 0.13 0.93 desk_mobilenews.skp 0.28 0.26 0.93 tabl_cuteoverload.skp 0.46 0.43 0.93 tabl_deviantart.skp 0.15 0.14 0.93 tabl_gmail.skp 0.029 0.027 0.93 tabl_googlecalendar.skp 0.15 0.14 0.93 tabl_mlb.skp 0.15 0.14 0.94 desk_blogger.skp 0.18 0.17 0.94 desk_jsfiddlehumperclip.skp 0.034 0.032 0.94 desk_wordpress.skp 0.33 0.31 0.94 desk_wowwiki.skp 0.94 0.88 0.94 desk_yahooanswers.skp 0.17 0.16 0.94 desk_youtubetvvideo.skp 0.017 0.016 0.94 tabl_sahadan.skp 0.093 0.087 0.94 tabl_worldjournal.skp 0.35 0.33 0.95 desk_css3gradients.skp 0.21 0.2 0.95 desk_gmailthread.skp 0.19 0.18 0.95 tabl_cnet.skp 0.42 0.4 0.95 tabl_mozilla.skp 1.9 1.8 0.95 tabl_pravda.skp 0.19 0.18 0.96 mobi_wikipedia.skp 0.55 0.53 0.96 tabl_cnn.skp 0.48 0.46 0.96 tabl_nofolo.skp 0.05 0.048 0.97 desk_googleplus.skp 0.29 0.28 0.97 tabl_frantzen.skp 0.059 0.057 0.97 tabl_onlinewsj.skp 0.38 0.37 0.97 tabl_slashdot.skp 0.1 0.097 0.97 tabl_vnexpress.skp 0.29 0.28 0.99 desk_amazon.skp 0.088 0.087 1 desk_baidu.skp 0.097 0.099 1 desk_ebay.skp 0.18 0.18 1 desk_espn.skp 0.24 0.24 1 desk_oldinboxapp.skp 0.026 0.026 1 desk_rectangletransition.skp 0.014 0.014 1 desk_samoasvg.skp 0.23 0.24 1 desk_yahoogames.skp 0.029 0.029 1 desk_yahoosports.skp 0.0033 0.0033 1 desk_youtubetvbrowse.skp 0.01 0.01 1 tabl_androidpolice.skp 0.65 0.65 1 tabl_digg.skp 0.33 0.33 1 tabl_hsfi.skp 0.32 0.32 1 tabl_nytimes.skp 0.22 0.22 1 tabl_techmeme.skp 0.069 0.072 1 tabl_ukwsj.skp 0.35 0.35 1.1 desk_sfgate.skp 0.25 0.28 BUG=skia:2190 Committed: http://code.google.com/p/skia/source/detail?r=13487 R=tomhudson@google.com, reed@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/158913005 git-svn-id: http://skia.googlecode.com/svn/trunk@13496 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of Merge tomhudson and mtklein SkPaint shrinking approaches. ↵Gravatar commit-bot@chromium.org2014-02-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/158913005/) Reason for revert: Breaking the build - see https://code.google.com/p/skia/issues/detail?id=2190 Original issue's description: > Merge tomhudson and mtklein SkPaint shrinking approaches. > > I think this is cherry picking the best parts of both our CLs. We've got dirty bit tracking from Tom's, picture format stability from Mike's, etc. Paints are typically 1/3 their original size when flattened in the dictionary. > > bench_record on my desktop looks promising. Generally, looks faster. (Best in monospace.) > a/b skp before after > 0.83 desk_techcrunch.skp 0.29 0.24 > 0.83 tabl_gamedeksiam.skp 0.52 0.43 > 0.87 desk_carsvg.skp 0.4 0.35 > 0.87 desk_googlehome.skp 0.038 0.033 > 0.87 desk_pokemonwiki.skp 3.9 3.4 > 0.88 desk_fontwipe.skp 0.0089 0.0078 > 0.88 desk_googlespreadsheet.skp 0.16 0.14 > 0.89 desk_jsfiddlebigcar.skp 0.027 0.024 > 0.89 desk_tigersvg.skp 0.038 0.034 > 0.89 desk_weather.skp 0.19 0.17 > 0.89 tabl_engadget.skp 0.37 0.33 > 0.89 tabl_googleblog.skp 0.28 0.25 > 0.9 desk_facebook.skp 0.2 0.18 > 0.91 desk_mapsvg.skp 0.45 0.41 > 0.91 desk_youtube.skp 0.22 0.2 > 0.92 desk_forecastio.skp 0.12 0.11 > 0.92 desk_googlespreadsheetdashed.skp 0.49 0.45 > 0.92 desk_gws.skp 0.13 0.12 > 0.92 desk_pinterest.skp 0.037 0.034 > 0.92 desk_twitter.skp 0.25 0.23 > 0.92 tabl_culturalsolutions.skp 0.26 0.24 > 0.92 tabl_gspro.skp 0.072 0.066 > 0.92 tabl_mercurynews.skp 0.26 0.24 > 0.93 desk_booking.skp 0.46 0.43 > 0.93 desk_chalkboard.skp 0.28 0.26 > 0.93 desk_linkedin.skp 0.14 0.13 > 0.93 desk_mobilenews.skp 0.28 0.26 > 0.93 tabl_cuteoverload.skp 0.46 0.43 > 0.93 tabl_deviantart.skp 0.15 0.14 > 0.93 tabl_gmail.skp 0.029 0.027 > 0.93 tabl_googlecalendar.skp 0.15 0.14 > 0.93 tabl_mlb.skp 0.15 0.14 > 0.94 desk_blogger.skp 0.18 0.17 > 0.94 desk_jsfiddlehumperclip.skp 0.034 0.032 > 0.94 desk_wordpress.skp 0.33 0.31 > 0.94 desk_wowwiki.skp 0.94 0.88 > 0.94 desk_yahooanswers.skp 0.17 0.16 > 0.94 desk_youtubetvvideo.skp 0.017 0.016 > 0.94 tabl_sahadan.skp 0.093 0.087 > 0.94 tabl_worldjournal.skp 0.35 0.33 > 0.95 desk_css3gradients.skp 0.21 0.2 > 0.95 desk_gmailthread.skp 0.19 0.18 > 0.95 tabl_cnet.skp 0.42 0.4 > 0.95 tabl_mozilla.skp 1.9 1.8 > 0.95 tabl_pravda.skp 0.19 0.18 > 0.96 mobi_wikipedia.skp 0.55 0.53 > 0.96 tabl_cnn.skp 0.48 0.46 > 0.96 tabl_nofolo.skp 0.05 0.048 > 0.97 desk_googleplus.skp 0.29 0.28 > 0.97 tabl_frantzen.skp 0.059 0.057 > 0.97 tabl_onlinewsj.skp 0.38 0.37 > 0.97 tabl_slashdot.skp 0.1 0.097 > 0.97 tabl_vnexpress.skp 0.29 0.28 > 0.99 desk_amazon.skp 0.088 0.087 > 1 desk_baidu.skp 0.097 0.099 > 1 desk_ebay.skp 0.18 0.18 > 1 desk_espn.skp 0.24 0.24 > 1 desk_oldinboxapp.skp 0.026 0.026 > 1 desk_rectangletransition.skp 0.014 0.014 > 1 desk_samoasvg.skp 0.23 0.24 > 1 desk_yahoogames.skp 0.029 0.029 > 1 desk_yahoosports.skp 0.0033 0.0033 > 1 desk_youtubetvbrowse.skp 0.01 0.01 > 1 tabl_androidpolice.skp 0.65 0.65 > 1 tabl_digg.skp 0.33 0.33 > 1 tabl_hsfi.skp 0.32 0.32 > 1 tabl_nytimes.skp 0.22 0.22 > 1 tabl_techmeme.skp 0.069 0.072 > 1 tabl_ukwsj.skp 0.35 0.35 > 1.1 desk_sfgate.skp 0.25 0.28 > > > BUG=skia: > > Committed: http://code.google.com/p/skia/source/detail?r=13487 R=tomhudson@google.com, reed@google.com, mtklein@google.com, mtklein@chromium.org TBR=mtklein@chromium.org, mtklein@google.com, reed@google.com, tomhudson@google.com NOTREECHECKS=true NOTRY=true BUG=skia: Author: scroggo@google.com Review URL: https://codereview.chromium.org/169183003 git-svn-id: http://skia.googlecode.com/svn/trunk@13491 2bbb7eff-a529-9590-31e7-b0007b416f81
* Merge tomhudson and mtklein SkPaint shrinking approaches.Gravatar commit-bot@chromium.org2014-02-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I think this is cherry picking the best parts of both our CLs. We've got dirty bit tracking from Tom's, picture format stability from Mike's, etc. Paints are typically 1/3 their original size when flattened in the dictionary. bench_record on my desktop looks promising. Generally, looks faster. (Best in monospace.) a/b skp before after 0.83 desk_techcrunch.skp 0.29 0.24 0.83 tabl_gamedeksiam.skp 0.52 0.43 0.87 desk_carsvg.skp 0.4 0.35 0.87 desk_googlehome.skp 0.038 0.033 0.87 desk_pokemonwiki.skp 3.9 3.4 0.88 desk_fontwipe.skp 0.0089 0.0078 0.88 desk_googlespreadsheet.skp 0.16 0.14 0.89 desk_jsfiddlebigcar.skp 0.027 0.024 0.89 desk_tigersvg.skp 0.038 0.034 0.89 desk_weather.skp 0.19 0.17 0.89 tabl_engadget.skp 0.37 0.33 0.89 tabl_googleblog.skp 0.28 0.25 0.9 desk_facebook.skp 0.2 0.18 0.91 desk_mapsvg.skp 0.45 0.41 0.91 desk_youtube.skp 0.22 0.2 0.92 desk_forecastio.skp 0.12 0.11 0.92 desk_googlespreadsheetdashed.skp 0.49 0.45 0.92 desk_gws.skp 0.13 0.12 0.92 desk_pinterest.skp 0.037 0.034 0.92 desk_twitter.skp 0.25 0.23 0.92 tabl_culturalsolutions.skp 0.26 0.24 0.92 tabl_gspro.skp 0.072 0.066 0.92 tabl_mercurynews.skp 0.26 0.24 0.93 desk_booking.skp 0.46 0.43 0.93 desk_chalkboard.skp 0.28 0.26 0.93 desk_linkedin.skp 0.14 0.13 0.93 desk_mobilenews.skp 0.28 0.26 0.93 tabl_cuteoverload.skp 0.46 0.43 0.93 tabl_deviantart.skp 0.15 0.14 0.93 tabl_gmail.skp 0.029 0.027 0.93 tabl_googlecalendar.skp 0.15 0.14 0.93 tabl_mlb.skp 0.15 0.14 0.94 desk_blogger.skp 0.18 0.17 0.94 desk_jsfiddlehumperclip.skp 0.034 0.032 0.94 desk_wordpress.skp 0.33 0.31 0.94 desk_wowwiki.skp 0.94 0.88 0.94 desk_yahooanswers.skp 0.17 0.16 0.94 desk_youtubetvvideo.skp 0.017 0.016 0.94 tabl_sahadan.skp 0.093 0.087 0.94 tabl_worldjournal.skp 0.35 0.33 0.95 desk_css3gradients.skp 0.21 0.2 0.95 desk_gmailthread.skp 0.19 0.18 0.95 tabl_cnet.skp 0.42 0.4 0.95 tabl_mozilla.skp 1.9 1.8 0.95 tabl_pravda.skp 0.19 0.18 0.96 mobi_wikipedia.skp 0.55 0.53 0.96 tabl_cnn.skp 0.48 0.46 0.96 tabl_nofolo.skp 0.05 0.048 0.97 desk_googleplus.skp 0.29 0.28 0.97 tabl_frantzen.skp 0.059 0.057 0.97 tabl_onlinewsj.skp 0.38 0.37 0.97 tabl_slashdot.skp 0.1 0.097 0.97 tabl_vnexpress.skp 0.29 0.28 0.99 desk_amazon.skp 0.088 0.087 1 desk_baidu.skp 0.097 0.099 1 desk_ebay.skp 0.18 0.18 1 desk_espn.skp 0.24 0.24 1 desk_oldinboxapp.skp 0.026 0.026 1 desk_rectangletransition.skp 0.014 0.014 1 desk_samoasvg.skp 0.23 0.24 1 desk_yahoogames.skp 0.029 0.029 1 desk_yahoosports.skp 0.0033 0.0033 1 desk_youtubetvbrowse.skp 0.01 0.01 1 tabl_androidpolice.skp 0.65 0.65 1 tabl_digg.skp 0.33 0.33 1 tabl_hsfi.skp 0.32 0.32 1 tabl_nytimes.skp 0.22 0.22 1 tabl_techmeme.skp 0.069 0.072 1 tabl_ukwsj.skp 0.35 0.35 1.1 desk_sfgate.skp 0.25 0.28 BUG=skia: R=tomhudson@google.com, reed@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/158913005 git-svn-id: http://skia.googlecode.com/svn/trunk@13487 2bbb7eff-a529-9590-31e7-b0007b416f81
* staticMethod -> StaticMethodGravatar commit-bot@chromium.org2014-02-18
| | | | | | | | | | | BUG=skia: R=reed@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/166193006 git-svn-id: http://skia.googlecode.com/svn/trunk@13485 2bbb7eff-a529-9590-31e7-b0007b416f81
* Set write buffer flags only in SkWriteBuffer and SkFlatController constructors.Gravatar commit-bot@chromium.org2014-01-30
| | | | | | | | | | | | | | | This is a baby step toward refactored (and faster in-process) typeface and flattenable factory encoding and decoding. The sooner SkWriteBuffer knows its flags, the better. Next steps will be to rearrange Sk{Read,Write}Buffer members into disjoint strategies to handle typefaces and flattenable factories: one for in-process, one for cross-process, one when validating. BUG=skia: R=reed@google.com, scroggo@google.com Author: mtklein@google.com Review URL: https://codereview.chromium.org/138803005 git-svn-id: http://skia.googlecode.com/svn/trunk@13253 2bbb7eff-a529-9590-31e7-b0007b416f81
* Refactor read and write buffers.Gravatar commit-bot@chromium.org2014-01-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Eliminates SkFlattenable{Read,Write}Buffer, promoting SkOrdered{Read,Write}Buffer a step each in the hierarchy. What used to be this: SkFlattenableWriteBuffer -> SkOrderedWriteBuffer SkFlattenableReadBuffer -> SkOrderedReadBuffer SkFlattenableReadBuffer -> SkValidatingReadBuffer is now SkWriteBuffer SkReadBuffer -> SkValidatingReadBuffer Benefits: - code is simpler, names are less wordy - the generic SkFlattenableFooBuffer code in SkPaint was incorrect; removed - write buffers are completely devirtualized, important for record speed This refactoring was mostly mechanical. You aren't going to find anything interesting in files with less than 10 lines changed. BUG=skia: R=reed@google.com, scroggo@google.com, djsollen@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/134163010 git-svn-id: http://skia.googlecode.com/svn/trunk@13245 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix more 64bit warningsGravatar reed@google.com2014-01-27
| | | | | | | | BUG=skia: Review URL: https://codereview.chromium.org/147683003 git-svn-id: http://skia.googlecode.com/svn/trunk@13190 2bbb7eff-a529-9590-31e7-b0007b416f81
* No deduping dictionaries for matrices and regions.Gravatar commit-bot@chromium.org2014-01-23
| | | | | | | | | | | | | | | | | | | | | | | | | | There's little benefit to deduping matrices and regions: they're infrequently used, and doubly infrequently reused. Their use-weighted byte cost is tiny. There is some downside to deduping matrices and regions. Even when they're not used, we prepare dictionaries for deduping them for every picture. Each of these dictionaries costs 160 bytes, so two unused dictionaries make a big chunk of the ~1100 bytes it takes to allocate an SkPictureRecord. (~330 come from parent class SkCanvas, 768 from SkPictureRecord itself, here reduced to 448). One side benefit of not deduping these guys is that the change weighs -140 lines of code. It may go without saying, but this breaks the picture format. Testing: out/Debug/tests && out/Debug/dm (which runs all picture modes by default) BUG=skia:1850 R=reed@google.com, bensong@google.com, robertphillips@google.com Author: mtklein@google.com Review URL: https://codereview.chromium.org/143883006 git-svn-id: http://skia.googlecode.com/svn/trunk@13149 2bbb7eff-a529-9590-31e7-b0007b416f81
* Convert SkWriter32 to use an SkTDArray for its internal storage.Gravatar commit-bot@chromium.org2014-01-14
| | | | | | | | | | | | | | | | | | | | | | | | This reduces the allocation overhead of a null picture (create, beginRecording(), endRecording) from about 18K to about 1.9K. (There's still lots more to prune.) SkPictureFlat can exploit the fact that Writer32 is contiguous simplify its memory management. The Writer32 itself becomes the scratch buffer. Remove lots and lots of arbitrary magic numbers that were size guesses and minimum allocation sizes. Keep your eyes open for the big obvious DUH why we save 16K per picture! (Spoiler alert. It's because that first save we issue in beginRecording() forces the old SkWriter32 to allocate 16K.) Tests passing, DM passing. bench --match writer: ~20% faster null bench_record: ~30% faster bench_record on buildbot .skps: ~3-6% slower, ranging 25% faster to 20% slower bench_pictures on buildbot .skps: ~1-2% faster, ranging 13% faster to 28% slower BUG=skia:1850 R=reed@google.com Author: mtklein@google.com Review URL: https://codereview.chromium.org/137433003 git-svn-id: http://skia.googlecode.com/svn/trunk@13073 2bbb7eff-a529-9590-31e7-b0007b416f81
* Eliminate useless NULL push by making fIndexedData 0-based.Gravatar commit-bot@chromium.org2014-01-10
| | | | | | | | | | | | | | | Depends on http://crrev.com/134223002 Testing: out/Debug/dm && out/Debug/tests && echo ok BUG=skia:1979 R=dominikg@chromium.org, tomhudson@chromium.org, halcanary@google.com Author: mtklein@google.com Review URL: https://codereview.chromium.org/134283002 git-svn-id: http://skia.googlecode.com/svn/trunk@13028 2bbb7eff-a529-9590-31e7-b0007b416f81
* fNextIndex is redundant. Remove it.Gravatar commit-bot@chromium.org2014-01-10
| | | | | | | | | | | | | | | This is warmup for removing the NULL at the front. Testing: out/Debug/tests && out/Debug/dm && echo ok BUG=skia:1979 R=dominikg@chromium.org, tomhudson@chromium.org, halcanary@google.com Author: mtklein@google.com Review URL: https://codereview.chromium.org/134223002 git-svn-id: http://skia.googlecode.com/svn/trunk@13026 2bbb7eff-a529-9590-31e7-b0007b416f81
* Allocate SkPictureFlat::fScratch lazily.Gravatar commit-bot@chromium.org2014-01-09
| | | | | | | | | | | | | | Cuts out half to two thirds of allocations of this object. Since we're already lazily allocating fWriteBuffer, we don't have to add any other code complexity. BUG=http://skbug.com/1980 R=mtklein@google.com, tomhudson@google.com Author: tomhudson@chromium.org Review URL: https://codereview.chromium.org/131483005 git-svn-id: http://skia.googlecode.com/svn/trunk@12992 2bbb7eff-a529-9590-31e7-b0007b416f81
* Function pointers -> templates in SkPictureFlat.Gravatar commit-bot@chromium.org2014-01-02
| | | | | | | | | | | | | | | | These flatten/unflatten function pointers were driving me nuts when reading the generated assembly for this code. We don't need the flexibility of function pointers here, so let's use templates to make it more manageable. You'll notice we get much better typing now on flatten/unflatten. BUG= R=reed@google.com Author: mtklein@google.com Review URL: https://codereview.chromium.org/123213004 git-svn-id: http://skia.googlecode.com/svn/trunk@12873 2bbb7eff-a529-9590-31e7-b0007b416f81
* reenable vertices gm, adding picture supportGravatar reed@google.com2013-12-30
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/112913005 git-svn-id: http://skia.googlecode.com/svn/trunk@12845 2bbb7eff-a529-9590-31e7-b0007b416f81
* use SkTDynamicHash in picture recordingGravatar mtklein@google.com2013-08-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cleaned up SkPictureFlat.h quite a bit while working on this. bench --match picture_record_ shows some improvement: compare.sh bench --match picture_record_ --repeat 100 master -> usehash N=3 p=0.001000 (corrected to 0.000333) sig? rel. speed bench y 1.0x picture_record_dictionaries y 1.5x picture_record_recurring_paint_dictionary y 3.8x picture_record_unique_paint_dictionary Overall relative speed: 1.9x bench_pictures --record is pretty much neutral: compare.sh bench_pictures -r ../skp --mode record --repeat 30 master -> usehash N=63 p=0.001000 (corrected to 0.000016) sig? rel. speed bench n 0.9x desk_pokemonwiki.skp y 0.9x desk_googlespreadsheet.skp y 0.9x tabl_pravda.skp y 1.0x desk_googlespreadsheetdashed.skp n 1.0x tabl_onlinewsj.skp n 1.0x tabl_nytimes.skp n 1.0x desk_googlehome.skp y 1.0x desk_techcrunch.skp n 1.0x tabl_slashdot.skp n 1.0x tabl_techmeme.skp n 1.0x desk_googleplus.skp n 1.0x desk_sfgate.skp n 1.0x tabl_transformice.skp n 1.0x desk_espn.skp n 1.0x desk_baidu.skp n 1.0x tabl_worldjournal.skp n 1.0x desk_chalkboard.skp n 1.0x tabl_frantzen.skp n 1.0x desk_gws.skp n 1.0x tabl_androidpolice.skp n 1.0x desk_linkedin.skp n 1.0x mobi_wikipedia.skp n 1.0x desk_wowwiki.skp n 1.0x desk_css3gradients.skp n 1.0x desk_gmailthread.skp n 1.0x desk_yahoogames.skp n 1.0x desk_facebook.skp n 1.0x desk_wordpress.skp n 1.0x tabl_vnexpress.skp n 1.0x desk_br337.skp n 1.0x tabl_engadget.skp n 1.0x tabl_theverge.skp n 1.0x desk_amazon.skp n 1.0x desk_ebay.skp n 1.0x tabl_hsfi.skp n 1.0x tabl_sahadan.skp n 1.0x desk_weather.skp n 1.0x tabl_digg.skp n 1.0x desk_youtubetvbrowse.skp n 1.0x tabl_culturalsolutions.skp n 1.0x tabl_ukwsj.skp n 1.0x desk_youtube.skp n 1.0x tabl_googlecalendar.skp y 1.0x desk_yahooanswers.skp n 1.0x desk_blogger.skp n 1.0x desk_yahoonews.skp y 1.0x desk_yahoosports.skp y 1.0x tabl_mercurynews.skp n 1.0x desk_youtubetvvideo.skp y 1.0x tabl_gspro.skp y 1.1x tabl_googleblog.skp y 1.1x tabl_cnet.skp y 1.1x tabl_mlb.skp y 1.1x tabl_cuteoverload.skp y 1.1x desk_booking.skp y 1.1x tabl_deviantart.skp y 1.1x desk_twitter.skp y 1.1x tabl_cnn.skp y 1.1x tabl_gamedeksiam.skp y 1.1x tabl_gmail.skp y 1.1x tabl_nofolo.skp y 1.1x tabl_mozilla.skp y 1.1x desk_pinterest.skp Overall relative speed: 1.0x (I'd take this to mean that the microbenches are probably drifting away from relevance.) BUG= R=reed@google.com Review URL: https://codereview.chromium.org/21564008 git-svn-id: http://skia.googlecode.com/svn/trunk@10825 2bbb7eff-a529-9590-31e7-b0007b416f81
* + ,fLastAllocated(NULL)Gravatar commit-bot@chromium.org2013-07-30
| | | | | | | | | | | BUG= R=scroggo@google.com Author: mtklein@google.com Review URL: https://chromiumcodereview.appspot.com/21046011 git-svn-id: http://skia.googlecode.com/svn/trunk@10446 2bbb7eff-a529-9590-31e7-b0007b416f81
* Start from scratch on a faster SkFlatDictionary.Gravatar commit-bot@chromium.org2013-07-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is like codereview.chromium.org/19276003, except it fits in better with the existing code, doesn't leak memory, and because it's back using SkChunkFlatController it's a little faster too, now a win across the board: Slowdown bench -1.59% desk_youtubetvbrowse.skp -2.56% desk_googlehome.skp -6.40% tabl_androidpolice.skp -6.45% desk_youtubetvvideo.skp -6.91% tabl_googlecalendar.skp ... -29.70% desk_yahoogames.skp -32.17% desk_googlespreadsheet.skp -32.23% mobi_wikipedia.skp -37.16% desk_chalkboard.skp -41.57% desk_pokemonwiki.skp Overall slowdown: -22.74% running bench [640 480] picture_record_recurring_paint_dictionary NONRENDERING: cmsecs = 9.92 running bench [640 480] picture_record_unique_paint_dictionary NONRENDERING: cmsecs = 22.16 running bench [640 480] picture_record_dictionaries NONRENDERING: cmsecs = 9.18 BUG= Committed: http://code.google.com/p/skia/source/detail?r=10328 R=tomhudson@google.com, reed@google.com, scroggo@google.com Author: mtklein@google.com Review URL: https://chromiumcodereview.appspot.com/19564007 git-svn-id: http://skia.googlecode.com/svn/trunk@10336 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Start from scratch on a faster SkFlatDictionary."Gravatar mtklein@google.com2013-07-24
| | | | | | This reverts commit fec9bfa02d5d2b27bfa2dad3e37e5825a720784d. git-svn-id: http://skia.googlecode.com/svn/trunk@10331 2bbb7eff-a529-9590-31e7-b0007b416f81
* Start from scratch on a faster SkFlatDictionary.Gravatar commit-bot@chromium.org2013-07-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is like codereview.chromium.org/19276003, except it fits in better with the existing code, doesn't leak memory, and because it's back using SkChunkFlatController it's a little faster too, now a win across the board: Slowdown bench -1.59% desk_youtubetvbrowse.skp -2.56% desk_googlehome.skp -6.40% tabl_androidpolice.skp -6.45% desk_youtubetvvideo.skp -6.91% tabl_googlecalendar.skp ... -29.70% desk_yahoogames.skp -32.17% desk_googlespreadsheet.skp -32.23% mobi_wikipedia.skp -37.16% desk_chalkboard.skp -41.57% desk_pokemonwiki.skp Overall slowdown: -22.74% running bench [640 480] picture_record_recurring_paint_dictionary NONRENDERING: cmsecs = 9.92 running bench [640 480] picture_record_unique_paint_dictionary NONRENDERING: cmsecs = 22.16 running bench [640 480] picture_record_dictionaries NONRENDERING: cmsecs = 9.18 BUG= R=tomhudson@google.com, reed@google.com, scroggo@google.com Author: mtklein@google.com Review URL: https://chromiumcodereview.appspot.com/19564007 git-svn-id: http://skia.googlecode.com/svn/trunk@10328 2bbb7eff-a529-9590-31e7-b0007b416f81
* First pass at Comment APIGravatar robertphillips@google.com2013-05-29
| | | | | | | | https://codereview.chromium.org/13957009/ git-svn-id: http://skia.googlecode.com/svn/trunk@9310 2bbb7eff-a529-9590-31e7-b0007b416f81
* One SkTSearch to rule them all. Allow key to be of different type than the ↵Gravatar bsalomon@google.com2013-05-17
| | | | | | | | | | array. R=bungeman@google.com Review URL: https://codereview.chromium.org/15070011 git-svn-id: http://skia.googlecode.com/svn/trunk@9182 2bbb7eff-a529-9590-31e7-b0007b416f81
* Refactor PictureRecord optimization & added ↵Gravatar robertphillips@google.com2013-03-12
| | | | | | | | | | saveLayer/save/clipR/DBM*/restore/restore optimization https://codereview.appspot.com/7485043/ git-svn-id: http://skia.googlecode.com/svn/trunk@8106 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2013-03-11
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@8061 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add a map from index to SkFlatData* in SkFlatDictionaryGravatar robertphillips@google.com2013-03-10
| | | | | | | | https://codereview.appspot.com/7531043/ git-svn-id: http://skia.googlecode.com/svn/trunk@8060 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2013-03-02
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@7939 2bbb7eff-a529-9590-31e7-b0007b416f81
* Reland r7918 & r7916Gravatar robertphillips@google.com2013-03-01
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@7931 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert r7918 & r7916 due to Linux rendering issuesGravatar robertphillips@google.com2013-03-01
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@7925 2bbb7eff-a529-9590-31e7-b0007b416f81
* Collapse saveLayer/drawBitmapRect/restore trios to drawBitmapRect when possibleGravatar robertphillips@google.com2013-03-01
| | | | | | | | https://codereview.appspot.com/7387045/ git-svn-id: http://skia.googlecode.com/svn/trunk@7916 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make SkTDArray accessors const-friendly.Gravatar commit-bot@chromium.org2013-02-28
| | | | | | | | This change creates const and non-const versions of SkTDArray::begin(), end(), operator[]() and getAt(). This will keep us from inadvertently changing a const SkTDArray, which the previous signatures allowed. Review URL: https://chromiumcodereview.appspot.com/12315131 git-svn-id: http://skia.googlecode.com/svn/trunk@7902 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add NOOP "command" to picture formatGravatar robertphillips@google.com2013-02-15
| | | | | | | | https://codereview.appspot.com/7343044/ git-svn-id: http://skia.googlecode.com/svn/trunk@7752 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix errors when compiling with -Wall -Werror on Android.Gravatar djsollen@google.com2013-02-07
| | | | | | | | This CL also turns those features on by default on Android Review URL: https://codereview.appspot.com/7313049 git-svn-id: http://skia.googlecode.com/svn/trunk@7645 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fixing invalid text clipping on SkPicture playbackGravatar junov@chromium.org2013-01-22
| | | | | | | | | | | | | | | The bug was caused by an invalid assumption that a flattend object's index is related to its array index in SkFlatDictionary::fData. The data in SkFlatDictionary is sorted by flattened data content, not by index number. Problem was solved by passing down the SkFlatData* through addPaint, rather than the index value. The bug was causing SkPictureRecord::addFontMetricsTopBottom to use cached font metrics from the wrong SkPaint instance. BUG=https://code.google.com/p/chromium/issues/detail?id=170964 Review URL: https://codereview.appspot.com/7178045 git-svn-id: http://skia.googlecode.com/svn/trunk@7312 2bbb7eff-a529-9590-31e7-b0007b416f81
* Don't die when there are no fonts available.Gravatar bungeman@google.com2013-01-17
| | | | | | | https://codereview.appspot.com/7147044/ git-svn-id: http://skia.googlecode.com/svn/trunk@7265 2bbb7eff-a529-9590-31e7-b0007b416f81
* revert 6766, thereby re-landing 6762-6763 now that the bots are readyGravatar reed@google.com2012-12-12
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@6770 2bbb7eff-a529-9590-31e7-b0007b416f81
* revert 6762-6763, since those require new skps to be generated, and we can'tGravatar reed@google.com2012-12-12
| | | | | | | | do that immediately right now... will re-submit when we can. git-svn-id: http://skia.googlecode.com/svn/trunk@6766 2bbb7eff-a529-9590-31e7-b0007b416f81
* make RRect and Oval first-class drawing primitives in SkCanvas.Gravatar reed@google.com2012-12-12
| | | | | | | add RRect as a first-class clip primitive. Review URL: https://codereview.appspot.com/6923058 git-svn-id: http://skia.googlecode.com/svn/trunk@6762 2bbb7eff-a529-9590-31e7-b0007b416f81
* cache fontmetrics in picture-recordGravatar reed@google.com2012-12-07
| | | | | | Review URL: https://codereview.appspot.com/6908049 git-svn-id: http://skia.googlecode.com/svn/trunk@6706 2bbb7eff-a529-9590-31e7-b0007b416f81
* In SkBitmapHeap, defer adding owners for new bitmaps.Gravatar scroggo@google.com2012-11-16
| | | | | | | | | | | | | | | | | | | | | | When using an SkFlatDictionary to flatten shaders, the dictionary can try to insert a duplicate bitmap shader that uses a bitmap which has been removed from the bitmap heap. This change was originally suggested by junov in https://codereview.appspot.com/6713048/. Add a test to verify that deferring the owners works. Without the change to bitmap heap the test would fail (and crash in debug mode). Also remove an unused function from SkFlatDictionary. BUG=http://code.google.com/p/chromium/issues/detail?id=143923 Review URL: https://codereview.appspot.com/6842051 git-svn-id: http://skia.googlecode.com/svn/trunk@6471 2bbb7eff-a529-9590-31e7-b0007b416f81
* re-re-land 5578Gravatar reed@google.com2012-09-18
| | | | | | | | will follow w/ new .skp files to keep the waterfall green (I hope) git-svn-id: http://skia.googlecode.com/svn/trunk@5584 2bbb7eff-a529-9590-31e7-b0007b416f81
* revert 5580Gravatar reed@google.com2012-09-18
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@5581 2bbb7eff-a529-9590-31e7-b0007b416f81
* re-land 5578 w/ pipe fixGravatar reed@google.com2012-09-18
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@5580 2bbb7eff-a529-9590-31e7-b0007b416f81
* revert 5578 -- broke pipeGravatar reed@google.com2012-09-18
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@5579 2bbb7eff-a529-9590-31e7-b0007b416f81
* Change drawBitmapRect to take a float-src-rect instead of integer-src-rect. ThisGravatar reed@google.com2012-09-18
| | | | | | | | | | | | | | | | | | allows the client more control over the scaling. Because of virtual overrides and wanting to keep the old call-sites up and running, this CL renames the virtual entry-point to drawBitmapRectToRect, and downgrades drawBitmapRect to a non-virtual helper function. The implementation is to use the float-rect for computing the matrix, but still cons-up an integer rect for the purposes of subsetting the original bitmap. We do this by calling float_src->roundOut(&int_src) so that we include all (partially) covered src pixels. No change needed on SkDevice, since that signature is explicitly passed the computed matrix. Review URL: https://codereview.appspot.com/6501140 git-svn-id: http://skia.googlecode.com/svn/trunk@5578 2bbb7eff-a529-9590-31e7-b0007b416f81