#include <dl_path.h>
Public Member Functions | |
| DlPath () | |
| DlPath (const SkPath &path) | |
| DlPath (const DlPath &path)=default | |
| DlPath (DlPath &&path)=default | |
| DlPath & | operator= (const DlPath &)=default |
| ~DlPath () override=default | |
| const SkPath & | GetSkPath () const |
| void | Dispatch (DlPathReceiver &receiver) const override |
| void | WillRenderSkPath () const |
| DlPath | WithOffset (const DlPoint offset) const |
| DlPath | WithFillType (DlPathFillType type) const |
| bool | IsEmpty () const |
| bool | IsRect (DlRect *rect=nullptr, bool *is_closed=nullptr) const |
| bool | IsOval (DlRect *bounds=nullptr) const |
| bool | IsLine (DlPoint *start=nullptr, DlPoint *end=nullptr) const |
| bool | IsRoundRect (DlRoundRect *rrect=nullptr) const |
| bool | Contains (const DlPoint point) const |
| DlRect | GetBounds () const override |
| DlPathFillType | GetFillType () const override |
| bool | operator== (const DlPath &other) const |
| bool | IsVolatile () const |
| bool | IsConvex () const override |
| DlPath | operator+ (const DlPath &other) const |
Public Member Functions inherited from impeller::PathSource | |
| virtual | ~PathSource ()=default |
Static Public Member Functions | |
| static DlPath | MakeRect (const DlRect &rect) |
| static DlPath | MakeRectLTRB (DlScalar left, DlScalar top, DlScalar right, DlScalar bottom) |
| static DlPath | MakeRectXYWH (DlScalar x, DlScalar y, DlScalar width, DlScalar height) |
| static DlPath | MakeOval (const DlRect &bounds) |
| static DlPath | MakeOvalLTRB (DlScalar left, DlScalar top, DlScalar right, DlScalar bottom) |
| static DlPath | MakeCircle (const DlPoint center, DlScalar radius) |
| static DlPath | MakeRoundRect (const DlRoundRect &rrect) |
| static DlPath | MakeRoundRectXY (const DlRect &rect, DlScalar x_radius, DlScalar y_radius, bool counter_clock_wise=false) |
| static DlPath | MakeRoundSuperellipse (const DlRoundSuperellipse &rse) |
| static DlPath | MakeLine (const DlPoint a, const DlPoint b) |
| static DlPath | MakePoly (const DlPoint pts[], int count, bool close, DlPathFillType fill_type=DlPathFillType::kNonZero) |
| static DlPath | MakeArc (const DlRect &bounds, DlDegrees start, DlDegrees sweep, bool use_center) |
Static Public Attributes | |
| static constexpr uint32_t | kMaxVolatileUses = 2 |
|
inline |
Definition at line 59 of file dl_path.h.
References flutter::Data().
Referenced by MakeArc(), MakeCircle(), MakeLine(), MakeOval(), MakeOvalLTRB(), MakePoly(), MakeRect(), MakeRectLTRB(), MakeRectXYWH(), MakeRoundRect(), MakeRoundRectXY(), operator+(), WithFillType(), and WithOffset().
|
inlineexplicit |
Definition at line 60 of file dl_path.h.
References flutter::Data().
|
default |
|
default |
|
overridedefault |
References flutter::Data().
| bool flutter::DlPath::Contains | ( | const DlPoint | point | ) | const |
Definition at line 237 of file dl_path.cc.
References GetSkPath(), impeller::TPoint< T >::x, and impeller::TPoint< T >::y.
|
overridevirtual |
Implements impeller::PathSource.
Definition at line 120 of file dl_path.cc.
References impeller::PathReceiver::Close(), impeller::PathReceiver::ConicTo(), impeller::PathReceiver::CubicTo(), flutter::data, impeller::PathReceiver::LineTo(), impeller::PathReceiver::MoveTo(), flutter::path, points, impeller::PathReceiver::QuadTo(), and flutter::ToDlPoint().
Referenced by flutter::ComplexityCalculatorHelper::CalculatePathComplexity().
|
overridevirtual |
Implements impeller::PathSource.
Definition at line 245 of file dl_path.cc.
References GetSkPath(), and flutter::ToDlRect().
Referenced by flutter::ClipPathLayer::clip_shape_bounds(), flutter::testing::MockLayer::Diff(), flutter::testing::MockLayer::Preroll(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), and flutter::testing::TEST_F().
|
overridevirtual |
Implements impeller::PathSource.
Definition at line 241 of file dl_path.cc.
References GetSkPath().
Referenced by flutter::testing::TEST(), flutter::testing::TEST(), and flutter::testing::TEST().
| const SkPath & flutter::DlPath::GetSkPath | ( | ) | const |
Definition at line 116 of file dl_path.cc.
Referenced by flutter::CanvasPath::addRSuperellipse(), Contains(), GetBounds(), GetFillType(), IsEmpty(), IsLine(), IsOval(), IsRect(), IsRoundRect(), IsVolatile(), operator+(), operator==(), flutter::testing::CanvasCompareTester::RenderWithClips(), flutter::testing::TEST(), and flutter::testing::TEST_F().
|
overridevirtual |
Implements impeller::PathSource.
Definition at line 257 of file dl_path.cc.
Referenced by flutter::testing::TEST().
| bool flutter::DlPath::IsEmpty | ( | ) | const |
Definition at line 206 of file dl_path.cc.
References GetSkPath().
Referenced by flutter::testing::TEST(), and flutter::testing::TEST().
Definition at line 218 of file dl_path.cc.
References end, GetSkPath(), start, and flutter::ToDlPoint().
| bool flutter::DlPath::IsOval | ( | DlRect * | bounds = nullptr | ) | const |
Definition at line 214 of file dl_path.cc.
References GetSkPath(), and flutter::ToSkRect().
Referenced by flutter::testing::TEST(), and flutter::testing::TEST_F().
| bool flutter::DlPath::IsRect | ( | DlRect * | rect = nullptr, |
| bool * | is_closed = nullptr |
||
| ) | const |
Definition at line 210 of file dl_path.cc.
References GetSkPath(), and flutter::ToSkRect().
Referenced by flutter::testing::TEST(), and flutter::testing::TEST_F().
| bool flutter::DlPath::IsRoundRect | ( | DlRoundRect * | rrect = nullptr | ) | const |
Definition at line 228 of file dl_path.cc.
References GetSkPath(), and flutter::ToDlRoundRect().
Referenced by flutter::testing::TEST(), flutter::testing::TEST_F(), and flutter::testing::TEST_F().
| bool flutter::DlPath::IsVolatile | ( | ) | const |
Definition at line 253 of file dl_path.cc.
References GetSkPath().
Referenced by flutter::testing::TEST(), and flutter::testing::TEST_F().
|
static |
Definition at line 101 of file dl_path.cc.
References impeller::Degrees::degrees, DlPath(), impeller::TRect< T >::GetCenter(), flutter::path, start, flutter::ToSkPoint(), flutter::ToSkRect(), and use_center.
Referenced by impeller::testing::MaskBlurVariantTest(), impeller::testing::TEST_P(), and impeller::testing::TEST_P().
Definition at line 68 of file dl_path.cc.
References DlPath().
Referenced by flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), and impeller::testing::TEST_P().
Definition at line 89 of file dl_path.cc.
References DlPath(), and flutter::ToSkPoint().
Referenced by impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), and impeller::testing::TEST_P().
Definition at line 57 of file dl_path.cc.
References DlPath(), and flutter::ToSkRect().
Referenced by flutter::testing::TEST(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), and flutter::testing::TEST_F().
|
static |
Definition at line 61 of file dl_path.cc.
References DlPath().
Referenced by flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), and flutter::testing::TEST_F().
|
static |
Definition at line 93 of file dl_path.cc.
References DlPath(), and flutter::ToSkPoints().
Referenced by impeller::testing::TEST_P().
Definition at line 39 of file dl_path.cc.
References DlPath(), and flutter::ToSkRect().
Referenced by flutter::testing::ReadbackResult(), flutter::testing::TEST(), impeller::testing::TEST(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), and impeller::testing::TEST_P().
|
static |
Definition at line 43 of file dl_path.cc.
References DlPath().
Referenced by flutter::testing::MockRasterCache::AddMockLayer(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), and flutter::testing::TEST_F().
|
static |
Definition at line 50 of file dl_path.cc.
References DlPath(), height, width, x, and y.
Referenced by flutter::testing::MockRasterCache::AddMockPicture(), flutter::testing::TEST_F(), and impeller::testing::TEST_P().
|
static |
Definition at line 72 of file dl_path.cc.
References DlPath(), and flutter::ToSkRRect().
Referenced by flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), impeller::testing::TEST_P(), and impeller::testing::TEST_P().
|
static |
Definition at line 76 of file dl_path.cc.
References DlPath(), and flutter::ToSkRect().
Referenced by flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), impeller::testing::TEST_P(), and impeller::testing::TEST_P().
|
static |
Definition at line 85 of file dl_path.cc.
References flutter::DlPathBuilder::AddRoundSuperellipse(), and flutter::DlPathBuilder::TakePath().
Referenced by impeller::testing::TEST_P().
Definition at line 261 of file dl_path.cc.
References DlPath(), GetSkPath(), and flutter::path.
| bool flutter::DlPath::operator== | ( | const DlPath & | other | ) | const |
Definition at line 249 of file dl_path.cc.
References GetSkPath().
| void flutter::DlPath::WillRenderSkPath | ( | ) | const |
Intent to render an SkPath multiple times will make the path non-volatile to enable caching in Skia. Calling this method before every rendering call that uses the SkPath will count down the uses and eventually reset the volatile flag.
Definition at line 174 of file dl_path.cc.
References kMaxVolatileUses.
Referenced by flutter::ClipPathLayer::ApplyClip(), and flutter::testing::TEST().
| DlPath flutter::DlPath::WithFillType | ( | DlPathFillType | type | ) | const |
Definition at line 196 of file dl_path.cc.
References DlPath(), flutter::path, and type.
Referenced by flutter::testing::TEST_F().
Definition at line 184 of file dl_path.cc.
References DlPath(), impeller::TPoint< T >::IsFinite(), impeller::TPoint< T >::IsZero(), flutter::path, impeller::TPoint< T >::x, and impeller::TPoint< T >::y.
|
staticconstexpr |
Definition at line 21 of file dl_path.h.
Referenced by flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), and WillRenderSkPath().