aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/utils/SkTLogic.h
Commit message (Collapse)AuthorAge
* Partially restore small-T optimization for very small (empty) T.Gravatar commit-bot@chromium.org2014-05-07
| | | | | | | | | | | | | | This is particularly helpful for SkRecord::replace<NoOp>, which now doesn't go off and allocate a pointless byte. BUG=skia:2378 R=fmalita@chromium.org, bungeman@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/269543025 git-svn-id: http://skia.googlecode.com/svn/trunk@14622 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add pattern matchers for SkRecordGravatar commit-bot@chromium.org2014-05-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a mid-level library for finding patterns of commands in an SkRecord. At the API level, it's a bit regex inspired. Some examples: - Pattern1<Is<DrawRect>> matches a single DrawRect - Pattern1<Star<Is<DrawRect>>> matches 0 or more DrawRects - Pattern2<Is<ClipRect>, Is<DrawRect>> matches a single clip rect followed by a single draw rect - Pattern3<Is<Save>, Star<IsDraw>, Is<Restore>> matches a single Save, followed by any number of Draws, followed by Restore - Pattern1<Or<Is<DrawRect>, Is<ClipRect>>> matches a DrawRect or a ClipRect - Pattern1<Not<Is<ClipRect>>> matches a command that's notClipRect. Once you have a pattern, you can call .search() on it to step through ranges of matching commands. This means patterns can replace most of the custom iteration logic for optimization passes: the generic pattern searching steps through all the optimization candidates, which optimization-specific code further inspects and mutates. SkRecordTraits is now unused. Bye bye! Generated code and performance of SkRecordOpts is very similar to what it was before. (I had to use SK_ALWAYS_INLINE in a few places to make this so.) BUG=skia:2378 R=fmalita@chromium.org, bungeman@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/263063002 git-svn-id: http://skia.googlecode.com/svn/trunk@14582 2bbb7eff-a529-9590-31e7-b0007b416f81
* Start using type traits in src/record instead of macros.Gravatar commit-bot@chromium.org2014-04-28
| | | | | | | | | | | | | Simplified skip logic by always running clip commands. No performance difference on bot or silk SKPs. BUG=skia:2378 R=bungeman@google.com, fmalita@chromium.org, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/258693006 git-svn-id: http://skia.googlecode.com/svn/trunk@14410 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add newline for r10050.Gravatar bungeman@google.com2013-07-12
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@10051 2bbb7eff-a529-9590-31e7-b0007b416f81
* R=mtklein@google.comGravatar bungeman@google.com2013-07-12
Review URL: https://codereview.chromium.org/18503009 git-svn-id: http://skia.googlecode.com/svn/trunk@10050 2bbb7eff-a529-9590-31e7-b0007b416f81