skia2/gyp
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
..
android_deps.gyp Reland "Gyp file changes for the android framework." 2014-02-05 16:35:12 +00:00
android_framework_lib.gyp Updates to gyp files for building Android.mk 2014-02-28 16:07:39 +00:00
android_system.gyp Update DEPS and GYP to use the copy of Android in platform_tools. 2013-05-02 12:27:21 +00:00
angle.gyp Revert of Roll ANGLE. (https://codereview.chromium.org/237173002/) 2014-05-01 20:20:50 +00:00
animator.gyp rename SkPaintParts.* to SkPaintPart.* 2014-04-18 15:14:25 +00:00
apptype_console.gypi Generate tests/Android.mk from gyp 2014-04-28 16:00:30 +00:00
bench.gyp use BenchTimer, print in µs 2014-04-28 15:30:02 +00:00
bench.gypi Add a new bench that tests a simple image filter DAG. 2014-04-10 16:16:13 +00:00
chromeos_deps.gyp GYP Changes and Scripts for Compiling Skia for ChromeOS 2013-06-11 15:52:19 +00:00
common_conditions.gypi Revert of Roll ANGLE. (https://codereview.chromium.org/237173002/) 2014-05-01 20:20:50 +00:00
common_variables.gypi ARM Skia NEON patches - 35 - First AArch64 support 2014-04-02 15:03:56 +00:00
common.gypi Deprecate SaveFlags use in the public SkCanvas API. 2014-04-24 21:51:58 +00:00
core.gyp Reland "Gyp file changes for the android framework." 2014-02-05 16:35:12 +00:00
core.gypi Remove dead code. 2014-05-01 21:03:53 +00:00
debugger.gyp Small tweaks to be able to build everything target: 2014-01-08 21:16:14 +00:00
dm.gyp Turn on quilt mode in DM. 2014-04-30 13:20:45 +00:00
effects.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
effects.gypi Remove SkResizeImageFilter. 2014-04-07 15:11:08 +00:00
everything.gyp First pass at a web app that lets you run Skia code and see the results. 2014-03-11 22:57:50 +00:00
experimental.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
FileReaderApp.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
flags.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
fontconfig.gyp Roll fontconfig to 2.11.0 and reenable poppler on mac 2014-01-15 17:24:22 +00:00
freetype.gyp Build Skia for a bare-bones embedded Linux system. 2014-02-24 20:22:34 +00:00
freetype.gypi Sanitizing source files in Housekeeper-Nightly 2013-08-21 07:01:29 +00:00
giflib.gyp Sanitizing source files in Housekeeper-Nightly 2014-02-25 03:05:18 +00:00
gm.gyp Allow GMs to be used as benchmarks. Make convex_poly_clip opt in. 2014-02-03 14:48:17 +00:00
gmslides.gypi Add GM that exercises SkCanvas::discard() 2014-04-24 21:03:00 +00:00
gpu.gyp Enable use of distance fields via SkPaint flag. 2014-03-11 17:07:15 +00:00
gpu.gypi Split GrResource into GrCacheable/GrGpuObject 2014-05-02 21:38:22 +00:00
gputest.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
iconv.gyp Sanitizing source files in Housekeeper-Nightly 2013-08-21 07:01:29 +00:00
images.gyp Fix ChromeOS build broken in f84722e477 2014-02-24 21:39:01 +00:00
jsoncpp.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
libjpeg.gyp Build Skia for a bare-bones embedded Linux system. 2014-02-24 20:22:34 +00:00
libpng.gyp Build Skia for a bare-bones embedded Linux system. 2014-02-24 20:22:34 +00:00
libwebp.gyp Fix warnings on Ubuntu13 2014-02-21 20:11:42 +00:00
lua.gyp Build Skia for a bare-bones embedded Linux system. 2014-02-24 20:22:34 +00:00
most.gyp get iOS building again 2014-04-05 01:13:43 +00:00
nacl.gyp Prepare skia for shared library build on android 2013-06-03 12:10:19 +00:00
opts.gyp Cleanup of SSE optimization files. 2014-04-30 14:58:46 +00:00
pathops_unittest.gyp fix minor skp-found bugs 2014-04-25 12:59:11 +00:00
pathops_unittest.gypi path ops work in progress 2013-10-02 14:49:34 +00:00
pathops.gypi path ops work in progress 2013-09-16 15:55:01 +00:00
pdf.gyp Build Skia for a bare-bones embedded Linux system. 2014-02-24 20:22:34 +00:00
pdf.gypi Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
pdfviewer_lib.gyp Build Skia for a bare-bones embedded Linux system. 2014-02-24 20:22:34 +00:00
pdfviewer.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
pixman_test.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
poppler.gyp Add extra warnings to match what Android uses. 2013-11-20 15:13:49 +00:00
ports.gyp Purge SkPurgeableMemoryBlock. 2014-04-01 23:50:53 +00:00
public_headers.gypi replace old SK_TRACE_EVENT macros with new TRACE_EVENT ones, and then remove them entirely! 2014-03-20 20:00:24 +00:00
record.gyp Start using type traits in src/record instead of macros. 2014-04-28 16:19:45 +00:00
record.gypi Add a .gypi to insulate Chrome from refactorings in src/record. 2014-04-21 17:08:19 +00:00
SampleApp.gyp get iOS building again 2014-04-05 01:13:43 +00:00
sfnt.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
shapeops_demo.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
shapeops_edge.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
shapeops_tool.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
SimpleCocoaApp.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
SimpleiOSApp.gyp get iOS building again 2014-04-05 01:13:43 +00:00
skflate.gyp Build Skia for a bare-bones embedded Linux system. 2014-02-24 20:22:34 +00:00
skia_for_chromium_defines.gypi remove unneeded SK_SUPPORT_LEGACY_PROCXFERMODE 2014-04-30 21:34:14 +00:00
skia_lib.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
skpskgr_test.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
svg.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
tests.gyp Generate tests/Android.mk from gyp 2014-04-28 16:00:30 +00:00
tests.gypi Add pattern matchers for SkRecord 2014-05-05 21:59:52 +00:00
tools.gyp use BenchTimer, print in µs 2014-04-28 15:30:02 +00:00
utils.gyp Fix size of rotated text with FreeType. 2014-04-15 15:52:07 +00:00
v8.gyp Factor out a BaseContext from JsContext. 2014-03-04 20:44:32 +00:00
views_animated.gyp Remove dependency of views on angle 2014-04-29 00:38:39 +00:00
views.gyp Remove dependency of views on angle 2014-04-29 00:38:39 +00:00
webtry.gyp Add pathops and capture stderr so we can get SkDebugf output. 2014-04-28 14:56:32 +00:00
xml.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
xps.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
zlib.gyp Fix valgrind bot errors introduced in f84722e477. 2014-02-25 18:01:37 +00:00