Skia
2DGraphicsLibrary
|
Classes | |
class | Builder |
class | LayerDrawLooperContext |
struct | LayerInfo |
Info for how to apply the layer's paint and offset. More... | |
struct | Rec |
Public Types | |
enum | Bits { kStyle_Bit = 1 << 0, kTextSkewX_Bit = 1 << 1, kPathEffect_Bit = 1 << 2, kMaskFilter_Bit = 1 << 3, kShader_Bit = 1 << 4, kColorFilter_Bit = 1 << 5, kXfermode_Bit = 1 << 6, kEntirePaint_Bits = -1 } |
Bits specifies which aspects of the layer's paint should replace the corresponding aspects on the draw's paint. More... | |
typedef int32_t | BitFlags |
Public Types inherited from SkFlattenable | |
enum | Type { kSkColorFilter_Type, kSkDrawable_Type, kSkDrawLooper_Type, kSkImageFilter_Type, kSkMaskFilter_Type, kSkPathEffect_Type, kSkPixelRef_Type, kSkRasterizer_Type, kSkShaderBase_Type, kSkUnused_Type, kSkUnused_Xfermode_Type, kSkNormalSource_Type } |
typedef sk_sp< SkFlattenable >(* | Factory )(SkReadBuffer &) |
Public Member Functions | |
SkDrawLooper::Context * | makeContext (SkCanvas *, SkArenaAlloc *) const override |
Called right before something is being drawn. More... | |
bool | asABlurShadow (BlurShadowRec *rec) const override |
If this looper can be interpreted as having two layers, such that. More... | |
Factory | getFactory () const override |
Implement this to return a factory function pointer that can be called to recreate your class given a buffer (previously written to by your override of flatten(). | |
Public Member Functions inherited from SkDrawLooper | |
bool | canComputeFastBounds (const SkPaint &paint) const |
The fast bounds functions are used to enable the paint to be culled early in the drawing pipeline. More... | |
void | computeFastBounds (const SkPaint &paint, const SkRect &src, SkRect *dst) const |
Public Member Functions inherited from SkFlattenable | |
virtual const char * | getTypeName () const |
Returns the name of the object's class. More... | |
Public Member Functions inherited from SkRefCntBase | |
SkRefCntBase () | |
Default construct, initializing the reference count to 1. | |
virtual | ~SkRefCntBase () |
Destruct, asserting that the reference count is 1. | |
int32_t | getRefCnt () const |
Return the reference count. More... | |
void | validate () const |
bool | unique () const |
May return true if the caller is the only owner. More... | |
void | ref () const |
Increment the reference count. More... | |
void | unref () const |
Decrement the reference count. More... | |
Static Public Member Functions | |
static sk_sp< SkFlattenable > | CreateProc (SkReadBuffer &buffer) |
Static Public Member Functions inherited from SkFlattenable | |
static Factory | NameToFactory (const char name[]) |
static const char * | FactoryToName (Factory) |
static bool | NameToType (const char name[], Type *type) |
static void | Register (const char name[], Factory, Type) |
Protected Member Functions | |
sk_sp< SkDrawLooper > | onMakeColorSpace (SkColorSpaceXformer *) const override |
void | flatten (SkWriteBuffer &) const override |
Override this if your subclass needs to record data that it will need to recreate itself from its CreateProc (returned by getFactory()). | |
Protected Member Functions inherited from SkDrawLooper | |
sk_sp< SkDrawLooper > | makeColorSpace (SkColorSpaceXformer *xformer) const |
Protected Member Functions inherited from SkRefCntBase | |
void | internal_dispose_restore_refcnt_to_1 () const |
Allow subclasses to call this if they've overridden internal_dispose so they can reset fRefCnt before the destructor is called or if they choose not to call the destructor (e.g. More... | |
Private Types | |
typedef SkDrawLooper | INHERITED |
Private Attributes | |
Rec * | fRecs |
int | fCount |
Bits specifies which aspects of the layer's paint should replace the corresponding aspects on the draw's paint.
kEntirePaint_Bits means use the layer's paint completely. 0 means ignore the layer's paint... except for fColorMode, which is always applied.
Enumerator | |
---|---|
kStyle_Bit |
use this layer's Style/stroke settings |
kTextSkewX_Bit |
use this layer's textskewx |
kPathEffect_Bit |
use this layer's patheffect |
kMaskFilter_Bit |
use this layer's maskfilter |
kShader_Bit |
use this layer's shader |
kColorFilter_Bit |
use this layer's colorfilter |
kXfermode_Bit |
use this layer's xfermode |
kEntirePaint_Bits |
Use the layer's paint entirely, with these exceptions:
|
|
overridevirtual |
If this looper can be interpreted as having two layers, such that.
If any of the above are not met, return false and ignore the BlurShadowRec parameter.
Reimplemented from SkDrawLooper.
|
overridevirtual |
Called right before something is being drawn.
Returns a Context whose next() method should be called until it returns false.
Implements SkDrawLooper.