Skip to content

Commit

Permalink
Revert "removed the filter again"
Browse files Browse the repository at this point in the history
This reverts commit 4ae7929.
  • Loading branch information
gaaclarke committed Jan 16, 2024
1 parent 4ae7929 commit ce3aeeb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 4 additions & 4 deletions impeller/aiks/aiks_unittests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3768,7 +3768,7 @@ TEST_P(AiksTest, GaussianBlurSetsMipCountOnPass) {
return true;
});

EXPECT_EQ(1, max_mip_count);
EXPECT_EQ(4, max_mip_count);
}

TEST_P(AiksTest, GaussianBlurAllocatesCorrectMipCountRenderTarget) {
Expand All @@ -3792,7 +3792,7 @@ TEST_P(AiksTest, GaussianBlurAllocatesCorrectMipCountRenderTarget) {
max_mip_count =
std::max(it->texture->GetTextureDescriptor().mip_count, max_mip_count);
}
EXPECT_EQ(max_mip_count, 1lu);
EXPECT_EQ(max_mip_count, 4lu);
}

TEST_P(AiksTest, GaussianBlurMipMapNestedLayer) {
Expand All @@ -3819,7 +3819,7 @@ TEST_P(AiksTest, GaussianBlurMipMapNestedLayer) {
max_mip_count =
std::max(it->texture->GetTextureDescriptor().mip_count, max_mip_count);
}
EXPECT_EQ(max_mip_count, 1lu);
EXPECT_EQ(max_mip_count, 4lu);
EXPECT_EQ(log_capture.str().find(GaussianBlurFilterContents::kNoMipsError),
std::string::npos);
}
Expand All @@ -3845,7 +3845,7 @@ TEST_P(AiksTest, GaussianBlurMipMapImageFilter) {
max_mip_count =
std::max(it->texture->GetTextureDescriptor().mip_count, max_mip_count);
}
EXPECT_EQ(max_mip_count, 1lu);
EXPECT_EQ(max_mip_count, 4lu);
EXPECT_EQ(log_capture.str().find(GaussianBlurFilterContents::kNoMipsError),
std::string::npos);
}
Expand Down
2 changes: 2 additions & 0 deletions impeller/entity/contents/filters/filter_contents.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ std::shared_ptr<FilterContents> FilterContents::MakeDirectionalGaussianBlur(
return blur;
}

#define IMPELLER_ENABLE_NEW_GAUSSIAN_FILTER 1

#ifdef IMPELLER_ENABLE_NEW_GAUSSIAN_FILTER
const int32_t FilterContents::kBlurFilterRequiredMipCount = 4;
#else
Expand Down

0 comments on commit ce3aeeb

Please sign in to comment.