Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Remove SkScalarIsFinite from Flutter Engine.
  • Loading branch information
johnstiles-google committed Apr 20, 2024
commit f9b986a4974a6871d957138a90fc4bcaf031f2ad
9 changes: 3 additions & 6 deletions display_list/dl_builder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -707,8 +707,7 @@ void DisplayListBuilder::SaveLayer(const SkRect* bounds,
}

void DisplayListBuilder::Translate(SkScalar tx, SkScalar ty) {
if (std::isfinite(tx) && std::isfinite(ty) &&
(tx != 0.0 || ty != 0.0)) {
if (std::isfinite(tx) && std::isfinite(ty) && (tx != 0.0 || ty != 0.0)) {
checkForDeferredSave();
Push<TranslateOp>(0, tx, ty);
tracker_.translate(tx, ty);
Expand All @@ -718,8 +717,7 @@ void DisplayListBuilder::Translate(SkScalar tx, SkScalar ty) {
}
}
void DisplayListBuilder::Scale(SkScalar sx, SkScalar sy) {
if (std::isfinite(sx) && std::isfinite(sy) &&
(sx != 1.0 || sy != 1.0)) {
if (std::isfinite(sx) && std::isfinite(sy) && (sx != 1.0 || sy != 1.0)) {
checkForDeferredSave();
Push<ScaleOp>(0, sx, sy);
tracker_.scale(sx, sy);
Expand All @@ -739,8 +737,7 @@ void DisplayListBuilder::Rotate(SkScalar degrees) {
}
}
void DisplayListBuilder::Skew(SkScalar sx, SkScalar sy) {
if (std::isfinite(sx) && std::isfinite(sy) &&
(sx != 0.0 || sy != 0.0)) {
if (std::isfinite(sx) && std::isfinite(sy) && (sx != 0.0 || sy != 0.0)) {
checkForDeferredSave();
Push<SkewOp>(0, sx, sy);
tracker_.skew(sx, sy);
Expand Down