From fb4efeb1757b5a713882fba59ad2c50543ce6674 Mon Sep 17 00:00:00 2001 From: Brandon DeRosier Date: Mon, 3 Apr 2023 11:11:08 -0700 Subject: [PATCH] [Impeller] Build fixes for impeller-cmake (flutter/engine#40880) --- engine/src/flutter/impeller/geometry/path_component.cc | 4 ++-- engine/src/flutter/impeller/tessellator/tessellator.h | 1 + engine/src/flutter/impeller/typographer/font.h | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/engine/src/flutter/impeller/geometry/path_component.cc b/engine/src/flutter/impeller/geometry/path_component.cc index 7414d3ebbc..c9bd0de833 100644 --- a/engine/src/flutter/impeller/geometry/path_component.cc +++ b/engine/src/flutter/impeller/geometry/path_component.cc @@ -117,13 +117,13 @@ void QuadraticPathComponent::FillPointsForPolyline(std::vector& points, auto cross = (p2 - p1).Cross(dd); auto x0 = d01.Dot(dd) * 1 / cross; auto x2 = d12.Dot(dd) * 1 / cross; - auto scale = abs(cross / (hypot(dd.x, dd.y) * (x2 - x0))); + auto scale = std::abs(cross / (hypot(dd.x, dd.y) * (x2 - x0))); auto a0 = ApproximateParabolaIntegral(x0); auto a2 = ApproximateParabolaIntegral(x2); Scalar val = 0.f; if (std::isfinite(scale)) { - auto da = abs(a2 - a0); + auto da = std::abs(a2 - a0); auto sqrt_scale = sqrt(scale); if ((x0 < 0 && x2 < 0) || (x0 >= 0 && x2 >= 0)) { val = da * sqrt_scale; diff --git a/engine/src/flutter/impeller/tessellator/tessellator.h b/engine/src/flutter/impeller/tessellator/tessellator.h index 3a5ae97bb6..ff93b7091a 100644 --- a/engine/src/flutter/impeller/tessellator/tessellator.h +++ b/engine/src/flutter/impeller/tessellator/tessellator.h @@ -5,6 +5,7 @@ #pragma once #include +#include #include #include "flutter/fml/macros.h" diff --git a/engine/src/flutter/impeller/typographer/font.h b/engine/src/flutter/impeller/typographer/font.h index 0867edcbf7..de80478ccb 100644 --- a/engine/src/flutter/impeller/typographer/font.h +++ b/engine/src/flutter/impeller/typographer/font.h @@ -11,7 +11,6 @@ #include "impeller/base/comparable.h" #include "impeller/typographer/glyph.h" #include "impeller/typographer/typeface.h" -#include "include/core/SkFont.h" namespace impeller {