Lines Matching refs:pattern
28 // Most of the optimizations in this file are pattern-based. These are all defined as structs with:
33 // Run a pattern-based optimization once across the SkRecord, returning true if it made any changes.
34 // It looks for spans which match Pass::Pattern, and when found calls onMatch() with the pattern,
38 typename Pass::Pattern pattern;
42 while (pattern.search(record, &begin, &end)) {
43 changed |= pass->onMatch(record, &pattern, begin, end);
51 bool onMatch(SkRecord* record, Pattern* pattern, unsigned begin, unsigned end) {
70 bool onMatch(SkRecord* record, Pattern* pattern, unsigned begin, unsigned end) {
86 bool onMatch(SkRecord* record, Pattern* pattern, unsigned begin, unsigned end) {
88 if (pattern->first<Save>()->flags != SkCanvas::kMatrixClip_SaveFlag) {
112 bool onMatch(SkRecord* record, Pattern* pattern, unsigned begin, unsigned end) {
113 SaveLayer* saveLayer = pattern->first<SaveLayer>();
125 SkPaint* drawPaint = pattern->second<SkPaint>();
179 bool onMatch(SkRecord* record, Pattern* pattern, unsigned begin, unsigned end) {
181 DrawPosText* draw = pattern->first<DrawPosText>();
223 bool onMatch(SkRecord* record, Pattern* pattern, unsigned begin, unsigned end) {
225 DrawPosTextH* draw = pattern->first<DrawPosTextH>();
261 // There's no efficient way (yet?) to express this one as a pattern, so we write a custom pass.