Flutter Engine
The Flutter Engine
Public Member Functions | Static Public Member Functions | List of all members
flutter::DisplayListMatrixClipState Class Reference

#include <dl_matrix_clip_tracker.h>

Public Member Functions

 DisplayListMatrixClipState (const DlRect &cull_rect, const DlMatrix &matrix=DlMatrix())
 
 DisplayListMatrixClipState (const SkRect &cull_rect)
 
 DisplayListMatrixClipState (const SkRect &cull_rect, const SkMatrix &matrix)
 
 DisplayListMatrixClipState (const SkRect &cull_rect, const SkM44 &matrix)
 
 DisplayListMatrixClipState (const DisplayListMatrixClipState &other)=default
 
void resetDeviceCullRect (const DlRect &cull_rect)
 
void resetDeviceCullRect (const SkRect &cull_rect)
 
void resetLocalCullRect (const DlRect &cull_rect)
 
void resetLocalCullRect (const SkRect &cull_rect)
 
bool using_4x4_matrix () const
 
bool is_matrix_invertable () const
 
bool has_perspective () const
 
const DlMatrixmatrix () const
 
SkM44 matrix_4x4 () const
 
SkMatrix matrix_3x3 () const
 
SkRect local_cull_rect () const
 
SkRect device_cull_rect () const
 
bool rect_covers_cull (const DlRect &content) const
 
bool rect_covers_cull (const SkRect &content) const
 
bool oval_covers_cull (const DlRect &content_bounds) const
 
bool oval_covers_cull (const SkRect &content_bounds) const
 
bool rrect_covers_cull (const SkRRect &content) const
 
bool content_culled (const DlRect &content_bounds) const
 
bool content_culled (const SkRect &content_bounds) const
 
bool is_cull_rect_empty () const
 
void translate (SkScalar tx, SkScalar ty)
 
void scale (SkScalar sx, SkScalar sy)
 
void skew (SkScalar skx, SkScalar sky)
 
void rotate (SkScalar degrees)
 
void transform (const DlMatrix &matrix)
 
void transform (const SkM44 &m44)
 
void transform (const SkMatrix &matrix)
 
void transform2DAffine (SkScalar mxx, SkScalar mxy, SkScalar mxt, SkScalar myx, SkScalar myy, SkScalar myt)
 
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)
 
void setTransform (const DlMatrix &matrix)
 
void setTransform (const SkMatrix &matrix)
 
void setTransform (const SkM44 &m44)
 
void setIdentity ()
 
bool inverseTransform (const DisplayListMatrixClipState &other_tracker)
 
bool mapRect (DlRect *rect) const
 
bool mapRect (const DlRect &src, DlRect *mapped) const
 
bool mapRect (SkRect *rect) const
 
bool mapRect (const SkRect &src, SkRect *mapped) const
 
bool mapAndClipRect (SkRect *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. More...
 
bool mapAndClipRect (const SkRect &src, SkRect *mapped) const
 
void clipRect (const DlRect &rect, ClipOp op, bool is_aa)
 
void clipRect (const SkRect &rect, ClipOp op, bool is_aa)
 
void clipRRect (const SkRRect &rrect, ClipOp op, bool is_aa)
 
void clipPath (const SkPath &path, ClipOp op, bool is_aa)
 

Static Public Member Functions

static bool is_3x3 (const SkM44 &m44)
 

Detailed Description

Definition at line 23 of file dl_matrix_clip_tracker.h.

Constructor & Destructor Documentation

◆ DisplayListMatrixClipState() [1/5]

flutter::DisplayListMatrixClipState::DisplayListMatrixClipState ( const DlRect cull_rect,
const DlMatrix matrix = DlMatrix() 
)
explicit

Definition at line 33 of file dl_matrix_clip_tracker.cc.

35 : cull_rect_(ProtectEmpty(cull_rect)), matrix_(matrix) {}
static const DlRect & ProtectEmpty(const SkRect &rect)
Definition: dl_builder.cc:119

◆ DisplayListMatrixClipState() [2/5]

flutter::DisplayListMatrixClipState::DisplayListMatrixClipState ( const SkRect cull_rect)
explicit

Definition at line 37 of file dl_matrix_clip_tracker.cc.

38 : cull_rect_(ProtectEmpty(cull_rect)), matrix_(DlMatrix()) {}
impeller::Matrix DlMatrix

◆ DisplayListMatrixClipState() [3/5]

flutter::DisplayListMatrixClipState::DisplayListMatrixClipState ( const SkRect cull_rect,
const SkMatrix matrix 
)

Definition at line 40 of file dl_matrix_clip_tracker.cc.

42 : cull_rect_(ProtectEmpty(cull_rect)), matrix_(ToDlMatrix(matrix)) {}
constexpr DlMatrix ToDlMatrix(const SkMatrix &matrix)

◆ DisplayListMatrixClipState() [4/5]

flutter::DisplayListMatrixClipState::DisplayListMatrixClipState ( const SkRect cull_rect,
const SkM44 matrix 
)

Definition at line 44 of file dl_matrix_clip_tracker.cc.

46 : cull_rect_(ProtectEmpty(cull_rect)), matrix_(ToDlMatrix(matrix)) {}

◆ DisplayListMatrixClipState() [5/5]

flutter::DisplayListMatrixClipState::DisplayListMatrixClipState ( const DisplayListMatrixClipState other)
default

Member Function Documentation

◆ clipPath()

void flutter::DisplayListMatrixClipState::clipPath ( const SkPath path,
ClipOp  op,
bool  is_aa 
)

Definition at line 108 of file dl_matrix_clip_tracker.cc.

110 {
111 // Map "kDifference of inverse path" to "kIntersect of the original path" and
112 // map "kIntersect of inverse path" to "kDifference of the original path"
113 if (path.isInverseFillType()) {
114 switch (op) {
117 break;
120 break;
121 }
122 }
123
124 DlRect bounds = ToDlRect(path.getBounds());
125 if (path.isRect(nullptr)) {
126 return clipRect(bounds, op, is_aa);
127 }
128 switch (op) {
130 adjustCullRect(bounds, op, is_aa);
131 break;
133 break;
134 }
135}
void clipRect(const DlRect &rect, ClipOp op, bool is_aa)
Optional< SkRect > bounds
Definition: SkRecords.h:189
impeller::Rect DlRect
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
Definition: switches.h:57
const DlRect & ToDlRect(const SkRect &rect)

◆ clipRect() [1/2]

void flutter::DisplayListMatrixClipState::clipRect ( const DlRect rect,
ClipOp  op,
bool  is_aa 
)

Definition at line 69 of file dl_matrix_clip_tracker.cc.

71 {
72 if (rect.IsFinite()) {
73 adjustCullRect(rect, op, is_aa);
74 }
75}
sk_sp< SkBlender > blender SkRect rect
Definition: SkRecords.h:350

◆ clipRect() [2/2]

void flutter::DisplayListMatrixClipState::clipRect ( const SkRect rect,
ClipOp  op,
bool  is_aa 
)
inline

Definition at line 149 of file dl_matrix_clip_tracker.h.

149 {
150 clipRect(ToDlRect(rect), op, is_aa);
151 }

◆ clipRRect()

void flutter::DisplayListMatrixClipState::clipRRect ( const SkRRect rrect,
ClipOp  op,
bool  is_aa 
)

Definition at line 77 of file dl_matrix_clip_tracker.cc.

79 {
81 if (rrect.isRect()) {
82 return clipRect(bounds, op, is_aa);
83 }
84 switch (op) {
86 adjustCullRect(bounds, op, is_aa);
87 break;
90 cull_rect_ = DlRect();
91 return;
92 }
93 auto upper_left = rrect.radii(SkRRect::kUpperLeft_Corner);
94 auto upper_right = rrect.radii(SkRRect::kUpperRight_Corner);
95 auto lower_left = rrect.radii(SkRRect::kLowerLeft_Corner);
96 auto lower_right = rrect.radii(SkRRect::kLowerRight_Corner);
97 DlRect safe = bounds.Expand(-std::max(upper_left.fX, lower_left.fX), 0,
98 -std::max(upper_right.fX, lower_right.fX), 0);
99 adjustCullRect(safe, op, is_aa);
100 safe = bounds.Expand(0, -std::max(upper_left.fY, upper_right.fY), //
101 0, -std::max(lower_left.fY, lower_right.fY));
102 adjustCullRect(safe, op, is_aa);
103 break;
104 }
105 }
106}
SkVector radii(Corner corner) const
Definition: SkRRect.h:271
@ kUpperLeft_Corner
index of top-left corner radii
Definition: SkRRect.h:252
@ kLowerRight_Corner
index of bottom-right corner radii
Definition: SkRRect.h:254
@ kUpperRight_Corner
index of top-right corner radii
Definition: SkRRect.h:253
@ kLowerLeft_Corner
index of bottom-left corner radii
Definition: SkRRect.h:255
bool isRect() const
Definition: SkRRect.h:84
const SkRect & getBounds() const
Definition: SkRRect.h:279
bool rrect_covers_cull(const SkRRect &content) const
static float max(float r, float g, float b)
Definition: hsl.cpp:49
SkRRect rrect
Definition: SkRecords.h:232

◆ content_culled() [1/2]

bool flutter::DisplayListMatrixClipState::content_culled ( const DlRect content_bounds) const

Definition at line 137 of file dl_matrix_clip_tracker.cc.

138 {
139 if (cull_rect_.IsEmpty() || content_bounds.IsEmpty()) {
140 return true;
141 }
142 if (!is_matrix_invertable()) {
143 return true;
144 }
145 if (has_perspective()) {
146 return false;
147 }
148 DlRect mapped;
149 mapRect(content_bounds, &mapped);
150 return !mapped.IntersectsWithRect(cull_rect_);
151}
constexpr bool IsEmpty() const
Returns true if either of the width or height are 0, negative, or NaN.
Definition: rect.h:287

◆ content_culled() [2/2]

bool flutter::DisplayListMatrixClipState::content_culled ( const SkRect content_bounds) const
inline

Definition at line 77 of file dl_matrix_clip_tracker.h.

77 {
78 return content_culled(ToDlRect(content_bounds));
79 }
bool content_culled(const DlRect &content_bounds) const

◆ device_cull_rect()

SkRect flutter::DisplayListMatrixClipState::device_cull_rect ( ) const
inline

Definition at line 64 of file dl_matrix_clip_tracker.h.

64{ return ToSkRect(cull_rect_); }
const SkRect & ToSkRect(const DlRect &rect)

◆ has_perspective()

bool flutter::DisplayListMatrixClipState::has_perspective ( ) const
inline

Definition at line 57 of file dl_matrix_clip_tracker.h.

57{ return matrix_.HasPerspective(); }
constexpr bool HasPerspective() const
Definition: matrix.h:330

◆ inverseTransform()

bool flutter::DisplayListMatrixClipState::inverseTransform ( const DisplayListMatrixClipState other_tracker)

Definition at line 48 of file dl_matrix_clip_tracker.cc.

49 {
50 if (tracker.is_matrix_invertable()) {
51 matrix_ = matrix_ * tracker.matrix_.Invert();
52 return true;
53 }
54 return false;
55}
Matrix Invert() const
Definition: matrix.cc:97

◆ is_3x3()

bool flutter::DisplayListMatrixClipState::is_3x3 ( const SkM44 m44)
static

Definition at line 12 of file dl_matrix_clip_tracker.cc.

12 {
13 // clang-format off
14 return ( m.rc(0, 2) == 0 &&
15 m.rc(1, 2) == 0 &&
16 m.rc(2, 0) == 0 && m.rc(2, 1) == 0 && m.rc(2, 2) == 1 && m.rc(2, 3) == 0 &&
17 m.rc(3, 2) == 0);
18 // clang-format on
19}

◆ is_cull_rect_empty()

bool flutter::DisplayListMatrixClipState::is_cull_rect_empty ( ) const
inline

Definition at line 80 of file dl_matrix_clip_tracker.h.

80{ return cull_rect_.IsEmpty(); }

◆ is_matrix_invertable()

bool flutter::DisplayListMatrixClipState::is_matrix_invertable ( ) const
inline

Definition at line 56 of file dl_matrix_clip_tracker.h.

56{ return matrix_.GetDeterminant() != 0.0f; }
Scalar GetDeterminant() const
Definition: matrix.cc:162

◆ local_cull_rect()

SkRect flutter::DisplayListMatrixClipState::local_cull_rect ( ) const

Definition at line 216 of file dl_matrix_clip_tracker.cc.

216 {
217 if (cull_rect_.IsEmpty()) {
218 return SkRect::MakeEmpty();
219 }
220 if (!is_matrix_invertable()) {
221 return SkRect::MakeEmpty();
222 }
223 if (matrix_.HasPerspective2D()) {
224 // We could do a 4-point long-form conversion, but since this is
225 // only used for culling, let's just return a non-constricting
226 // cull rect.
228 }
229 DlMatrix inverse = matrix_.Invert();
230 // We eliminated perspective above so we can use the cheaper non-clipping
231 // bounds transform method.
232 return ToSkRect(cull_rect_.TransformBounds(inverse));
233}
static constexpr SkRect kMaxCullRect
Definition: dl_builder.h:32
static constexpr SkRect MakeEmpty()
Definition: SkRect.h:595
constexpr bool HasPerspective2D() const
Definition: matrix.h:326
constexpr TRect TransformBounds(const Matrix &transform) const
Creates a new bounding box that contains this transformed rectangle.
Definition: rect.h:463

◆ mapAndClipRect() [1/2]

bool flutter::DisplayListMatrixClipState::mapAndClipRect ( const SkRect src,
SkRect mapped 
) const

Definition at line 57 of file dl_matrix_clip_tracker.cc.

58 {
59 DlRect dl_mapped = ToDlRect(src).TransformAndClipBounds(matrix_);
60 auto dl_intersected = dl_mapped.Intersection(cull_rect_);
61 if (dl_intersected.has_value()) {
62 *mapped = ToSkRect(dl_intersected.value());
63 return true;
64 }
65 mapped->setEmpty();
66 return false;
67}
void setEmpty()
Definition: SkRect.h:842
constexpr std::optional< TRect > Intersection(const TRect &o) const
Definition: rect.h:519
constexpr TRect TransformAndClipBounds(const Matrix &transform) const
Creates a new bounding box that contains this transformed rectangle, clipped against the near clippin...
Definition: rect.h:429

◆ mapAndClipRect() [2/2]

bool flutter::DisplayListMatrixClipState::mapAndClipRect ( SkRect rect) const
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 143 of file dl_matrix_clip_tracker.h.

143 {
144 return mapAndClipRect(*rect, rect);
145 }
bool mapAndClipRect(SkRect *rect) const
Maps the rect by the current matrix and then clips it against the current cull rect,...

◆ mapRect() [1/4]

bool flutter::DisplayListMatrixClipState::mapRect ( const DlRect src,
DlRect mapped 
) const
inline

Definition at line 131 of file dl_matrix_clip_tracker.h.

131 {
132 *mapped = src.TransformAndClipBounds(matrix_);
133 return matrix_.IsAligned2D();
134 }
constexpr bool IsAligned2D(Scalar tolerance=0) const
Definition: matrix.h:336

◆ mapRect() [2/4]

bool flutter::DisplayListMatrixClipState::mapRect ( const SkRect src,
SkRect mapped 
) const
inline

Definition at line 136 of file dl_matrix_clip_tracker.h.

136 {
137 *mapped = ToSkRect(ToDlRect(src).TransformAndClipBounds(matrix_));
138 return matrix_.IsAligned2D();
139 }

◆ mapRect() [3/4]

bool flutter::DisplayListMatrixClipState::mapRect ( DlRect rect) const
inline

Definition at line 130 of file dl_matrix_clip_tracker.h.

130{ return mapRect(*rect, rect); }

◆ mapRect() [4/4]

bool flutter::DisplayListMatrixClipState::mapRect ( SkRect rect) const
inline

Definition at line 135 of file dl_matrix_clip_tracker.h.

135{ return mapRect(*rect, rect); }

◆ matrix()

const DlMatrix & flutter::DisplayListMatrixClipState::matrix ( ) const
inline

Definition at line 59 of file dl_matrix_clip_tracker.h.

59{ return matrix_; }

◆ matrix_3x3()

SkMatrix flutter::DisplayListMatrixClipState::matrix_3x3 ( ) const
inline

Definition at line 61 of file dl_matrix_clip_tracker.h.

61{ return ToSkMatrix(matrix_); }
constexpr SkMatrix ToSkMatrix(const DlMatrix &matrix)

◆ matrix_4x4()

SkM44 flutter::DisplayListMatrixClipState::matrix_4x4 ( ) const
inline

Definition at line 60 of file dl_matrix_clip_tracker.h.

60{ return SkM44::ColMajor(matrix_.m); }
static SkM44 ColMajor(const SkScalar c[16])
Definition: SkM44.h:218
Scalar m[16]
Definition: matrix.h:39

◆ oval_covers_cull() [1/2]

bool flutter::DisplayListMatrixClipState::oval_covers_cull ( const DlRect content_bounds) const

Definition at line 260 of file dl_matrix_clip_tracker.cc.

260 {
261 if (bounds.IsEmpty()) {
262 return false;
263 }
264 if (cull_rect_.IsEmpty()) {
265 return true;
266 }
267 DlPoint corners[4];
268 if (!getLocalCullCorners(corners)) {
269 return false;
270 }
271 DlPoint center = bounds.GetCenter();
272 DlSize scale = 2.0 / bounds.GetSize();
273 for (auto corner : corners) {
274 if (!bounds.Contains(corner)) {
275 return false;
276 }
277 if (((corner - center) * scale).GetLengthSquared() >= 1.0) {
278 return false;
279 }
280 }
281 return true;
282}
void scale(SkScalar sx, SkScalar sy)
impeller::Size DlSize
impeller::Point DlPoint

◆ oval_covers_cull() [2/2]

bool flutter::DisplayListMatrixClipState::oval_covers_cull ( const SkRect content_bounds) const
inline

Definition at line 71 of file dl_matrix_clip_tracker.h.

71 {
72 return oval_covers_cull(ToDlRect(content_bounds));
73 }
bool oval_covers_cull(const DlRect &content_bounds) const

◆ rect_covers_cull() [1/2]

bool flutter::DisplayListMatrixClipState::rect_covers_cull ( const DlRect content) const

Definition at line 235 of file dl_matrix_clip_tracker.cc.

235 {
236 if (content.IsEmpty()) {
237 return false;
238 }
239 if (cull_rect_.IsEmpty()) {
240 return true;
241 }
242 if (matrix_.IsAligned2D()) {
243 // This transform-to-device calculation is faster and more accurate
244 // for rect-to-rect aligned transformations, but not accurate under
245 // (non-quadrant) rotations and skews.
246 return content.TransformAndClipBounds(matrix_).Contains(cull_rect_);
247 }
248 DlPoint corners[4];
249 if (!getLocalCullCorners(corners)) {
250 return false;
251 }
252 for (auto corner : corners) {
253 if (!content.ContainsInclusive(corner)) {
254 return false;
255 }
256 }
257 return true;
258}
union flutter::testing::@2836::KeyboardChange::@76 content

◆ rect_covers_cull() [2/2]

bool flutter::DisplayListMatrixClipState::rect_covers_cull ( const SkRect content) const
inline

Definition at line 67 of file dl_matrix_clip_tracker.h.

67 {
69 }
bool rect_covers_cull(const DlRect &content) const

◆ resetDeviceCullRect() [1/2]

void flutter::DisplayListMatrixClipState::resetDeviceCullRect ( const DlRect cull_rect)

Definition at line 153 of file dl_matrix_clip_tracker.cc.

153 {
154 if (cull_rect.IsEmpty()) {
155 cull_rect_ = DlRect();
156 } else {
157 cull_rect_ = cull_rect;
158 }
159}

◆ resetDeviceCullRect() [2/2]

void flutter::DisplayListMatrixClipState::resetDeviceCullRect ( const SkRect cull_rect)
inline

Definition at line 47 of file dl_matrix_clip_tracker.h.

47 {
48 resetDeviceCullRect(ToDlRect(cull_rect));
49 }
void resetDeviceCullRect(const DlRect &cull_rect)

◆ resetLocalCullRect() [1/2]

void flutter::DisplayListMatrixClipState::resetLocalCullRect ( const DlRect cull_rect)

Definition at line 161 of file dl_matrix_clip_tracker.cc.

161 {
162 if (!cull_rect.IsEmpty()) {
163 mapRect(cull_rect, &cull_rect_);
164 if (!cull_rect_.IsEmpty()) {
165 return;
166 }
167 }
168 cull_rect_ = DlRect();
169}

◆ resetLocalCullRect() [2/2]

void flutter::DisplayListMatrixClipState::resetLocalCullRect ( const SkRect cull_rect)
inline

Definition at line 51 of file dl_matrix_clip_tracker.h.

51 {
52 resetLocalCullRect(ToDlRect(cull_rect));
53 }
void resetLocalCullRect(const DlRect &cull_rect)

◆ rotate()

void flutter::DisplayListMatrixClipState::rotate ( SkScalar  degrees)
inline

Definition at line 91 of file dl_matrix_clip_tracker.h.

91 {
92 matrix_ = matrix_ * DlMatrix::MakeRotationZ(DlDegrees(degrees));
93 }
impeller::Degrees DlDegrees
static Matrix MakeRotationZ(Radians r)
Definition: matrix.h:213

◆ rrect_covers_cull()

bool flutter::DisplayListMatrixClipState::rrect_covers_cull ( const SkRRect content) const

Definition at line 284 of file dl_matrix_clip_tracker.cc.

285 {
286 if (content.isEmpty()) {
287 return false;
288 }
289 if (cull_rect_.IsEmpty()) {
290 return true;
291 }
292 if (content.isRect()) {
293 return rect_covers_cull(content.getBounds());
294 }
295 if (content.isOval()) {
296 return oval_covers_cull(content.getBounds());
297 }
298 if (!content.isSimple()) {
299 return false;
300 }
301 DlPoint corners[4];
302 if (!getLocalCullCorners(corners)) {
303 return false;
304 }
305 auto outer = content.getBounds();
306 DlScalar x_center = outer.centerX();
307 DlScalar y_center = outer.centerY();
308 auto radii = content.getSimpleRadii();
309 DlScalar inner_x = outer.width() * 0.5f - radii.fX;
310 DlScalar inner_y = outer.height() * 0.5f - radii.fY;
311 DlScalar scale_x = 1.0 / radii.fX;
312 DlScalar scale_y = 1.0 / radii.fY;
313 for (auto corner : corners) {
314 if (!outer.contains(corner.x, corner.y)) {
315 return false;
316 }
317 DlScalar x_rel = std::abs(corner.x - x_center) - inner_x;
318 DlScalar y_rel = std::abs(corner.y - y_center) - inner_y;
319 if (x_rel > 0.0f && y_rel > 0.0f) {
320 x_rel *= scale_x;
321 y_rel *= scale_y;
322 if (x_rel * x_rel + y_rel * y_rel >= 1.0f) {
323 return false;
324 }
325 }
326 }
327 return true;
328}
impeller::Scalar DlScalar
SIN Vec< N, float > abs(const Vec< N, float > &x)
Definition: SkVx.h:707

◆ scale()

void flutter::DisplayListMatrixClipState::scale ( SkScalar  sx,
SkScalar  sy 
)
inline

Definition at line 85 of file dl_matrix_clip_tracker.h.

85 {
86 matrix_ = matrix_.Scale({sx, sy, 1.0f});
87 }
constexpr Matrix Scale(const Vector3 &s) const
Definition: matrix.h:252

◆ setIdentity()

void flutter::DisplayListMatrixClipState::setIdentity ( )
inline

Definition at line 124 of file dl_matrix_clip_tracker.h.

124{ matrix_ = DlMatrix(); }

◆ setTransform() [1/3]

void flutter::DisplayListMatrixClipState::setTransform ( const DlMatrix matrix)
inline

Definition at line 121 of file dl_matrix_clip_tracker.h.

121{ matrix_ = matrix; }

◆ setTransform() [2/3]

void flutter::DisplayListMatrixClipState::setTransform ( const SkM44 m44)
inline

Definition at line 123 of file dl_matrix_clip_tracker.h.

123{ matrix_ = ToDlMatrix(m44); }

◆ setTransform() [3/3]

void flutter::DisplayListMatrixClipState::setTransform ( const SkMatrix matrix)
inline

Definition at line 122 of file dl_matrix_clip_tracker.h.

122{ matrix_ = ToDlMatrix(matrix); }

◆ skew()

void flutter::DisplayListMatrixClipState::skew ( SkScalar  skx,
SkScalar  sky 
)
inline

Definition at line 88 of file dl_matrix_clip_tracker.h.

88 {
89 matrix_ = matrix_ * DlMatrix::MakeSkew(skx, sky);
90 }
static constexpr Matrix MakeSkew(Scalar sx, Scalar sy)
Definition: matrix.h:117

◆ transform() [1/3]

void flutter::DisplayListMatrixClipState::transform ( const DlMatrix matrix)
inline

Definition at line 94 of file dl_matrix_clip_tracker.h.

94{ matrix_ = matrix_ * matrix; }

◆ transform() [2/3]

void flutter::DisplayListMatrixClipState::transform ( const SkM44 m44)
inline

Definition at line 95 of file dl_matrix_clip_tracker.h.

95{ transform(ToDlMatrix(m44)); }
void transform(const DlMatrix &matrix)

◆ transform() [3/3]

void flutter::DisplayListMatrixClipState::transform ( const SkMatrix matrix)
inline

Definition at line 96 of file dl_matrix_clip_tracker.h.

◆ transform2DAffine()

void flutter::DisplayListMatrixClipState::transform2DAffine ( SkScalar  mxx,
SkScalar  mxy,
SkScalar  mxt,
SkScalar  myx,
SkScalar  myy,
SkScalar  myt 
)
inline

Definition at line 98 of file dl_matrix_clip_tracker.h.

100 {
101 matrix_ = matrix_ * DlMatrix::MakeColumn(
102 mxx, myx, 0.0f, 0.0f,
103 mxy, myy, 0.0f, 0.0f,
104 0.0f, 0.0f, 1.0f, 0.0f,
105 mxt, myt, 0.0f, 1.0f
106 );
107 }
static constexpr Matrix MakeColumn(Scalar m0, Scalar m1, Scalar m2, Scalar m3, Scalar m4, Scalar m5, Scalar m6, Scalar m7, Scalar m8, Scalar m9, Scalar m10, Scalar m11, Scalar m12, Scalar m13, Scalar m14, Scalar m15)
Definition: matrix.h:69

◆ transformFullPerspective()

void flutter::DisplayListMatrixClipState::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 
)
inline

Definition at line 108 of file dl_matrix_clip_tracker.h.

112 {
113 matrix_ = matrix_ * DlMatrix::MakeColumn(
114 mxx, myx, mzx, mwx,
115 mxy, myy, mzy, mwy,
116 mxz, myz, mzz, mwz,
117 mxt, myt, mzt, mwt
118 );
119 }

◆ translate()

void flutter::DisplayListMatrixClipState::translate ( SkScalar  tx,
SkScalar  ty 
)
inline

Definition at line 82 of file dl_matrix_clip_tracker.h.

82 {
83 matrix_ = matrix_.Translate({tx, ty});
84 }
constexpr Matrix Translate(const Vector3 &t) const
Definition: matrix.h:240

◆ using_4x4_matrix()

bool flutter::DisplayListMatrixClipState::using_4x4_matrix ( ) const
inline

Definition at line 55 of file dl_matrix_clip_tracker.h.

55{ return !matrix_.IsAffine(); }
constexpr bool IsAffine() const
Definition: matrix.h:321

The documentation for this class was generated from the following files: