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
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
I found this while running a modified version of v8's tools/presubmit.py
script.
samplecode/SampleImage.cpp does not end with a single new line.
samplecode/SampleImageDir.cpp does not end with a single new line.
src/ports/SkFontHost_sandbox_none.cpp does not end with a single new line.
tests/FlatDataTest.cpp does not end with a single new line.
tests/ImageCacheTest.cpp has trailing whitespaces in line 31.
* Removed three empty files.
* Add single new line to FlatDataTest.cpp
* Removed trailing whitespace in ImageCacheTest.cpp
BUG=None
TEST=None
R=bsalomon@google.comTBR=bsalomon@google.com
Review URL: https://codereview.chromium.org/111503008
git-svn-id: http://skia.googlecode.com/svn/trunk@12684 2bbb7eff-a529-9590-31e7-b0007b416f81
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