Flutter Engine
The Flutter Engine
Classes | Enumerations | Functions | Variables
SkRecords Namespace Reference

Classes

class  Draw
 
class  FillBounds
 
struct  Greedy
 
class  Is
 
class  IsDraw
 
class  IsSingleDraw
 
struct  Not
 
class  Optional
 
struct  Or
 
struct  Or< First >
 
class  Pattern
 
class  Pattern< First, Rest... >
 
class  Pattern<>
 
class  PODArray
 
struct  PreCachedPath
 
struct  TypedMatrix
 

Enumerations

enum  Type { SK_RECORD_TYPES =(ENUM) }
 
enum  Tags { kHasImage_Tag = 2 , kHasText_Tag = 4 , kDrawWithPaint_Tag = kDraw_Tag | kHasPaint_Tag }
 

Functions

 DRAW (SaveLayer, saveLayer(SkCanvasPriv::ScaledBackdropLayer(r.bounds, r.paint, r.backdrop.get(), r.backdropScale, r.saveLayerFlags, SkCanvas::FilterSpan{const_cast< sk_sp< SkImageFilter > * >(r.filters.data()), r.filters.size()}))) template<> void Draw
 
 DRAW (SetMatrix, setMatrix(fInitialCTM.asM33() *r.matrix)) DRAW(ClipPath
 
 clipPath (r.path, r.opAA.op(), r.opAA.aa())) DRAW(ClipRRect
 
 clipRRect (r.rrect, r.opAA.op(), r.opAA.aa())) DRAW(ClipRect
 
 clipRect (r.rect, r.opAA.op(), r.opAA.aa())) template<> void Draw
 
 DRAW (DrawImage, drawImage(r.image.get(), r.left, r.top, r.sampling, r.paint)) template<> void Draw
 
 DRAW (DrawImageRect, drawImageRect(r.image.get(), r.src, r.dst, r.sampling, r.paint, r.constraint)) DRAW(DrawPicture
 
 drawPicture (r.picture.get(), &r.matrix, r.paint)) DRAW(DrawTextBlob
 
 drawTextBlob (r.blob.get(), r.x, r.y, r.paint)) DRAW(DrawSlug
 
 drawSlug (r.slug.get(), r.paint)) DRAW(DrawAtlas
 
 drawAtlas (r.atlas.get(), r.xforms, r.texs, r.colors, r.count, r.mode, r.sampling, r.cull, r.paint)) DRAW(DrawAnnotation
 
 drawAnnotation (r.rect, r.key.c_str(), r.value.get())) DRAW(DrawEdgeAAQuad
 
 experimental_DrawEdgeAAQuad (r.rect, r.clip, r.aa, r.color, r.mode)) DRAW(DrawEdgeAAImageSet
 
 experimental_DrawEdgeAAImageSet (r.set.get(), r.count, r.dstClips, r.preViewMatrices, r.sampling, r.paint, r.constraint)) template<> void Draw
 
 RECORD (Restore, 0, TypedMatrix matrix) RECORD(SaveLayer
 
skia_private::AutoTArray< sk_sp< SkImageFilter > > filters RECORD (SaveBehind, 0, Optional< SkRect > subset) RECORD(SetMatrix
 
skia_private::AutoTArray< sk_sp< SkImageFilter > > filters TypedMatrix matrix RECORD (SetM44, 0, SkM44 matrix) RECORD(Concat
 
skia_private::AutoTArray< sk_sp< SkImageFilter > > filters TypedMatrix matrix TypedMatrix matrix RECORD (Concat44, 0, SkM44 matrix) RECORD(Translate
 
SkScalar dy RECORD (Scale, 0, SkScalar sx;SkScalar sy) struct ClipOpAndAA
 
 RECORD (ClipPath, 0, PreCachedPath path;ClipOpAndAA opAA) RECORD(ClipRRect
 
ClipOpAndAA opAA RECORD (ClipRect, 0, SkRect rect;ClipOpAndAA opAA) RECORD(ClipRegion
 
SkClipOp op RECORD (ClipShader, 0, sk_sp< SkShader > shader;SkClipOp op) RECORD(DrawArc
 
unsigned useCenter RECORD (DrawDRRect, kDraw_Tag|kHasPaint_Tag, SkPaint paint;SkRRect outer;SkRRect inner) RECORD(DrawDrawable
 
int32_t index RECORD (DrawImage, kDraw_Tag|kHasImage_Tag|kHasPaint_Tag, Optional< SkPaint > paint;sk_sp< const SkImage > image;SkScalar left;SkScalar top;SkSamplingOptions sampling) RECORD(DrawImageLattice
 
SkFilterMode filter RECORD (DrawImageRect, kDraw_Tag|kHasImage_Tag|kHasPaint_Tag, Optional< SkPaint > paint;sk_sp< const SkImage > image;SkRect src;SkRect dst;SkSamplingOptions sampling;SkCanvas::SrcRectConstraint constraint) RECORD(DrawOval
 
SkRect oval RECORD (DrawPaint, kDraw_Tag|kHasPaint_Tag, SkPaint paint) RECORD(DrawBehind
 
SkRect oval kDraw_Tag SkPaint paint RECORD (DrawPath, kDraw_Tag|kHasPaint_Tag, SkPaint paint;PreCachedPath path) RECORD(DrawPicture
 
TypedMatrix matrix RECORD (DrawPoints, kDraw_Tag|kHasPaint_Tag|kMultiDraw_Tag, SkPaint paint;SkCanvas::PointMode mode;unsigned count;PODArray< SkPoint > pts) RECORD(DrawRRect
 
SkRRect rrect RECORD (DrawRect, kDraw_Tag|kHasPaint_Tag, SkPaint paint;SkRect rect) RECORD(DrawRegion
 
SkRegion region RECORD (DrawTextBlob, kDraw_Tag|kHasText_Tag|kHasPaint_Tag, SkPaint paint;sk_sp< const SkTextBlob > blob;SkScalar x;SkScalar y) RECORD(DrawSlug
 
sk_sp< const sktext::gpu::Slug > slug RECORD (DrawPatch, kDraw_Tag|kHasPaint_Tag, SkPaint paint;PODArray< SkPoint > cubics;PODArray< SkColor > colors;PODArray< SkPoint > texCoords;SkBlendMode bmode) RECORD(DrawAtlas
 
Optional< SkRect > cull RECORD (DrawVertices, kDraw_Tag|kHasPaint_Tag|kMultiDraw_Tag, SkPaint paint;sk_sp< SkVertices > vertices;SkBlendMode bmode) RECORD(DrawMesh
 
sk_sp< SkBlender > blender RECORD (DrawShadowRec, kDraw_Tag, PreCachedPath path;SkDrawShadowRec rec) RECORD(DrawAnnotation
 
sk_sp< SkData > value RECORD (DrawEdgeAAQuad, kDraw_Tag, SkRect rect;PODArray< SkPoint > clip;SkCanvas::QuadAAFlags aa;SkColor4f color;SkBlendMode mode) RECORD(DrawEdgeAAImageSet
 

Variables

 kHasPaint_Tag = 8
 
Optional< SkRectbounds
 
Optional< SkPaintpaint
 
sk_sp< const SkImageFilterbackdrop
 
SkCanvas::SaveLayerFlags saveLayerFlags
 
SkScalar backdropScale
 
skia_private::AutoTArray< sk_sp< SkImageFilter > > filters TypedMatrix matrix TypedMatrix matrix SkScalar dx
 
SkRRect rrect
 
ClipOpAndAA opAA SkRegion region
 
SkRect oval
 
SkScalar startAngle
 
SkScalar sweepAngle
 
unsigned useCenter kDraw_Tag = 1
 
unsigned useCenter Optional< SkMatrixmatrix
 
SkRect worstCaseBounds
 
sk_sp< const SkImageimage
 
int xCount
 
PODArray< intxDivs
 
int yCount
 
PODArray< intyDivs
 
int flagCount
 
PODArray< SkCanvas::Lattice::RectTypeflags
 
PODArray< SkColorcolors
 
SkIRect src
 
SkRect dst
 
sk_sp< const SkPicturepicture
 
sk_sp< const sktext::gpu::Slug > slug kDraw_Tag kHasImage_Tag kHasPaint_Tag kMultiDraw_Tag = 16
 
sk_sp< const SkImageatlas
 
PODArray< SkRSXformxforms
 
PODArray< SkRecttexs
 
int count
 
SkBlendMode mode
 
SkSamplingOptions sampling
 
SkMesh mesh
 
sk_sp< SkBlender > blender SkRect rect
 
SkString key
 
skia_private::AutoTArray< SkCanvas::ImageSetEntryset
 
PODArray< SkPointdstClips
 
PODArray< SkMatrixpreViewMatrices
 

Enumeration Type Documentation

◆ Tags

Enumerator
kHasImage_Tag 
kHasText_Tag 
kDrawWithPaint_Tag 

Definition at line 158 of file SkRecords.h.

158 {
159 kDraw_Tag = 1, // May draw something (usually named DrawFoo).
160 kHasImage_Tag = 2, // Contains an SkImage or SkBitmap.
161 kHasText_Tag = 4, // Contains text.
162 kHasPaint_Tag = 8, // May have an SkPaint field, at least optionally.
163 kMultiDraw_Tag = 16, // Drawing operations that render multiple independent primitives.
164 // These draws are capable of blending with themselves.
165
167};
sk_sp< const sktext::gpu::Slug > slug kDraw_Tag kHasImage_Tag kHasPaint_Tag kMultiDraw_Tag
Definition: SkRecords.h:329
@ kHasImage_Tag
Definition: SkRecords.h:160
@ kDrawWithPaint_Tag
Definition: SkRecords.h:166
@ kHasText_Tag
Definition: SkRecords.h:161
unsigned useCenter kDraw_Tag
Definition: SkRecords.h:257

◆ Type

Enumerator
SK_RECORD_TYPES 

Definition at line 103 of file SkRecords.h.

#define SK_RECORD_TYPES(M)
Definition: SkRecords.h:56
#define ENUM(T)
Definition: SkRecords.h:102

Function Documentation

◆ clipPath()

SkRecords::clipPath ( r.  path,
r.opAA.  op(),
r.opAA.  aa() 
)

◆ clipRect()

SkRecords::clipRect ( r.  rect,
r.opAA.  op(),
r.opAA.  aa() 
)

Definition at line 125 of file SkRecordDraw.cpp.

129 {
131}
static void ResetClip(SkCanvas *canvas)
Definition: SkCanvasPriv.h:61

◆ clipRRect()

SkRecords::clipRRect ( r.  rrect,
r.opAA.  op(),
r.opAA.  aa() 
)

◆ DRAW() [1/4]

SkRecords::DRAW ( DrawImage  ,
drawImage(r.image.get(), r.left, r.top, r.sampling, r.paint  
)

Definition at line 135 of file SkRecordDraw.cpp.

137 {
138 SkCanvas::Lattice lattice;
139 lattice.fXCount = r.xCount;
140 lattice.fXDivs = r.xDivs;
141 lattice.fYCount = r.yCount;
142 lattice.fYDivs = r.yDivs;
143 lattice.fRectTypes = (0 == r.flagCount) ? nullptr : r.flags;
144 lattice.fColors = (0 == r.flagCount) ? nullptr : r.colors;
145 lattice.fBounds = &r.src;
146 fCanvas->drawImageLattice(r.image.get(), lattice, r.dst, r.filter, r.paint);
147}
int fYCount
number of y-coordinates
Definition: SkCanvas.h:1617
const SkIRect * fBounds
source bounds to draw from
Definition: SkCanvas.h:1618
const int * fYDivs
y-axis values dividing bitmap
Definition: SkCanvas.h:1614
int fXCount
number of x-coordinates
Definition: SkCanvas.h:1616
const RectType * fRectTypes
array of fill types
Definition: SkCanvas.h:1615
const SkColor * fColors
array of colors
Definition: SkCanvas.h:1619
const int * fXDivs
x-axis values dividing bitmap
Definition: SkCanvas.h:1613

◆ DRAW() [2/4]

SkRecords::DRAW ( DrawImageRect  ,
drawImageRect(r.image.get(), r.src, r.dst, r.sampling, r.paint, r.constraint)   
)

◆ DRAW() [3/4]

SkRecords::DRAW ( SaveLayer  ,
saveLayer(SkCanvasPriv::ScaledBackdropLayer( r.bounds, r.paint, r.backdrop.get(), r.backdropScale, r.saveLayerFlags, SkCanvas::FilterSpan{const_cast< sk_sp< SkImageFilter > * >(r.filters.data()), r.filters.size()}))   
)

Definition at line 98 of file SkRecordDraw.cpp.

105 {const_cast<sk_sp<SkImageFilter>*>(r.filters.data()),
106 r.filters.size()})))
107
108template <> void Draw::draw(const SaveBehind& r) {
109 SkCanvasPriv::SaveBehind(fCanvas, r.subset);
110}
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition: aaclip.cpp:27
static int SaveBehind(SkCanvas *canvas, const SkRect *subset)
Definition: SkCanvasPriv.h:53

◆ DRAW() [4/4]

SkRecords::DRAW ( SetMatrix  ,
setMatrix(fInitialCTM.asM33() *r.matrix)   
)

◆ drawAnnotation()

SkRecords::drawAnnotation ( r.  rect,
r.key.  c_str(),
r.value.  get() 
)

◆ drawAtlas()

SkRecords::drawAtlas ( r.atlas.  get(),
r.  xforms,
r.  texs,
r.  colors,
r.  count,
r.  mode,
r.  sampling,
r.  cull,
r.  paint 
)

◆ drawPicture()

SkRecords::drawPicture ( r.picture.  get(),
&r.  matrix,
r.  paint 
)

◆ drawSlug()

SkRecords::drawSlug ( r.slug.  get(),
r.  paint 
)

◆ drawTextBlob()

SkRecords::drawTextBlob ( r.blob.  get(),
r.  x,
r.  y,
r.  paint 
)

◆ experimental_DrawEdgeAAImageSet()

SkRecords::experimental_DrawEdgeAAImageSet ( r.set.  get(),
r.  count,
r.  dstClips,
r.  preViewMatrices,
r.  sampling,
r.  paint,
r.  constraint 
)

Definition at line 170 of file SkRecordDraw.cpp.

175 {
176 SkASSERT(r.index >= 0);
177 SkASSERT(r.index < fDrawableCount);
178 if (fDrawables) {
179 SkASSERT(nullptr == fDrawablePicts);
180 fCanvas->drawDrawable(fDrawables[r.index], r.matrix);
181 } else {
182 fCanvas->drawPicture(fDrawablePicts[r.index], r.matrix, nullptr);
183 }
184}
#define SkASSERT(cond)
Definition: SkAssert.h:116

◆ experimental_DrawEdgeAAQuad()

SkRecords::experimental_DrawEdgeAAQuad ( r.  rect,
r.  clip,
r.  aa,
r.  color,
r.  mode 
)

◆ RECORD() [1/20]

SkRecords::RECORD ( ClipPath  ,
,
PreCachedPath path;ClipOpAndAA  opAA 
)

◆ RECORD() [2/20]

ClipOpAndAA opAA SkRecords::RECORD ( ClipRect  ,
,
SkRect rect;ClipOpAndAA  opAA 
)

◆ RECORD() [3/20]

SkClipOp op SkRecords::RECORD ( ClipShader  ,
,
sk_sp< SkShader > shader;SkClipOp  op 
)

◆ RECORD() [4/20]

skia_private::AutoTArray< sk_sp< SkImageFilter > > filters TypedMatrix matrix TypedMatrix matrix SkRecords::RECORD ( Concat44  ,
,
SkM44  matrix 
)

◆ RECORD() [5/20]

unsigned useCenter SkRecords::RECORD ( DrawDRRect  ,
kDraw_Tag kHasPaint_Tag,
SkPaint paint;SkRRect outer;SkRRect  inner 
)

◆ RECORD() [6/20]

sk_sp< SkData > value SkRecords::RECORD ( DrawEdgeAAQuad  ,
kDraw_Tag  ,
SkRect rect;PODArray< SkPoint > clip;SkCanvas::QuadAAFlags aa;SkColor4f color;SkBlendMode  mode 
)

◆ RECORD() [7/20]

int32_t index SkRecords::RECORD ( DrawImage  ,
kDraw_Tag|kHasImage_Tag kHasPaint_Tag,
Optional< SkPaint > paint;sk_sp< const SkImage > image;SkScalar left;SkScalar top;SkSamplingOptions  sampling 
)

◆ RECORD() [8/20]

SkFilterMode filter SkRecords::RECORD ( DrawImageRect  ,
kDraw_Tag|kHasImage_Tag kHasPaint_Tag,
Optional< SkPaint > paint;sk_sp< const SkImage > image;SkRect src;SkRect dst;SkSamplingOptions sampling;SkCanvas::SrcRectConstraint  constraint 
)

◆ RECORD() [9/20]

SkRect oval SkRecords::RECORD ( DrawPaint  ,
kDraw_Tag kHasPaint_Tag,
SkPaint  paint 
)

◆ RECORD() [10/20]

sk_sp< const sktext::gpu::Slug > slug SkRecords::RECORD ( DrawPatch  ,
kDraw_Tag kHasPaint_Tag,
SkPaint paint;PODArray< SkPoint > cubics;PODArray< SkColor > colors;PODArray< SkPoint > texCoords;SkBlendMode  bmode 
)

◆ RECORD() [11/20]

SkRect oval kDraw_Tag SkPaint paint SkRecords::RECORD ( DrawPath  ,
kDraw_Tag kHasPaint_Tag,
SkPaint paint;PreCachedPath  path 
)

◆ RECORD() [12/20]

TypedMatrix matrix SkRecords::RECORD ( DrawPoints  ,
kDraw_Tag|kHasPaint_Tag kMultiDraw_Tag,
SkPaint paint;SkCanvas::PointMode mode;unsigned count;PODArray< SkPoint pts 
)

◆ RECORD() [13/20]

SkRRect rrect SkRecords::RECORD ( DrawRect  ,
kDraw_Tag kHasPaint_Tag,
SkPaint paint;SkRect  rect 
)

◆ RECORD() [14/20]

sk_sp< SkBlender > blender SkRecords::RECORD ( DrawShadowRec  ,
kDraw_Tag  ,
PreCachedPath path;SkDrawShadowRec  rec 
)

◆ RECORD() [15/20]

SkRegion region SkRecords::RECORD ( DrawTextBlob  ,
kDraw_Tag|kHasText_Tag kHasPaint_Tag,
SkPaint paint;sk_sp< const SkTextBlob > blob;SkScalar x;SkScalar  y 
)

◆ RECORD() [16/20]

Optional< SkRect > cull SkRecords::RECORD ( DrawVertices  ,
kDraw_Tag|kHasPaint_Tag kMultiDraw_Tag,
SkPaint paint;sk_sp< SkVertices > vertices;SkBlendMode  bmode 
)

◆ RECORD() [17/20]

SkRecords::RECORD ( Restore  ,
,
TypedMatrix  matrix 
)

◆ RECORD() [18/20]

skia_private::AutoTArray< sk_sp< SkImageFilter > > filters SkRecords::RECORD ( SaveBehind  ,
,
Optional< SkRect subset 
)

◆ RECORD() [19/20]

SkScalar dy SkRecords::RECORD ( Scale  ,
,
SkScalar sx;SkScalar  sy 
)

Definition at line 212 of file SkRecords.h.

216 {
217 ClipOpAndAA() {}
218 ClipOpAndAA(SkClipOp op, bool aa) : fOp(static_cast<unsigned>(op)), fAA(aa) {}
219
220 SkClipOp op() const { return static_cast<SkClipOp>(fOp); }
221 bool aa() const { return fAA != 0; }
222
223private:
224 unsigned fOp : 31; // This really only needs to be 3, but there's no win today to do so.
225 unsigned fAA : 1; // MSVC won't pack an enum with an bool, so we call this an unsigned.
226};
SkClipOp
Definition: SkClipOp.h:13

◆ RECORD() [20/20]

skia_private::AutoTArray< sk_sp< SkImageFilter > > filters TypedMatrix matrix SkRecords::RECORD ( SetM44  ,
,
SkM44  matrix 
)

Variable Documentation

◆ atlas

sk_sp<const SkImage> SkRecords::atlas

Definition at line 331 of file SkRecords.h.

◆ backdrop

sk_sp<const SkImageFilter> SkRecords::backdrop

Definition at line 191 of file SkRecords.h.

◆ backdropScale

SkScalar SkRecords::backdropScale

Definition at line 193 of file SkRecords.h.

◆ bounds

Optional<SkRect> SkRecords::bounds

Definition at line 189 of file SkRecords.h.

◆ colors

PODArray< SkColor > SkRecords::colors

Definition at line 276 of file SkRecords.h.

◆ count

int SkRecords::count

Definition at line 335 of file SkRecords.h.

◆ dst

SkRect SkRecords::dst

Definition at line 278 of file SkRecords.h.

◆ dstClips

PODArray<SkPoint> SkRecords::dstClips

Definition at line 364 of file SkRecords.h.

◆ dx

Definition at line 209 of file SkRecords.h.

◆ flagCount

int SkRecords::flagCount

Definition at line 274 of file SkRecords.h.

◆ flags

Definition at line 275 of file SkRecords.h.

◆ image

sk_sp<const SkImage> SkRecords::image

Definition at line 269 of file SkRecords.h.

◆ kDraw_Tag

SkRecords::kDraw_Tag = 1

Definition at line 257 of file SkRecords.h.

◆ key

SkString SkRecords::key

Definition at line 352 of file SkRecords.h.

◆ kHasPaint_Tag

SkRecords::kHasPaint_Tag = 8

Definition at line 188 of file SkRecords.h.

◆ kMultiDraw_Tag

SkRecords::kMultiDraw_Tag = 16

Definition at line 329 of file SkRecords.h.

◆ matrix

unsigned useCenter Optional<SkMatrix> SkRecords::matrix

Definition at line 258 of file SkRecords.h.

◆ mesh

SkMesh SkRecords::mesh

Definition at line 345 of file SkRecords.h.

◆ mode

SkBlendMode SkRecords::mode

Definition at line 336 of file SkRecords.h.

◆ oval

SkRect SkRecords::oval

Definition at line 249 of file SkRecords.h.

◆ paint

Definition at line 190 of file SkRecords.h.

◆ picture

sk_sp<const SkPicture> SkRecords::picture

Definition at line 299 of file SkRecords.h.

◆ preViewMatrices

PODArray<SkMatrix> SkRecords::preViewMatrices

Definition at line 365 of file SkRecords.h.

◆ rect

sk_sp< SkBlender > blender SkRect SkRecords::rect

Definition at line 351 of file SkRecords.h.

◆ region

ClipOpAndAA opAA SkRegion SkRecords::region

Definition at line 239 of file SkRecords.h.

◆ rrect

SkRRect SkRecords::rrect

Definition at line 233 of file SkRecords.h.

◆ sampling

SkSamplingOptions SkRecords::sampling

Definition at line 337 of file SkRecords.h.

◆ saveLayerFlags

SkCanvas::SaveLayerFlags SkRecords::saveLayerFlags

Definition at line 192 of file SkRecords.h.

◆ set

Definition at line 362 of file SkRecords.h.

◆ src

SkIRect SkRecords::src

Definition at line 277 of file SkRecords.h.

◆ startAngle

SkScalar SkRecords::startAngle

Definition at line 250 of file SkRecords.h.

◆ sweepAngle

SkScalar SkRecords::sweepAngle

Definition at line 251 of file SkRecords.h.

◆ texs

PODArray<SkRect> SkRecords::texs

Definition at line 333 of file SkRecords.h.

◆ worstCaseBounds

SkRect SkRecords::worstCaseBounds

Definition at line 259 of file SkRecords.h.

◆ xCount

int SkRecords::xCount

Definition at line 270 of file SkRecords.h.

◆ xDivs

PODArray<int> SkRecords::xDivs

Definition at line 271 of file SkRecords.h.

◆ xforms

PODArray<SkRSXform> SkRecords::xforms

Definition at line 332 of file SkRecords.h.

◆ yCount

int SkRecords::yCount

Definition at line 272 of file SkRecords.h.

◆ yDivs

PODArray<int> SkRecords::yDivs

Definition at line 273 of file SkRecords.h.