fix unused-variable error on SUPPORT_FRACTIONAL_TRANSLATION variant (flutter/engine#33403)

This commit is contained in:
Jonah Williams
2022-05-16 15:29:05 -07:00
committed by GitHub
parent 858241db7c
commit b0ed6b08b5
8 changed files with 24 additions and 2 deletions

View File

@@ -391,7 +391,9 @@ TEST_F(ClipPathLayerTest, OpacityInheritancePainting) {
opacity_layer->Preroll(context, SkMatrix::I());
EXPECT_TRUE(opacity_layer->children_can_accept_opacity());
#ifndef SUPPORT_FRACTIONAL_TRANSLATION
auto opacity_integer_transform = SkM44::Translate(offset.fX, offset.fY);
#endif
DisplayListBuilder expected_builder;
/* OpacityLayer::Paint() */ {
expected_builder.save();
@@ -462,7 +464,9 @@ TEST_F(ClipPathLayerTest, OpacityInheritanceSaveLayerPainting) {
opacity_layer->Preroll(context, SkMatrix::I());
EXPECT_TRUE(opacity_layer->children_can_accept_opacity());
#ifndef SUPPORT_FRACTIONAL_TRANSLATION
auto opacity_integer_transform = SkM44::Translate(offset.fX, offset.fY);
#endif
DisplayListBuilder expected_builder;
/* OpacityLayer::Paint() */ {
expected_builder.save();

View File

@@ -384,8 +384,9 @@ TEST_F(ClipRectLayerTest, OpacityInheritancePainting) {
context->subtree_can_inherit_opacity = false;
opacity_layer->Preroll(context, SkMatrix::I());
EXPECT_TRUE(opacity_layer->children_can_accept_opacity());
#ifndef SUPPORT_FRACTIONAL_TRANSLATION
auto opacity_integer_transform = SkM44::Translate(offset.fX, offset.fY);
#endif
DisplayListBuilder expected_builder;
/* OpacityLayer::Paint() */ {
expected_builder.save();
@@ -453,8 +454,9 @@ TEST_F(ClipRectLayerTest, OpacityInheritanceSaveLayerPainting) {
context->subtree_can_inherit_opacity = false;
opacity_layer->Preroll(context, SkMatrix::I());
EXPECT_TRUE(opacity_layer->children_can_accept_opacity());
#ifndef SUPPORT_FRACTIONAL_TRANSLATION
auto opacity_integer_transform = SkM44::Translate(offset.fX, offset.fY);
#endif
DisplayListBuilder expected_builder;
/* OpacityLayer::Paint() */ {
expected_builder.save();

View File

@@ -392,7 +392,9 @@ TEST_F(ClipRRectLayerTest, OpacityInheritancePainting) {
opacity_layer->Preroll(context, SkMatrix::I());
EXPECT_TRUE(opacity_layer->children_can_accept_opacity());
#ifndef SUPPORT_FRACTIONAL_TRANSLATION
auto opacity_integer_transform = SkM44::Translate(offset.fX, offset.fY);
#endif
DisplayListBuilder expected_builder;
/* OpacityLayer::Paint() */ {
expected_builder.save();
@@ -462,7 +464,9 @@ TEST_F(ClipRRectLayerTest, OpacityInheritanceSaveLayerPainting) {
opacity_layer->Preroll(context, SkMatrix::I());
EXPECT_TRUE(opacity_layer->children_can_accept_opacity());
#ifndef SUPPORT_FRACTIONAL_TRANSLATION
auto opacity_integer_transform = SkM44::Translate(offset.fX, offset.fY);
#endif
DisplayListBuilder expected_builder;
/* OpacityLayer::Paint() */ {
expected_builder.save();

View File

@@ -351,8 +351,10 @@ TEST_F(ColorFilterLayerTest, OpacityInheritance) {
opacity_layer->Preroll(context, SkMatrix::I());
EXPECT_TRUE(opacity_layer->children_can_accept_opacity());
#ifndef SUPPORT_FRACTIONAL_TRANSLATION
auto opacity_integer_transform = RasterCache::GetIntegralTransCTM(
SkMatrix::Translate(offset.fX, offset.fY));
#endif
DisplayListBuilder expected_builder;
/* opacity_layer::Paint() */ {
expected_builder.save();

View File

@@ -141,8 +141,10 @@ TEST_F(DisplayListLayerTest, SimpleDisplayListOpacityInheritance) {
RasterCache::GetIntegralTransCTM(SkMatrix::Translate(opacity_offset));
SkMatrix layer_offset_matrix = opacity_integral_matrix;
layer_offset_matrix.postTranslate(layer_offset.fX, layer_offset.fY);
#ifndef SUPPORT_FRACTIONAL_TRANSLATION
auto layer_offset_integral_matrix =
RasterCache::GetIntegralTransCTM(layer_offset_matrix);
#endif
DisplayListBuilder expected_builder;
/* opacity_layer::Paint() */ {
expected_builder.save();
@@ -214,8 +216,10 @@ TEST_F(DisplayListLayerTest, IncompatibleDisplayListOpacityInheritance) {
auto save_layer_bounds =
display_list_bounds.makeOffset(layer_offset.fX, layer_offset.fY);
save_layer_bounds.roundOut(&save_layer_bounds);
#ifndef SUPPORT_FRACTIONAL_TRANSLATION
auto opacity_integral_matrix =
RasterCache::GetIntegralTransCTM(SkMatrix::Translate(opacity_offset));
#endif
SkMatrix layer_offset_matrix = opacity_integral_matrix;
layer_offset_matrix.postTranslate(layer_offset.fX, layer_offset.fY);
auto layer_offset_integral_matrix =

View File

@@ -401,8 +401,10 @@ TEST_F(ImageFilterLayerTest, OpacityInheritance) {
opacity_layer->Preroll(context, SkMatrix::I());
EXPECT_TRUE(opacity_layer->children_can_accept_opacity());
#ifndef SUPPORT_FRACTIONAL_TRANSLATION
auto opacity_integer_transform = RasterCache::GetIntegralTransCTM(
SkMatrix::Translate(offset.fX, offset.fY));
#endif
auto dl_image_filter = DlImageFilter::From(layer_filter);
DisplayListBuilder expected_builder;
/* opacity_layer::Paint() */ {

View File

@@ -343,7 +343,9 @@ TEST_F(ShaderMaskLayerTest, OpacityInheritance) {
opacity_layer->Preroll(context, SkMatrix::I());
EXPECT_TRUE(opacity_layer->children_can_accept_opacity());
#ifndef SUPPORT_FRACTIONAL_TRANSLATION
auto opacity_integer_transform = SkM44::Translate(offset.fX, offset.fY);
#endif
DisplayListBuilder expected_builder;
/* OpacityLayer::Paint() */ {
expected_builder.save();

View File

@@ -311,7 +311,9 @@ TEST_F(TransformLayerTest, OpacityInheritancePainting) {
opacity_layer->Preroll(context, SkMatrix::I());
EXPECT_TRUE(opacity_layer->children_can_accept_opacity());
#ifndef SUPPORT_FRACTIONAL_TRANSLATION
auto opacity_integer_transform = SkM44::Translate(offset.fX, offset.fY);
#endif
DisplayListBuilder expected_builder;
/* opacity_layer paint */ {
expected_builder.save();