LibWeb: Remove step to prepare glyphs texture in display list player

This was only used by old OpenGL GPU painter.
This commit is contained in:
Aliaksandr Kalenik 2024-07-24 16:15:13 +03:00 committed by Alexander Kalenik
parent 6160400ab7
commit a10576d016
Notes: github-actions[bot] 2024-07-24 15:50:16 +00:00
3 changed files with 0 additions and 24 deletions

View file

@ -80,25 +80,6 @@ void DisplayList::execute(DisplayListPlayer& executor)
{
executor.prepare_to_execute(m_corner_clip_max_depth);
if (executor.needs_prepare_glyphs_texture()) {
HashMap<Gfx::Font const*, HashTable<u32>> unique_glyphs;
for (auto& command_with_scroll_id : m_commands) {
auto& command = command_with_scroll_id.command;
if (command.has<DrawGlyphRun>()) {
auto scale = command.get<DrawGlyphRun>().scale;
auto const& font = command.get<DrawGlyphRun>().glyph_run->font();
auto scaled_font = font.with_size(font.point_size() * static_cast<float>(scale));
for (auto const& glyph_or_emoji : command.get<DrawGlyphRun>().glyph_run->glyphs()) {
if (glyph_or_emoji.has<Gfx::DrawGlyph>()) {
auto const& glyph = glyph_or_emoji.get<Gfx::DrawGlyph>();
unique_glyphs.ensure(scaled_font, [] { return HashTable<u32> {}; }).set(glyph.code_point);
}
}
}
}
executor.prepare_glyph_texture(unique_glyphs);
}
if (executor.needs_update_immutable_bitmap_texture_cache()) {
HashMap<u32, Gfx::ImmutableBitmap const*> immutable_bitmaps;
for (auto const& command_with_scroll_id : m_commands) {

View file

@ -66,8 +66,6 @@ public:
virtual void sample_under_corners(SampleUnderCorners const&) = 0;
virtual void blit_corner_clipping(BlitCornerClipping const&) = 0;
virtual bool would_be_fully_clipped_by_painter(Gfx::IntRect) const = 0;
virtual bool needs_prepare_glyphs_texture() const { return false; }
virtual void prepare_glyph_texture(HashMap<Gfx::Font const*, HashTable<u32>> const& unique_glyphs) = 0;
virtual void prepare_to_execute([[maybe_unused]] size_t corner_clip_max_depth) { }
virtual bool needs_update_immutable_bitmap_texture_cache() const = 0;
virtual void update_immutable_bitmap_texture_cache(HashMap<u32, Gfx::ImmutableBitmap const*>&) = 0;

View file

@ -65,9 +65,6 @@ public:
bool would_be_fully_clipped_by_painter(Gfx::IntRect) const override;
bool needs_prepare_glyphs_texture() const override { return false; }
void prepare_glyph_texture(HashMap<Gfx::Font const*, HashTable<u32>> const&) override {};
virtual void prepare_to_execute(size_t corner_clip_max_depth) override;
bool needs_update_immutable_bitmap_texture_cache() const override { return false; }