Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
SkClipStack::AutoRestore Class Reference

#include <SkClipStack.h>

Public Member Functions

 AutoRestore (SkClipStack *cs, bool doSave)
 
 ~AutoRestore ()
 

Detailed Description

Definition at line 294 of file SkClipStack.h.

Constructor & Destructor Documentation

◆ AutoRestore()

SkClipStack::AutoRestore::AutoRestore ( SkClipStack cs,
bool  doSave 
)
inline

Definition at line 296 of file SkClipStack.h.

297 : fCS(cs), fSaveCount(cs->getSaveCount())
298 {
299 if (doSave) {
300 fCS->save();
301 }
302 }
int getSaveCount() const
Definition: SkClipStack.h:290

◆ ~AutoRestore()

SkClipStack::AutoRestore::~AutoRestore ( )
inline

Definition at line 303 of file SkClipStack.h.

303 {
304 SkASSERT(fCS->getSaveCount() >= fSaveCount); // no underflow
305 while (fCS->getSaveCount() > fSaveCount) {
306 fCS->restore();
307 }
308 }
#define SkASSERT(cond)
Definition: SkAssert.h:116
void restore()

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