aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/RecordPatternTest.cpp
Commit message (Collapse)AuthorAge
* Modernize SkRecordPattern.hGravatar mtklein2015-11-19
| | | | | | | | | | | | - Fold Or, Or3, Or4 into one flexible Or. - Fold Pattern1...Pattern7 into one flexible Pattern. - Rename Star Greedy Still fighting with a flexible get<N>() method instead of first, second, third, etc. BUG=skia: Review URL: https://codereview.chromium.org/1465443002
* Style Change: NULL->nullptrGravatar halcanary2015-08-27
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002
* unsigned -> int for counts and indices in picture-related codeGravatar mtklein2015-08-19
| | | | | | | | also, (C) BUG=skia: Review URL: https://codereview.chromium.org/1300163002
* Cull pushCull and popCull from Skia.Gravatar mtklein2014-12-12
| | | | | | | | These calls are unused and going away. Waiting on crrev.com/796083002. BUG=skia: Review URL: https://codereview.chromium.org/794263002
* Defer saves() until they're neededGravatar reed2014-12-11
| | | | | | | | patch from issue 759443006 at patchset 40001 (http://crrev.com/759443006#ps40001) BUG=skia: Review URL: https://codereview.chromium.org/767333002
* Remove SkRecorder's kWriteOnly mode.Gravatar commit-bot@chromium.org2014-05-29
| | | | | | | | | | | | | | | | | | | I'm soon going to have SkRecorder start calling getTotalMatrix(), which would be broken in write-only mode. That change is big and nebulous, but it's clear kWriteOnly needs to go, so we might as well kill it now. My notes in bench_playback about kWriteOnly mode being important were probably overly cautious. I now think this is a fair enough comparison even re-recording into a read-write canvas. BUG=skia:2378 R=fmalita@chromium.org, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/290653004 git-svn-id: http://skia.googlecode.com/svn/trunk@14963 2bbb7eff-a529-9590-31e7-b0007b416f81
* Split Star into Star (stores nothing) and List (stores matches).Gravatar commit-bot@chromium.org2014-05-08
| | | | | | | | | | | | | | | | | | | Just noticed that the cull noop pattern (PushCull, Star<NoOp>, PopCull) would trigger the Star that stores matches. We certainly don't need those matches here, so instead of magically determining which Star you need, we'll make you tell us which one you want. No one but List's unit test needs List. I'll leave it for now, but we might find it's not useful. BUG=skia:2378 R=fmalita@chromium.org, mtklein@google.com, bungeman@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/275623002 git-svn-id: http://skia.googlecode.com/svn/trunk@14655 2bbb7eff-a529-9590-31e7-b0007b416f81
* SaveLayer is not a draw.Gravatar commit-bot@chromium.org2014-05-06
| | | | | | | | | | | | | | | | | Will keep thinking about the best way to handle this: - leave as-is - tag the records - some range check on T::kType - just list all Draw* in IsDraw BUG=skia:2378 R=fmalita@chromium.org, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/269543023 git-svn-id: http://skia.googlecode.com/svn/trunk@14602 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