[Impeller] Build fixes for impeller-cmake (flutter/engine#40880)

This commit is contained in:
Brandon DeRosier
2023-04-03 11:11:08 -07:00
committed by GitHub
parent 089bfc9ad5
commit fb4efeb175
3 changed files with 3 additions and 3 deletions

View File

@@ -117,13 +117,13 @@ void QuadraticPathComponent::FillPointsForPolyline(std::vector<Point>& 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;

View File

@@ -5,6 +5,7 @@
#pragma once
#include <functional>
#include <memory>
#include <vector>
#include "flutter/fml/macros.h"

View File

@@ -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 {