#include <dl_matrix_clip_tracker.h>
Public Member Functions | |
| DisplayListMatrixClipState (const DlRect &cull_rect, const DlMatrix &matrix=DlMatrix()) | |
| DisplayListMatrixClipState (const DisplayListMatrixClipState &other)=default | |
| void | resetDeviceCullRect (const DlRect &cull_rect) |
| void | resetLocalCullRect (const DlRect &cull_rect) |
| bool | using_4x4_matrix () const |
| bool | is_matrix_invertable () const |
| bool | has_perspective () const |
| const DlMatrix & | matrix () const |
| DlRect | GetLocalCullCoverage () const |
| DlRect | GetDeviceCullCoverage () const |
| bool | rect_covers_cull (const DlRect &content) const |
| bool | oval_covers_cull (const DlRect &content_bounds) const |
| bool | rrect_covers_cull (const DlRoundRect &content) const |
| bool | rsuperellipse_covers_cull (const DlRoundSuperellipse &content) const |
| bool | content_culled (const DlRect &content_bounds) const |
| bool | is_cull_rect_empty () const |
| void | translate (DlScalar tx, DlScalar ty) |
| void | scale (DlScalar sx, DlScalar sy) |
| void | skew (DlScalar skx, DlScalar sky) |
| void | rotate (DlRadians angle) |
| void | transform (const DlMatrix &matrix) |
| void | transform2DAffine (DlScalar mxx, DlScalar mxy, DlScalar mxt, DlScalar myx, DlScalar myy, DlScalar myt) |
| void | transformFullPerspective (DlScalar mxx, DlScalar mxy, DlScalar mxz, DlScalar mxt, DlScalar myx, DlScalar myy, DlScalar myz, DlScalar myt, DlScalar mzx, DlScalar mzy, DlScalar mzz, DlScalar mzt, DlScalar mwx, DlScalar mwy, DlScalar mwz, DlScalar mwt) |
| void | setTransform (const DlMatrix &matrix) |
| void | setIdentity () |
| bool | inverseTransform (const DisplayListMatrixClipState &other_tracker) |
| bool | mapRect (DlRect *rect) const |
| bool | mapRect (const DlRect &src, DlRect *mapped) const |
| bool | mapAndClipRect (DlRect *rect) const |
| Maps the rect by the current matrix and then clips it against the current cull rect, returning true if the result is non-empty. | |
| bool | mapAndClipRect (const DlRect &src, DlRect *mapped) const |
| void | clipRect (const DlRect &rect, DlClipOp op, bool is_aa) |
| void | clipOval (const DlRect &bounds, DlClipOp op, bool is_aa) |
| void | clipRRect (const DlRoundRect &rrect, DlClipOp op, bool is_aa) |
| void | clipRSuperellipse (const DlRoundSuperellipse &rse, DlClipOp op, bool is_aa) |
| void | clipPath (const DlPath &path, DlClipOp op, bool is_aa) |
Static Public Member Functions | |
| static bool | TransformedRectCoversBounds (const DlRect &local_rect, const DlMatrix &matrix, const DlRect &cull_bounds) |
| Checks if the local rect, when transformed by the matrix, completely covers the indicated culling bounds. | |
| static bool | TransformedOvalCoversBounds (const DlRect &local_oval_bounds, const DlMatrix &matrix, const DlRect &cull_bounds) |
| Checks if an oval defined by the local bounds, when transformed by the matrix, completely covers the indicated culling bounds. | |
| static bool | TransformedRRectCoversBounds (const DlRoundRect &local_rrect, const DlMatrix &matrix, const DlRect &cull_bounds) |
| Checks if the local round rect, when transformed by the matrix, completely covers the indicated culling bounds. | |
| static bool | TransformedRoundSuperellipseCoversBounds (const DlRoundSuperellipse &local_rse, const DlMatrix &matrix, const DlRect &cull_bounds) |
| Checks if the local round superellipse, when transformed by the matrix, completely covers the indicated culling bounds. | |
Definition at line 17 of file dl_matrix_clip_tracker.h.
|
explicit |
Definition at line 20 of file dl_matrix_clip_tracker.cc.
|
default |
| void flutter::DisplayListMatrixClipState::clipOval | ( | const DlRect & | bounds, |
| DlClipOp | op, | ||
| bool | is_aa | ||
| ) |
Definition at line 53 of file dl_matrix_clip_tracker.cc.
References impeller::TRect< T >::IsFinite(), flutter::kDifference, flutter::kIntersect, and oval_covers_cull().
Referenced by flutter::DisplayListBuilder::ClipOval(), clipRRect(), and clipRSuperellipse().
Definition at line 140 of file dl_matrix_clip_tracker.cc.
References clipRect(), flutter::kDifference, flutter::kIntersect, and flutter::path.
Referenced by flutter::DisplayListBuilder::ClipPath(), flutter::PrerollDelegate::clipPath(), and flutter::testing::TEST().
Definition at line 45 of file dl_matrix_clip_tracker.cc.
References impeller::TRect< T >::IsFinite().
Referenced by clipPath(), flutter::DisplayListBuilder::ClipRect(), flutter::PrerollDelegate::clipRect(), clipRRect(), clipRSuperellipse(), and flutter::testing::TEST().
| void flutter::DisplayListMatrixClipState::clipRRect | ( | const DlRoundRect & | rrect, |
| DlClipOp | op, | ||
| bool | is_aa | ||
| ) |
Definition at line 85 of file dl_matrix_clip_tracker.cc.
References clipOval(), clipRect(), impeller::RoundRect::GetBounds(), impeller::RoundRect::GetRadii(), impeller::RoundRect::IsOval(), impeller::RoundRect::IsRect(), flutter::kDifference, flutter::kIntersect, and rrect_covers_cull().
Referenced by flutter::DisplayListBuilder::ClipRoundRect(), flutter::PrerollDelegate::clipRRect(), and flutter::testing::TEST().
| void flutter::DisplayListMatrixClipState::clipRSuperellipse | ( | const DlRoundSuperellipse & | rse, |
| DlClipOp | op, | ||
| bool | is_aa | ||
| ) |
Definition at line 112 of file dl_matrix_clip_tracker.cc.
References clipOval(), clipRect(), impeller::RoundSuperellipse::GetBounds(), impeller::RoundSuperellipse::GetRadii(), impeller::RoundSuperellipse::IsOval(), impeller::RoundSuperellipse::IsRect(), flutter::kDifference, flutter::kIntersect, and rsuperellipse_covers_cull().
Referenced by flutter::DisplayListBuilder::ClipRoundSuperellipse(), and flutter::PrerollDelegate::clipRSuperellipse().
| bool flutter::DisplayListMatrixClipState::content_culled | ( | const DlRect & | content_bounds | ) | const |
Definition at line 156 of file dl_matrix_clip_tracker.cc.
References has_perspective(), impeller::TRect< T >::IntersectsWithRect(), is_matrix_invertable(), impeller::TRect< T >::IsEmpty(), and mapRect().
Referenced by flutter::PrerollDelegate::content_culled(), and flutter::DisplayListBuilder::QuickReject().
|
inline |
Definition at line 42 of file dl_matrix_clip_tracker.h.
Referenced by flutter::PrerollDelegate::device_cull_rect(), flutter::DisplayListBuilder::GetDestinationClipCoverage(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), and flutter::testing::TEST().
| DlRect flutter::DisplayListMatrixClipState::GetLocalCullCoverage | ( | ) | const |
Definition at line 235 of file dl_matrix_clip_tracker.cc.
References impeller::Matrix::HasPerspective2D(), impeller::Matrix::Invert(), is_matrix_invertable(), impeller::TRect< T >::IsEmpty(), flutter::DisplayListBuilder::kMaxCullRect, and impeller::TRect< T >::TransformBounds().
Referenced by flutter::DisplayListBuilder::GetLocalClipCoverage(), flutter::PrerollDelegate::local_cull_rect(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), and flutter::testing::TEST().
|
inline |
Definition at line 37 of file dl_matrix_clip_tracker.h.
References impeller::Matrix::HasPerspective().
Referenced by content_culled().
| bool flutter::DisplayListMatrixClipState::inverseTransform | ( | const DisplayListMatrixClipState & | other_tracker | ) |
Definition at line 24 of file dl_matrix_clip_tracker.cc.
References impeller::Matrix::Invert(), and is_matrix_invertable().
|
inline |
|
inline |
Definition at line 36 of file dl_matrix_clip_tracker.h.
References impeller::Matrix::IsInvertible().
Referenced by content_culled(), GetLocalCullCoverage(), and inverseTransform().
| bool flutter::DisplayListMatrixClipState::mapAndClipRect | ( | const DlRect & | src, |
| DlRect * | mapped | ||
| ) | const |
Definition at line 33 of file dl_matrix_clip_tracker.cc.
References impeller::TRect< T >::Intersection(), and impeller::TRect< T >::TransformAndClipBounds().
|
inline |
Maps the rect by the current matrix and then clips it against the current cull rect, returning true if the result is non-empty.
Definition at line 104 of file dl_matrix_clip_tracker.h.
References mapAndClipRect().
Referenced by mapAndClipRect().
|
inline |
Definition at line 97 of file dl_matrix_clip_tracker.h.
References impeller::Matrix::IsAligned2D(), and impeller::TRect< T >::TransformAndClipBounds().
|
inline |
Definition at line 96 of file dl_matrix_clip_tracker.h.
References mapRect().
Referenced by flutter::DiffContext::AddLayerBounds(), content_culled(), mapRect(), and resetLocalCullRect().
|
inline |
Definition at line 39 of file dl_matrix_clip_tracker.h.
Referenced by flutter::DisplayListBuilder::GetMatrix(), flutter::PrerollDelegate::matrix(), setTransform(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), transform(), TransformedOvalCoversBounds(), TransformedRectCoversBounds(), TransformedRoundSuperellipseCoversBounds(), and TransformedRRectCoversBounds().
| bool flutter::DisplayListMatrixClipState::oval_covers_cull | ( | const DlRect & | content_bounds | ) | const |
Definition at line 286 of file dl_matrix_clip_tracker.cc.
References TransformedOvalCoversBounds().
Referenced by clipOval(), flutter::testing::TEST(), flutter::testing::TEST(), and flutter::testing::TEST().
| bool flutter::DisplayListMatrixClipState::rect_covers_cull | ( | const DlRect & | content | ) | const |
Definition at line 254 of file dl_matrix_clip_tracker.cc.
References content, and TransformedRectCoversBounds().
Referenced by flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), and flutter::testing::TEST().
| void flutter::DisplayListMatrixClipState::resetDeviceCullRect | ( | const DlRect & | cull_rect | ) |
Definition at line 172 of file dl_matrix_clip_tracker.cc.
References impeller::TRect< T >::IsEmpty().
| void flutter::DisplayListMatrixClipState::resetLocalCullRect | ( | const DlRect & | cull_rect | ) |
Definition at line 180 of file dl_matrix_clip_tracker.cc.
References impeller::TRect< T >::IsEmpty(), and mapRect().
|
inline |
Definition at line 61 of file dl_matrix_clip_tracker.h.
References impeller::Matrix::MakeRotationZ().
Referenced by flutter::DisplayListBuilder::Rotate(), flutter::testing::TEST(), flutter::testing::TEST(), and flutter::testing::TEST().
| bool flutter::DisplayListMatrixClipState::rrect_covers_cull | ( | const DlRoundRect & | content | ) | const |
Definition at line 317 of file dl_matrix_clip_tracker.cc.
References content, and TransformedRRectCoversBounds().
Referenced by clipRRect(), and flutter::testing::TEST().
| bool flutter::DisplayListMatrixClipState::rsuperellipse_covers_cull | ( | const DlRoundSuperellipse & | content | ) | const |
Definition at line 365 of file dl_matrix_clip_tracker.cc.
References content, and TransformedRoundSuperellipseCoversBounds().
Referenced by clipRSuperellipse().
Definition at line 55 of file dl_matrix_clip_tracker.h.
References impeller::Matrix::Scale().
Referenced by flutter::DisplayListBuilder::Scale(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), TransformedOvalCoversBounds(), and TransformedRRectCoversBounds().
|
inline |
Definition at line 90 of file dl_matrix_clip_tracker.h.
Referenced by flutter::DisplayListBuilder::TransformReset().
|
inline |
Definition at line 89 of file dl_matrix_clip_tracker.h.
References matrix().
Referenced by flutter::PrerollDelegate::integralTransform(), flutter::testing::TEST(), and flutter::DisplayListBuilder::TransformReset().
Definition at line 58 of file dl_matrix_clip_tracker.h.
References impeller::Matrix::MakeSkew().
Referenced by flutter::DisplayListBuilder::Skew(), and flutter::testing::TEST().
|
inline |
Definition at line 64 of file dl_matrix_clip_tracker.h.
References matrix().
Referenced by flutter::testing::TEST(), and flutter::PrerollDelegate::transform().
|
inline |
Definition at line 66 of file dl_matrix_clip_tracker.h.
References impeller::Matrix::MakeColumn().
Referenced by flutter::testing::TEST(), and flutter::DisplayListBuilder::Transform2DAffine().
|
static |
Checks if an oval defined by the local bounds, when transformed by the matrix, completely covers the indicated culling bounds.
This utility method helps answer the question of whether a clip oval being intersected under a transform is essentially obsolete because it will not reduce the already existing clip culling bounds.
Definition at line 290 of file dl_matrix_clip_tracker.cc.
References impeller::TRect< T >::Contains(), impeller::TRect< T >::GetCenter(), impeller::TRect< T >::GetSize(), impeller::TRect< T >::IsEmpty(), matrix(), and scale().
Referenced by oval_covers_cull(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), TransformedRoundSuperellipseCoversBounds(), and TransformedRRectCoversBounds().
|
static |
Checks if the local rect, when transformed by the matrix, completely covers the indicated culling bounds.
This utility method helps answer the question of whether a clip rectangle being intersected under a transform is essentially obsolete because it will not reduce the already existing clip culling bounds.
Definition at line 258 of file dl_matrix_clip_tracker.cc.
References impeller::TRect< T >::Contains(), impeller::TRect< T >::ContainsInclusive(), impeller::Matrix::IsAligned2D(), impeller::TRect< T >::IsEmpty(), matrix(), and impeller::TRect< T >::TransformAndClipBounds().
Referenced by rect_covers_cull(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), TransformedRoundSuperellipseCoversBounds(), and TransformedRRectCoversBounds().
|
static |
Checks if the local round superellipse, when transformed by the matrix, completely covers the indicated culling bounds.
This utility method helps answer the question of whether a clip round superellipse being intersected under a transform is essentially obsolete because it will not reduce the already existing clip culling bounds.
Definition at line 370 of file dl_matrix_clip_tracker.cc.
References impeller::RoundSuperellipse::GetBounds(), impeller::RoundSuperellipse::GetRadii(), impeller::TRect< T >::IsEmpty(), impeller::RoundSuperellipse::IsEmpty(), impeller::RoundSuperellipse::IsOval(), impeller::RoundSuperellipse::IsRect(), impeller::RoundSuperellipseParam::MakeBoundsRadii(), matrix(), TransformedOvalCoversBounds(), and TransformedRectCoversBounds().
Referenced by rsuperellipse_covers_cull().
|
static |
Checks if the local round rect, when transformed by the matrix, completely covers the indicated culling bounds.
This utility method helps answer the question of whether a clip rrect being intersected under a transform is essentially obsolete because it will not reduce the already existing clip culling bounds.
Definition at line 322 of file dl_matrix_clip_tracker.cc.
References impeller::RoundingRadii::AreAllCornersSame(), impeller::RoundRect::GetBounds(), impeller::RoundRect::GetRadii(), impeller::TRect< T >::IsEmpty(), impeller::RoundRect::IsEmpty(), impeller::RoundRect::IsOval(), impeller::RoundRect::IsRect(), matrix(), scale(), impeller::RoundingRadii::top_left, TransformedOvalCoversBounds(), and TransformedRectCoversBounds().
Referenced by rrect_covers_cull(), and flutter::testing::TEST().
|
inline |
Definition at line 76 of file dl_matrix_clip_tracker.h.
References impeller::Matrix::MakeColumn().
Referenced by flutter::testing::TEST(), flutter::testing::TEST(), and flutter::DisplayListBuilder::TransformFullPerspective().
Definition at line 52 of file dl_matrix_clip_tracker.h.
References impeller::Matrix::Translate().
Referenced by flutter::testing::TEST(), flutter::DisplayListBuilder::Translate(), and flutter::PrerollDelegate::translate().
|
inline |
Definition at line 35 of file dl_matrix_clip_tracker.h.
References impeller::Matrix::IsAffine().
Referenced by flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), and flutter::testing::TEST().