diff --git a/impeller/typographer/backends/skia/typographer_context_skia.cc b/impeller/typographer/backends/skia/typographer_context_skia.cc index 35c39a96907d4..025fb8828c1a5 100644 --- a/impeller/typographer/backends/skia/typographer_context_skia.cc +++ b/impeller/typographer/backends/skia/typographer_context_skia.cc @@ -194,16 +194,12 @@ static ISize OptimumAtlasSizeForFontGlyphPairs( const std::vector& pairs, std::vector& glyph_positions, const std::shared_ptr& atlas_context, - GlyphAtlas::Type type, const ISize& max_texture_size) { - static constexpr auto kMinAtlasSize = 8u; - static constexpr auto kMinAlphaBitmapSize = 1024u; + static constexpr ISize kMinAtlasSize = ISize{4096, 1024}; TRACE_EVENT0("impeller", __FUNCTION__); - ISize current_size = type == GlyphAtlas::Type::kAlphaBitmap - ? ISize(kMinAlphaBitmapSize, kMinAlphaBitmapSize) - : ISize(kMinAtlasSize, kMinAtlasSize); + ISize current_size = kMinAtlasSize; size_t total_pairs = pairs.size() + 1; do { auto rect_packer = std::shared_ptr( @@ -443,7 +439,6 @@ std::shared_ptr TypographerContextSkia::CreateGlyphAtlas( font_glyph_pairs, // glyph_positions, // atlas_context, // - type, // context.GetResourceAllocator()->GetMaxTextureSizeSupported() // ); diff --git a/impeller/typographer/typographer_unittests.cc b/impeller/typographer/typographer_unittests.cc index e28877d0b862b..1b5003982da00 100644 --- a/impeller/typographer/typographer_unittests.cc +++ b/impeller/typographer/typographer_unittests.cc @@ -151,8 +151,8 @@ TEST_P(TypographerTest, GlyphAtlasWithOddUniqueGlyphSize) { ASSERT_NE(atlas, nullptr); ASSERT_NE(atlas->GetTexture(), nullptr); - ASSERT_EQ(atlas->GetTexture()->GetSize().width, - atlas->GetTexture()->GetSize().height); + EXPECT_EQ(atlas->GetTexture()->GetSize().width, 4096u); + EXPECT_EQ(atlas->GetTexture()->GetSize().height, 1024u); } TEST_P(TypographerTest, GlyphAtlasIsRecycledIfUnchanged) {