Flutter Engine
The Flutter Engine
|
#include <SkDrawBase.h>
Public Types | |
enum | RectType { kHair_RectType , kFill_RectType , kStroke_RectType , kPath_RectType } |
using | BlitterChooser = SkBlitter *(const SkPixmap &dst, const SkMatrix &ctm, const SkPaint &, SkArenaAlloc *, bool drawCoverage, sk_sp< SkShader > clipShader, const SkSurfaceProps &) |
Public Member Functions | |
SkDrawBase () | |
void | drawPaint (const SkPaint &) const |
void | drawRect (const SkRect &prePaintRect, const SkPaint &, const SkMatrix *paintMatrix, const SkRect *postPaintRect) const |
void | drawRect (const SkRect &rect, const SkPaint &paint) const |
void | drawRRect (const SkRRect &, const SkPaint &) const |
void | drawPath (const SkPath &path, const SkPaint &paint, const SkMatrix *prePathMatrix=nullptr, bool pathIsMutable=false) const |
void | drawPathCoverage (const SkPath &src, const SkPaint &paint, SkBlitter *customBlitter=nullptr) const |
void | drawDevicePoints (SkCanvas::PointMode, size_t count, const SkPoint[], const SkPaint &, SkDevice *) const |
void | validate () const |
Public Member Functions inherited from SkGlyphRunListPainterCPU::BitmapDevicePainter | |
BitmapDevicePainter ()=default | |
BitmapDevicePainter (const BitmapDevicePainter &)=default | |
virtual | ~BitmapDevicePainter ()=default |
virtual void | paintMasks (SkZip< const SkGlyph *, SkPoint > accepted, const SkPaint &paint) const =0 |
virtual void | drawBitmap (const SkBitmap &, const SkMatrix &, const SkRect *dstOrNull, const SkSamplingOptions &, const SkPaint &) const =0 |
Static Public Member Functions | |
static bool | ComputeMaskBounds (const SkRect &devPathBounds, const SkIRect &clipBounds, const SkMaskFilter *filter, const SkMatrix *filterMatrix, SkIRect *bounds) |
static bool | DrawToMask (const SkPath &devPath, const SkIRect &clipBounds, const SkMaskFilter *, const SkMatrix *filterMatrix, SkMaskBuilder *dst, SkMaskBuilder::CreateMode mode, SkStrokeRec::InitStyle style) |
static RectType | ComputeRectType (const SkRect &, const SkPaint &, const SkMatrix &, SkPoint *strokeSize) |
Public Attributes | |
SkPixmap | fDst |
BlitterChooser * | fBlitterChooser {nullptr} |
const SkMatrix * | fCTM {nullptr} |
const SkRasterClip * | fRC {nullptr} |
const SkSurfaceProps * | fProps {nullptr} |
Definition at line 40 of file SkDrawBase.h.
using SkDrawBase::BlitterChooser = SkBlitter* (const SkPixmap& dst, const SkMatrix& ctm, const SkPaint&, SkArenaAlloc*, bool drawCoverage, sk_sp<SkShader> clipShader, const SkSurfaceProps&) |
Definition at line 113 of file SkDrawBase.h.
enum SkDrawBase::RectType |
Enumerator | |
---|---|
kHair_RectType | |
kFill_RectType | |
kStroke_RectType | |
kPath_RectType |
Definition at line 95 of file SkDrawBase.h.
SkDrawBase::SkDrawBase | ( | ) |
Definition at line 53 of file SkDrawBase.cpp.
|
static |
Definition at line 494 of file SkDrawBase.cpp.
|
static |
Based on the paint's style, strokeWidth, and the matrix, classify how to draw the rect. If no special-case is available, returns kPath_RectType.
Iff RectType == kStroke_RectType, then strokeSize is set to the device width and height of the stroke.
Definition at line 111 of file SkDrawBase.cpp.
void SkDrawBase::drawDevicePoints | ( | SkCanvas::PointMode | mode, |
size_t | count, | ||
const SkPoint | pts[], | ||
const SkPaint & | paint, | ||
SkDevice * | device | ||
) | const |
Definition at line 597 of file SkDrawBase.cpp.
void SkDrawBase::drawPaint | ( | const SkPaint & | paint | ) | const |
Definition at line 74 of file SkDrawBase.cpp.
|
inline |
To save on mallocs, we allow a flag that tells us that srcPath is mutable, so that we don't have to make copies of it as we transform it.
If prePathMatrix is not null, it should logically be applied before any stroking or other effects. If there are no effects on the paint that affect the geometry/rasterization, then the pre matrix can just be pre-concated with the current matrix.
Definition at line 60 of file SkDrawBase.h.
|
inline |
Overwrite the target with the path's coverage (i.e. its mask). Will overwrite the entire device, so it need not be zero'd first.
Only device A8 is supported right now.
Definition at line 71 of file SkDrawBase.h.
void SkDrawBase::drawRect | ( | const SkRect & | prePaintRect, |
const SkPaint & | paint, | ||
const SkMatrix * | paintMatrix, | ||
const SkRect * | postPaintRect | ||
) | const |
Definition at line 159 of file SkDrawBase.cpp.
Definition at line 47 of file SkDrawBase.h.
Definition at line 286 of file SkDrawBase.cpp.
|
static |
Helper function that creates a mask from a path and an optional maskfilter. Note however, that the resulting mask will not have been actually filtered, that must be done afterwards (by calling filterMask). The maskfilter is provided solely to assist in computing the mask's bounds (if the mode requests that).
Definition at line 559 of file SkDrawBase.cpp.
|
inline |
Definition at line 162 of file SkDrawBase.h.
BlitterChooser* SkDrawBase::fBlitterChooser {nullptr} |
Definition at line 154 of file SkDrawBase.h.
const SkMatrix* SkDrawBase::fCTM {nullptr} |
Definition at line 155 of file SkDrawBase.h.
SkPixmap SkDrawBase::fDst |
Definition at line 153 of file SkDrawBase.h.
const SkSurfaceProps* SkDrawBase::fProps {nullptr} |
Definition at line 157 of file SkDrawBase.h.
const SkRasterClip* SkDrawBase::fRC {nullptr} |
Definition at line 156 of file SkDrawBase.h.