Flutter Engine
The Flutter Engine
Public Types | Public Member Functions | List of all members
SaveNoDrawsRestoreNooper Struct Reference

Public Types

typedef Pattern< Is< Save >, Greedy< Not< Or< Is< Save >, Is< SaveLayer >, Is< Restore >, IsDraw > > >, Is< Restore > > Match
 

Public Member Functions

bool onMatch (SkRecord *record, Match *, int begin, int end)
 

Detailed Description

Definition at line 117 of file SkRecordOpts.cpp.

Member Typedef Documentation

◆ Match

typedef Pattern<Is<Save>, Greedy<Not<Or<Is<Save>, Is<SaveLayer>, Is<Restore>, IsDraw> > >, Is<Restore> > SaveNoDrawsRestoreNooper::Match

Definition at line 126 of file SkRecordOpts.cpp.

Member Function Documentation

◆ onMatch()

bool SaveNoDrawsRestoreNooper::onMatch ( SkRecord record,
Match ,
int  begin,
int  end 
)
inline

Definition at line 128 of file SkRecordOpts.cpp.

128 {
129 // The entire span between Save and Restore (inclusively) does nothing.
130 for (int i = begin; i < end; i++) {
131 record->replace<NoOp>(i);
132 }
133 return true;
134 }
T * replace(int i)
Definition: SkRecord.h:83
static const char * begin(const StringSlice &s)
Definition: editor.cpp:252
glong glong end

The documentation for this struct was generated from the following file: