48 static constexpr float kIncrementAlpha[] = {
49 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
50 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
51 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
52 0.0f, 0.0f, 0.0f, 0.0f, 1.0f/255,
65 fOverdrawCanvas{overdrawCanvas},
66 fPainter{props, kN32_SkColorType, nullptr} {}
69 for (
auto [glyph,
pos] : accepted) {
73 fOverdrawCanvas->save();
74 fOverdrawCanvas->resetMatrix();
76 fOverdrawCanvas->restore();
83 void onDrawGlyphRunList(
SkCanvas* canvas,
87 fPainter.drawForBitmapDevice(
88 canvas,
this, glyphRunList,
paint, fOverdrawCanvas->getTotalMatrix());
100 auto glyphRunList =
b.blobToGlyphRunList(*blob, {
x,
y});
108 TextDevice
device{
this, props};
110 device.drawGlyphRunList(
this, glyphRunList,
paint);
116 fList[0]->onDrawPatch(cubics,
colors, texCoords, blendMode, fPaint);
120 if (0 ==
paint.getColor() && !
paint.getColorFilter() && !
paint.getShader()) {
123 fList[0]->onDrawPaint(this->overdrawPaint(
paint));
128 fList[0]->onDrawBehind(this->overdrawPaint(
paint));
150 fList[0]->onDrawDRRect(outer, inner, this->overdrawPaint(
paint));
164 fList[0]->onDrawVerticesObject(vertices, blendMode, this->overdrawPaint(
paint));
174 storage = this->overdrawPaint(*
paint);
198 Lattice latticePlusBounds = lattice;
199 if (!latticePlusBounds.
fBounds) {
208 while (iter.
next(&ignored, &iterDst)) {
209 fList[0]->onDrawRect(iterDst, fPaint);
249 if (
set[
i].fMatrixIndex >= 0) {
253 if (
set[
i].fHasClip) {
257 fList[0]->onDrawRect(
set[
i].fDstRect, fPaint);
259 if (
set[
i].fMatrixIndex >= 0) {
static const int points[]
static SkPath clip(const SkPath &path, const SkHalfPlane &plane)
bool getProps(SkSurfaceProps *props) const
friend class SkOverdrawCanvas
SkMatrix getTotalMatrix() const
static sk_sp< SkColorFilter > Matrix(const SkColorMatrix &)
void draw(SkCanvas *, const SkMatrix *=nullptr)
bool next(SkIRect *src, SkRect *dst, bool *isFixedColor=nullptr, SkColor *fixedColor=nullptr)
static bool Valid(int imageWidth, int imageHeight, const SkCanvas::Lattice &lattice)
virtual void addCanvas(SkCanvas *)
SkTDArray< SkCanvas * > fList
void onDrawImage2(const SkImage *, SkScalar, SkScalar, const SkSamplingOptions &, const SkPaint *) override
void onDrawTextBlob(const SkTextBlob *, SkScalar, SkScalar, const SkPaint &) override
void onDrawAnnotation(const SkRect &, const char key[], SkData *value) override
void onDrawImageRect2(const SkImage *, const SkRect &, const SkRect &, const SkSamplingOptions &, const SkPaint *, SrcRectConstraint) override
void onDrawImageLattice2(const SkImage *, const Lattice &, const SkRect &, SkFilterMode, const SkPaint *) override
void onDrawOval(const SkRect &, const SkPaint &) override
void onDrawPoints(PointMode, size_t, const SkPoint[], const SkPaint &) override
void onDrawPath(const SkPath &, const SkPaint &) override
void onDrawRRect(const SkRRect &, const SkPaint &) override
void onDrawPatch(const SkPoint[12], const SkColor[4], const SkPoint[4], SkBlendMode, const SkPaint &) override
void onDrawShadowRec(const SkPath &, const SkDrawShadowRec &) override
void onDrawEdgeAAImageSet2(const ImageSetEntry[], int count, const SkPoint[], const SkMatrix[], const SkSamplingOptions &, const SkPaint *, SrcRectConstraint) override
void onDrawVerticesObject(const SkVertices *, SkBlendMode, const SkPaint &) override
void onDrawGlyphRunList(const sktext::GlyphRunList &glyphRunList, const SkPaint &paint) override
void onDrawRegion(const SkRegion &, const SkPaint &) override
void onDrawEdgeAAQuad(const SkRect &, const SkPoint[4], SkCanvas::QuadAAFlags, const SkColor4f &, SkBlendMode) override
void onDrawArc(const SkRect &, SkScalar, SkScalar, bool, const SkPaint &) override
void onDrawPaint(const SkPaint &) override
void onDrawRect(const SkRect &, const SkPaint &) override
void onDrawDrawable(SkDrawable *, const SkMatrix *) override
void onDrawPicture(const SkPicture *, const SkMatrix *, const SkPaint *) override
void onDrawDRRect(const SkRRect &, const SkRRect &, const SkPaint &) override
void onDrawBehind(const SkPaint &paint) override
void onDrawAtlas2(const SkImage *, const SkRSXform[], const SkRect[], const SkColor[], int, SkBlendMode, const SkSamplingOptions &, const SkRect *, const SkPaint *) override
void setStyle(Style style)
void setAntiAlias(bool aa)
void setBlendMode(SkBlendMode mode)
void setColorFilter(sk_sp< SkColorFilter > colorFilter)
void setStrokeWidth(SkScalar width)
static SkPath Polygon(const SkPoint pts[], int count, bool isClosed, SkPathFillType=SkPathFillType::kWinding, bool isVolatile=false)
void GetLocalBounds(const SkPath &path, const SkDrawShadowRec &rec, const SkMatrix &ctm, SkRect *bounds)
unsigned useCenter Optional< SkMatrix > matrix
Optional< SkRect > bounds
PODArray< SkPoint > dstClips
sk_sp< const SkImage > image
ClipOpAndAA opAA SkRegion region
sk_sp< SkBlender > blender SkRect rect
PODArray< SkMatrix > preViewMatrices
PODArray< SkColor > colors
SkSamplingOptions sampling
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive mode
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not set
const SkIRect * fBounds
source bounds to draw from
static constexpr SkIRect MakeWH(int32_t w, int32_t h)
static SkRect Make(const SkISize &size)
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)