Skip to content

Commit

Permalink
Restore call to setFilterQuality (flutter#24542)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikerreed authored Feb 22, 2021
1 parent b055588 commit 5dc0408
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/ui/painting/paint.cc
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ Paint::Paint(Dart_Handle paint_objects, Dart_Handle paint_data) {
const uint32_t* uint_data = static_cast<const uint32_t*>(byte_data.data());
const float* float_data = static_cast<const float*>(byte_data.data());

auto filter_quality =
static_cast<SkFilterQuality>(uint_data[kFilterQualityIndex]);

Dart_Handle values[kObjectCount];
if (!Dart_IsNull(paint_objects)) {
FML_DCHECK(Dart_IsList(paint_objects));
Expand All @@ -92,9 +95,7 @@ Paint::Paint(Dart_Handle paint_objects, Dart_Handle paint_data) {
Dart_Handle shader = values[kShaderIndex];
if (!Dart_IsNull(shader)) {
Shader* decoded = tonic::DartConverter<Shader*>::FromDart(shader);
uint32_t filter_quality = uint_data[kFilterQualityIndex];
paint_.setShader(
decoded->shader(static_cast<SkFilterQuality>(filter_quality)));
paint_.setShader(decoded->shader(filter_quality));
}

Dart_Handle color_filter = values[kColorFilterIndex];
Expand All @@ -113,6 +114,7 @@ Paint::Paint(Dart_Handle paint_objects, Dart_Handle paint_data) {
}

paint_.setAntiAlias(uint_data[kIsAntiAliasIndex] == 0);
paint_.setFilterQuality(filter_quality);

uint32_t encoded_color = uint_data[kColorIndex];
if (encoded_color) {
Expand Down

0 comments on commit 5dc0408

Please sign in to comment.