Skip to content

Commit

Permalink
Use the GPU object constructor to create a gradient shader. (flutter#…
Browse files Browse the repository at this point in the history
…5136)

Fixes build break introduced in 33aaf6f.
  • Loading branch information
chinmaygarde authored May 1, 2018
1 parent 33aaf6f commit 110bce4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ui/painting/gradient.cc
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ void CanvasGradient::initSweep(double center_x,
sk_matrix = ToSkMatrix(matrix4);
}

set_shader(SkGradientShader::MakeSweep(
set_shader(UIDartState::CreateGPUObject(SkGradientShader::MakeSweep(
center_x, center_y, reinterpret_cast<const SkColor*>(colors.data()),
color_stops.data(), colors.num_elements(), tile_mode,
start_angle * 180.0 / M_PI, end_angle * 180.0 / M_PI, 0,
has_matrix ? &sk_matrix : nullptr));
has_matrix ? &sk_matrix : nullptr)));
}

CanvasGradient::CanvasGradient() = default;
Expand Down

0 comments on commit 110bce4

Please sign in to comment.