Go to file
commit-bot@chromium.org 73fffeb83a Add pattern matchers for SkRecord
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
2014-05-05 21:59:52 +00:00
animations first cut at a checkbox 2009-10-21 19:41:10 +00:00
bench Fixes lower/upper typo. 2014-05-03 13:03:48 +00:00
debugger Sanitizing source files in Housekeeper-Nightly 2014-04-24 03:05:07 +00:00
dm Remove setLocalMatrix calls from picture shader GM. 2014-05-02 21:23:52 +00:00
docs warn that docs/quickstart.md is out of sync with official docs 2014-04-21 19:18:46 +00:00
expectations Greenify bench bot Perf-Android-Nexus7-Tegra3-Arm7-Release at build 2774 2014-05-05 09:51:09 +00:00
experimental Fix an issue with FireFox where it blurs when copying from a smaller to a 2014-05-05 18:43:16 +00:00
forth Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
gm new vertices gm to test alpha 2014-05-05 20:41:21 +00:00
gyp Add pattern matchers for SkRecord 2014-05-05 21:59:52 +00:00
include fix TriColorShader to respect the paint's alpha 2014-05-05 21:35:09 +00:00
platform_tools Fix android_perf script to work with changes from a137675 2014-05-05 18:40:15 +00:00
resources Reland "Properly set alpha type in webp decode." 2014-04-24 18:55:13 +00:00
samplecode remove code behind SK_SUPPORT_LEGACY_PROCXFERMODE 2014-05-01 15:56:52 +00:00
src Add pattern matchers for SkRecord 2014-05-05 21:59:52 +00:00
tests Add pattern matchers for SkRecord 2014-05-05 21:59:52 +00:00
third_party Drop executable flag from headers so that they can be packaged 2014-03-11 19:55:51 +00:00
tools Spelling fix, comments explaining script. 2014-05-05 13:30:06 +00:00
trybots_to_run/chrome Deleting the hardcoded list of compile bots in trybots_to_run. 2013-04-09 11:59:42 +00:00
.gitignore clean up gitignore; sort, add chromeos/externals, remove trailing /. 2014-04-17 22:56:46 +00:00
AUTHORS Fixed Skia compilation error with strict clang. 2014-04-07 13:12:47 +00:00
codereview.settings Add BUG_PREFIX to codereview.settings 2014-01-14 21:19:21 +00:00
CONTRIBUTING Add CONTRIBUTING file 2014-01-13 15:06:26 +00:00
CQ_COMMITTERS Add fmalita@chromium.org to CQ_COMMITTERS. 2014-05-01 13:32:21 +00:00
DEPS Revert of Roll ANGLE. (https://codereview.chromium.org/237173002/) 2014-05-01 20:20:50 +00:00
Doxyfile update Doxygen config file to include gpu directory in api generation 2014-03-07 16:20:36 +00:00
gyp_skia allow gyp_skia to be run from any directory. 2014-04-17 16:11:58 +00:00
gyp_skia.py Roll gyp deps from 1765 to 1796. 2013-11-21 18:11:14 +00:00
LICENSE Manually update copyright notices in files that defied the automated process 2011-07-28 14:24:55 +00:00
make.bat Make make.bat and gyp_skia work with VS 2012. 2013-05-07 19:31:20 +00:00
make.py change default build (in "make" wrapper) to ninja on all platforms 2014-04-01 07:02:41 +00:00
Makefile simplify tools/xsan_build now that make runs ninja 2014-04-24 18:16:13 +00:00
Makefile.old Replace GR_*_BUILD by their SK_BUILD_FOR_* equivalents. 2013-09-25 20:57:51 +00:00
OWNERS add root files from chrome 2013-08-13 19:11:15 +00:00
PRESUBMIT.py Check if the issue owner is in the AUTHORS file in PRESUBMIT.py 2014-02-03 14:18:32 +00:00
README whitespace commit to trigger buildbot 2011-07-15 14:11:58 +00:00
README.chromium add root files from chrome 2013-08-13 19:11:15 +00:00
skia.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
whitespace.txt Whitespace change to test the Skia CQ 2014-05-01 16:30:30 +00:00

Skia is a complete 2D graphic library for drawing Text, Geometries, and Images.

See full details, and build instructions, at http://code.google.com/p/skia/wiki/DocRoot