aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkRecordPattern.h
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2014-09-10 16:08:27 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-09-10 16:08:28 -0700
commit99d6a9ee8b3516de892d118c71aa5e6e5c865efd (patch)
treedb1f93c0fb435d1eac274d302d65eac45a9abf88 /src/core/SkRecordPattern.h
parentf91c47d91d72a1d85e2d6701864b8d7accc81647 (diff)
Fix a bug in Save-Restore no-op optimization.
We optimize Save SaveLayer Restore Restore into NoOp NoOp NoOp Restore I'm considering skipping the call to SkRecordOptimize again just to eliminate this extra variable from landing SkRecord. Thoughts? BUG=skia: R=robertphillips@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/560163002
Diffstat (limited to 'src/core/SkRecordPattern.h')
-rw-r--r--src/core/SkRecordPattern.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/SkRecordPattern.h b/src/core/SkRecordPattern.h
index 57779ffd76..68a3aa315e 100644
--- a/src/core/SkRecordPattern.h
+++ b/src/core/SkRecordPattern.h
@@ -85,6 +85,10 @@ struct Or {
template <typename A, typename B, typename C>
struct Or3 : Or<A, Or<B, C> > {};
+// Matches if any of A, B, C or D does. Stores nothing.
+template <typename A, typename B, typename C, typename D>
+struct Or4 : Or<A, Or<B, Or<C, D> > > {};
+
// Star is a special matcher that greedily matches Matcher 0 or more times. Stores nothing.
template <typename Matcher>
struct Star {