Skip to content

Commit

Permalink
Fixed Windows build after Blink removal (flutter#5230)
Browse files Browse the repository at this point in the history
  • Loading branch information
bkonyi authored May 11, 2018
1 parent 4a4cff9 commit 39c02c4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib/ui/painting/canvas.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include "flutter/lib/ui/painting/canvas.h"

#define _USE_MATH_DEFINES
#include <math.h>

#include "flutter/flow/layers/physical_shape_layer.h"
Expand Down
2 changes: 2 additions & 0 deletions lib/ui/painting/gradient.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#define _USE_MATH_DEFINES

#include "flutter/lib/ui/painting/gradient.h"

#include "lib/tonic/converter/dart_converter.h"
Expand Down
5 changes: 3 additions & 2 deletions lib/ui/painting/path.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include "flutter/lib/ui/painting/path.h"

#define _USE_MATH_DEFINES
#include <math.h>

#include "flutter/lib/ui/painting/matrix.h"
Expand Down Expand Up @@ -215,7 +216,7 @@ void CanvasPath::addPath(CanvasPath* path, double dx, double dy) {
void CanvasPath::addPathWithMatrix(CanvasPath* path, double dx, double dy, tonic::Float64List& matrix4) {
if (!path)
Dart_ThrowException(ToDart("Path.addPathWithMatrix called with non-genuine Path."));

SkMatrix matrix = ToSkMatrix(matrix4);
matrix.setTranslateX(matrix.getTranslateX() + dx);
matrix.setTranslateY(matrix.getTranslateY() + dy);
Expand All @@ -233,7 +234,7 @@ void CanvasPath::extendWithPath(CanvasPath* path, double dx, double dy) {
void CanvasPath::extendWithPathAndMatrix(CanvasPath* path, double dx, double dy, tonic::Float64List& matrix4) {
if (!path)
Dart_ThrowException(ToDart("Path.addPathWithMatrix called with non-genuine Path."));

SkMatrix matrix = ToSkMatrix(matrix4);
matrix.setTranslateX(matrix.getTranslateX() + dx);
matrix.setTranslateY(matrix.getTranslateY() + dy);
Expand Down
1 change: 1 addition & 0 deletions lib/ui/painting/path_measure.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include "flutter/lib/ui/painting/path_measure.h"

#define _USE_MATH_DEFINES
#include <math.h>

#include "flutter/lib/ui/painting/matrix.h"
Expand Down

0 comments on commit 39c02c4

Please sign in to comment.