Skia
2DGraphicsLibrary
|
Stack helper class to automatically call restoreToCount() on the canvas when this object goes out of scope. More...
#include <SkCanvas.h>
Public Member Functions | |
SkAutoCanvasRestore (SkCanvas *canvas, bool doSave) | |
void | restore () |
Perform the restore now, instead of waiting for the destructor. More... | |
Private Attributes | |
SkCanvas * | fCanvas |
int | fSaveCount |
Stack helper class to automatically call restoreToCount() on the canvas when this object goes out of scope.
Use this to guarantee that the canvas is restored to a known state.
|
inline |
Perform the restore now, instead of waiting for the destructor.
Will only do this once.