Flutter Engine
The Flutter Engine
|
#include <SkCanvasPriv.h>
Public Member Functions | |
AutoLayerForImageFilter (SkCanvas *canvas, const SkPaint &paint, const SkRect *rawBounds, bool skipMaskFilterLayer) | |
AutoLayerForImageFilter (const AutoLayerForImageFilter &)=delete | |
AutoLayerForImageFilter & | operator= (const AutoLayerForImageFilter &)=delete |
AutoLayerForImageFilter (AutoLayerForImageFilter &&) | |
AutoLayerForImageFilter & | operator= (AutoLayerForImageFilter &&) |
~AutoLayerForImageFilter () | |
const SkPaint & | paint () const |
void | addMaskFilterLayer (const SkRect *drawBounds) |
We implement ImageFilters and MaskFilters for a given draw by creating a layer, then applying the filter to the pixels of that layer (its backing surface/image), and then we call restore() to blend that layer to the main canvas.
If the paint has neither an image filter nor a mask filter, there will be no layer and paint() returns the original without modification.
NOTE: This works by assuming all sources of color and shading are represented by the SkPaint. Operations like drawImageRect must convert to an equivalent drawRect call if there's a mask filter, or otherwise ensure there are no mask filters (e.g. drawAtlas).
Definition at line 122 of file SkCanvasPriv.h.
AutoLayerForImageFilter::AutoLayerForImageFilter | ( | SkCanvas * | canvas, |
const SkPaint & | paint, | ||
const SkRect * | rawBounds, | ||
bool | skipMaskFilterLayer | ||
) |
Definition at line 162 of file SkCanvasPriv.cpp.
|
delete |
AutoLayerForImageFilter::AutoLayerForImageFilter | ( | AutoLayerForImageFilter && | other | ) |
Definition at line 205 of file SkCanvasPriv.cpp.
AutoLayerForImageFilter::~AutoLayerForImageFilter | ( | ) |
Definition at line 196 of file SkCanvasPriv.cpp.
void AutoLayerForImageFilter::addMaskFilterLayer | ( | const SkRect * | drawBounds | ) |
Definition at line 241 of file SkCanvasPriv.cpp.
AutoLayerForImageFilter & AutoLayerForImageFilter::operator= | ( | AutoLayerForImageFilter && | other | ) |
Definition at line 209 of file SkCanvasPriv.cpp.
|
delete |
|
inline |
Definition at line 144 of file SkCanvasPriv.h.