Flutter Engine
The Flutter Engine
|
#include <mock_canvas.h>
Classes | |
struct | ClipPathData |
struct | ClipRectData |
struct | ClipRRectData |
struct | ConcatMatrixData |
struct | DrawCall |
struct | DrawDisplayListData |
struct | DrawImageData |
struct | DrawImageDataNoPaint |
struct | DrawPaintData |
struct | DrawPathData |
struct | DrawRectData |
struct | DrawShadowData |
struct | DrawTextData |
struct | RestoreData |
struct | SaveData |
struct | SaveLayerData |
struct | SetMatrixData |
Public Types | |
enum | ClipEdgeStyle { kHardClipEdgeStyle , kSoftClipEdgeStyle } |
using | DrawCallData = std::variant< SaveData, SaveLayerData, RestoreData, ConcatMatrixData, SetMatrixData, DrawRectData, DrawPathData, DrawTextData, DrawImageDataNoPaint, DrawImageData, DrawDisplayListData, DrawShadowData, ClipRectData, ClipRRectData, ClipPathData, DrawPaintData > |
Public Types inherited from flutter::DlCanvas | |
enum class | ClipOp { kDifference , kIntersect } |
enum class | PointMode { kPoints , kLines , kPolygon } |
enum class | SrcRectConstraint { kStrict , kFast } |
Public Member Functions | |
MockCanvas () | |
MockCanvas (int width, int height) | |
~MockCanvas () | |
const std::vector< DrawCall > & | draw_calls () const |
void | reset_draw_calls () |
SkISize | GetBaseLayerSize () const override |
SkImageInfo | GetImageInfo () const override |
void | Save () override |
void | SaveLayer (const SkRect *bounds, const DlPaint *paint=nullptr, const DlImageFilter *backdrop=nullptr) override |
void | Restore () override |
int | GetSaveCount () const |
void | RestoreToCount (int restore_count) |
void | Transform2DAffine (SkScalar mxx, SkScalar mxy, SkScalar mxt, SkScalar myx, SkScalar myy, SkScalar myt) override |
void | TransformFullPerspective (SkScalar mxx, SkScalar mxy, SkScalar mxz, SkScalar mxt, SkScalar myx, SkScalar myy, SkScalar myz, SkScalar myt, SkScalar mzx, SkScalar mzy, SkScalar mzz, SkScalar mzt, SkScalar mwx, SkScalar mwy, SkScalar mwz, SkScalar mwt) override |
void | Translate (SkScalar tx, SkScalar ty) override |
void | Scale (SkScalar sx, SkScalar sy) override |
void | Rotate (SkScalar degrees) override |
void | Skew (SkScalar sx, SkScalar sy) override |
void | TransformReset () override |
void | Transform (const SkMatrix *matrix) override |
void | Transform (const SkM44 *matrix44) override |
void | SetTransform (const SkMatrix *matrix) override |
void | SetTransform (const SkM44 *matrix44) override |
SkM44 | GetTransformFullPerspective () const override |
SkMatrix | GetTransform () const override |
void | ClipRect (const SkRect &rect, ClipOp clip_op, bool is_aa) override |
void | ClipRRect (const SkRRect &rrect, ClipOp clip_op, bool is_aa) override |
void | ClipPath (const SkPath &path, ClipOp clip_op, bool is_aa) override |
SkRect | GetDestinationClipBounds () const override |
SkRect | GetLocalClipBounds () const override |
bool | QuickReject (const SkRect &bounds) const override |
void | DrawPaint (const DlPaint &paint) override |
void | DrawColor (DlColor color, DlBlendMode mode) override |
void | DrawLine (const SkPoint &p0, const SkPoint &p1, const DlPaint &paint) override |
void | DrawRect (const SkRect &rect, const DlPaint &paint) override |
void | DrawOval (const SkRect &bounds, const DlPaint &paint) override |
void | DrawCircle (const SkPoint ¢er, SkScalar radius, const DlPaint &paint) override |
void | DrawRRect (const SkRRect &rrect, const DlPaint &paint) override |
void | DrawDRRect (const SkRRect &outer, const SkRRect &inner, const DlPaint &paint) override |
void | DrawPath (const SkPath &path, const DlPaint &paint) override |
void | DrawArc (const SkRect &bounds, SkScalar start, SkScalar sweep, bool useCenter, const DlPaint &paint) override |
void | DrawPoints (PointMode mode, uint32_t count, const SkPoint pts[], const DlPaint &paint) override |
void | DrawVertices (const DlVertices *vertices, DlBlendMode mode, const DlPaint &paint) override |
void | DrawImage (const sk_sp< DlImage > &image, const SkPoint point, DlImageSampling sampling, const DlPaint *paint=nullptr) override |
void | DrawImageRect (const sk_sp< DlImage > &image, const SkRect &src, const SkRect &dst, DlImageSampling sampling, const DlPaint *paint=nullptr, SrcRectConstraint constraint=SrcRectConstraint::kFast) override |
void | DrawImageNine (const sk_sp< DlImage > &image, const SkIRect ¢er, const SkRect &dst, DlFilterMode filter, const DlPaint *paint=nullptr) override |
void | DrawAtlas (const sk_sp< DlImage > &atlas, const SkRSXform xform[], const SkRect tex[], const DlColor colors[], int count, DlBlendMode mode, DlImageSampling sampling, const SkRect *cullRect, const DlPaint *paint=nullptr) override |
void | DrawDisplayList (const sk_sp< DisplayList > display_list, SkScalar opacity) override |
void | DrawTextBlob (const sk_sp< SkTextBlob > &blob, SkScalar x, SkScalar y, const DlPaint &paint) override |
void | DrawTextFrame (const std::shared_ptr< impeller::TextFrame > &text_frame, SkScalar x, SkScalar y, const DlPaint &paint) override |
void | DrawShadow (const SkPath &path, const DlColor color, const SkScalar elevation, bool transparent_occluder, SkScalar dpr) override |
void | Flush () override |
virtual void | SetTransform (const SkMatrix *matrix)=0 |
virtual void | SetTransform (const SkM44 *matrix44)=0 |
virtual void | SetTransform (const SkMatrix &matrix) |
virtual void | SetTransform (const SkM44 &matrix44) |
virtual void | Transform (const SkMatrix *matrix)=0 |
virtual void | Transform (const SkM44 *matrix44)=0 |
void | Transform (const SkMatrix &matrix) |
void | Transform (const SkM44 &matrix44) |
Public Member Functions inherited from flutter::DlCanvas | |
virtual | ~DlCanvas ()=default |
void | Transform (const SkMatrix &matrix) |
void | Transform (const SkM44 &matrix44) |
void | Clear (DlColor color) |
void | DrawVertices (const std::shared_ptr< const DlVertices > &vertices, DlBlendMode mode, const DlPaint &paint) |
virtual void | DrawImageRect (const sk_sp< DlImage > &image, const SkIRect &src, const SkRect &dst, DlImageSampling sampling, const DlPaint *paint=nullptr, SrcRectConstraint constraint=SrcRectConstraint::kFast) |
void | DrawImageRect (const sk_sp< DlImage > &image, const SkRect &dst, DlImageSampling sampling, const DlPaint *paint=nullptr, SrcRectConstraint constraint=SrcRectConstraint::kFast) |
Additional Inherited Members | |
Static Public Member Functions inherited from flutter::DlCanvas | |
static SkRect | ComputeShadowBounds (const SkPath &path, float elevation, SkScalar dpr, const SkMatrix &ctm) |
Static Public Attributes inherited from flutter::DlCanvas | |
static constexpr SkScalar | kShadowLightHeight = 600 |
static constexpr SkScalar | kShadowLightRadius = 800 |
Definition at line 37 of file mock_canvas.h.
Definition at line 135 of file mock_canvas.h.
Enumerator | |
---|---|
kHardClipEdgeStyle | |
kSoftClipEdgeStyle |
Definition at line 39 of file mock_canvas.h.
flutter::testing::MockCanvas::MockCanvas | ( | ) |
Definition at line 19 of file mock_canvas.cc.
Definition at line 22 of file mock_canvas.cc.
flutter::testing::MockCanvas::~MockCanvas | ( | ) |
Definition at line 26 of file mock_canvas.cc.
|
overridevirtual |
Implements flutter::DlCanvas.
Definition at line 224 of file mock_canvas.cc.
|
overridevirtual |
Implements flutter::DlCanvas.
Definition at line 210 of file mock_canvas.cc.
|
overridevirtual |
Implements flutter::DlCanvas.
Definition at line 217 of file mock_canvas.cc.
|
inline |
Definition at line 162 of file mock_canvas.h.
|
overridevirtual |
Implements flutter::DlCanvas.
Definition at line 278 of file mock_canvas.cc.
|
overridevirtual |
Implements flutter::DlCanvas.
Definition at line 311 of file mock_canvas.cc.
|
overridevirtual |
Implements flutter::DlCanvas.
Definition at line 272 of file mock_canvas.cc.
|
overridevirtual |
Implements flutter::DlCanvas.
Definition at line 251 of file mock_canvas.cc.
|
overridevirtual |
Implements flutter::DlCanvas.
Definition at line 204 of file mock_canvas.cc.
|
overridevirtual |
Implements flutter::DlCanvas.
Definition at line 243 of file mock_canvas.cc.
|
overridevirtual |
Implements flutter::DlCanvas.
Definition at line 189 of file mock_canvas.cc.
|
overridevirtual |
Implements flutter::DlCanvas.
Definition at line 299 of file mock_canvas.cc.
|
overridevirtual |
Implements flutter::DlCanvas.
Definition at line 290 of file mock_canvas.cc.
|
overridevirtual |
Implements flutter::DlCanvas.
Definition at line 255 of file mock_canvas.cc.
|
overridevirtual |
Implements flutter::DlCanvas.
Definition at line 268 of file mock_canvas.cc.
|
overridevirtual |
Implements flutter::DlCanvas.
Definition at line 247 of file mock_canvas.cc.
|
overridevirtual |
Implements flutter::DlCanvas.
Definition at line 175 of file mock_canvas.cc.
|
overridevirtual |
Implements flutter::DlCanvas.
Definition at line 261 of file mock_canvas.cc.
|
overridevirtual |
Implements flutter::DlCanvas.
Definition at line 171 of file mock_canvas.cc.
|
overridevirtual |
Implements flutter::DlCanvas.
Definition at line 286 of file mock_canvas.cc.
|
overridevirtual |
Implements flutter::DlCanvas.
Definition at line 179 of file mock_canvas.cc.
|
overridevirtual |
Implements flutter::DlCanvas.
Definition at line 142 of file mock_canvas.cc.
|
overridevirtual |
Implements flutter::DlCanvas.
Definition at line 163 of file mock_canvas.cc.
|
overridevirtual |
Implements flutter::DlCanvas.
Definition at line 307 of file mock_canvas.cc.
|
overridevirtual |
Implements flutter::DlCanvas.
Definition at line 323 of file mock_canvas.cc.
|
overridevirtual |
Implements flutter::DlCanvas.
Definition at line 30 of file mock_canvas.cc.
|
overridevirtual |
Conservative estimate of the bounds of all outstanding clip operations measured in the coordinate space within which this DisplayList will be rendered.
Implements flutter::DlCanvas.
Definition at line 231 of file mock_canvas.cc.
|
overridevirtual |
Implements flutter::DlCanvas.
Definition at line 34 of file mock_canvas.cc.
|
overridevirtual |
Conservative estimate of the bounds of all outstanding clip operations transformed into the local coordinate space in which currently recorded rendering operations are interpreted.
Implements flutter::DlCanvas.
Definition at line 235 of file mock_canvas.cc.
|
inlinevirtual |
Implements flutter::DlCanvas.
Definition at line 173 of file mock_canvas.h.
|
overridevirtual |
Returns the 3x3 partial perspective transform representing all transform operations executed so far in this DisplayList within the enclosing save stack.
Implements flutter::DlCanvas.
Definition at line 138 of file mock_canvas.cc.
|
overridevirtual |
Returns the 4x4 full perspective transform representing all transform operations executed so far in this DisplayList within the enclosing save stack.
Implements flutter::DlCanvas.
Definition at line 134 of file mock_canvas.cc.
|
overridevirtual |
Return true iff the supplied bounds are easily shown to be outside of the current clip bounds. This method may conservatively return false if it cannot make the determination.
Implements flutter::DlCanvas.
Definition at line 239 of file mock_canvas.cc.
|
inline |
Definition at line 163 of file mock_canvas.h.
|
overridevirtual |
Implements flutter::DlCanvas.
Definition at line 60 of file mock_canvas.cc.
|
inlinevirtual |
Implements flutter::DlCanvas.
Definition at line 174 of file mock_canvas.h.
|
overridevirtual |
Implements flutter::DlCanvas.
Definition at line 126 of file mock_canvas.cc.
|
overridevirtual |
Implements flutter::DlCanvas.
Definition at line 39 of file mock_canvas.cc.
|
overridevirtual |
Implements flutter::DlCanvas.
Definition at line 46 of file mock_canvas.cc.
|
inlinevirtual |
Reimplemented from flutter::DlCanvas.
Definition at line 93 of file dl_canvas.h.
|
overridevirtual |
Implements flutter::DlCanvas.
Definition at line 108 of file mock_canvas.cc.
|
virtual |
Implements flutter::DlCanvas.
|
inlinevirtual |
Reimplemented from flutter::DlCanvas.
Definition at line 92 of file dl_canvas.h.
|
overridevirtual |
Implements flutter::DlCanvas.
Definition at line 102 of file mock_canvas.cc.
|
virtual |
Implements flutter::DlCanvas.
|
inline |
Definition at line 89 of file dl_canvas.h.
|
overridevirtual |
Implements flutter::DlCanvas.
Definition at line 97 of file mock_canvas.cc.
|
virtual |
Implements flutter::DlCanvas.
|
inline |
Definition at line 88 of file dl_canvas.h.
|
overridevirtual |
Implements flutter::DlCanvas.
Definition at line 91 of file mock_canvas.cc.
|
virtual |
Implements flutter::DlCanvas.
|
overridevirtual |
Implements flutter::DlCanvas.
Definition at line 72 of file mock_canvas.cc.
|
overridevirtual |
Implements flutter::DlCanvas.
Definition at line 78 of file mock_canvas.cc.
|
overridevirtual |
Implements flutter::DlCanvas.
Definition at line 113 of file mock_canvas.cc.