Use the GPU object constructor to create a gradient shader. (flutter/engine#5136)

Fixes build break introduced in 3d2ae063e9.
This commit is contained in:
Chinmay Garde
2018-04-30 17:06:59 -07:00
committed by GitHub
parent 3d2ae063e9
commit d9405b3004

View File

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