Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit d34694a

Browse files
author
jonahwilliams
committed
disable blit for OpenGLES.
1 parent a569767 commit d34694a

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

impeller/typographer/backends/skia/typographer_context_skia.cc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,10 +400,14 @@ std::shared_ptr<GlyphAtlas> TypographerContextSkia::CreateGlyphAtlas(
400400
context.GetResourceAllocator()->GetMaxTextureSizeSupported().height;
401401

402402
// IF the current atlas size is as big as it can get, then "GC" and create an
403-
// atlas with only the required glyphs.
403+
// atlas with only the required glyphs. OpenGLES cannot reliably perform the
404+
// blit required here, as 1) it requires attaching textures as read and write
405+
// framebuffers which has substantially smaller size limits that max textures
406+
// and 2) is missing a GLES 2.0 implementation and cap check.
404407
bool blit_old_atlas = true;
405408
std::shared_ptr<GlyphAtlas> new_atlas = last_atlas;
406-
if (atlas_context->GetAtlasSize().height >= max_texture_height) {
409+
if (atlas_context->GetAtlasSize().height >= max_texture_height ||
410+
context.GetBackendType() == Context::BackendType::kOpenGLES) {
407411
blit_old_atlas = false;
408412
first_missing_index = 0;
409413
glyph_positions.clear();

impeller/typographer/typographer_unittests.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,10 @@ TEST(TypographerTest, RectanglePackerFillsRows) {
347347
}
348348

349349
TEST_P(TypographerTest, GlyphAtlasTextureWillGrowTilMaxTextureSize) {
350+
if (GetBackend() == PlaygroundBackend::kOpenGLES) {
351+
GTEST_SKIP() << "Atlas growth isn't supported for OpenGLES currently.";
352+
}
353+
350354
auto host_buffer = HostBuffer::Create(GetContext()->GetResourceAllocator());
351355
auto context = TypographerContextSkia::Make();
352356
auto atlas_context =

0 commit comments

Comments
 (0)