Home | History | Annotate | Download | only in core

Lines Matching defs:first

16 // First, some matchers.  These match a single command in the SkRecord,
84 // Matches if any of First or Rest... does. Stores nothing.
85 template <typename First, typename... Rest>
88 bool operator()(T* ptr) { return First()(ptr) || Or<Rest...>()(ptr); }
90 template <typename First>
91 struct Or<First> {
93 bool operator()(T* ptr) { return First()(ptr); }
108 // - first, second, third, ... return the data stored by their respective matchers in the pattern.
118 template <typename First, typename... Rest>
119 class Pattern<First, Rest...> {
128 // Starting from *end, walk through the SkRecord to find the first span matching this pattern.
141 template <typename T> T* first() { return fFirst.get(); }
142 template <typename T> T* second() { return fRest.template first<T>(); }
147 // If first isn't a Greedy, try to match at i once.
149 int matchFirst(T* first, SkRecord* record, int i) {
151 if (record->mutate(i, *first)) {
158 // If first is a Greedy, walk i until it doesn't match.
160 int matchFirst(Greedy<T>* first, SkRecord* record, int i) {
162 if (!record->mutate(i, *first)) {
170 First fFirst;