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

Commit e4a8b3e

Browse files
author
jonahwilliams
committed
++
1 parent b03be9b commit e4a8b3e

File tree

2 files changed

+32
-5
lines changed

2 files changed

+32
-5
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Copyright 2013 The Flutter Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
#include <impeller/texture.glsl>
6+
#include <impeller/types.glsl>
7+
8+
uniform FrameInfo {
9+
f16vec2 center;
10+
}
11+
frame_info;
12+
13+
layout(std430) writeonly buffer GeometryData {
14+
vec2 geometry[];
15+
}
16+
geometry_data;
17+
18+
in f16vec2 p1;
19+
in f16vec2 p2;
20+
21+
void main() {
22+
int bufer_offset = gl_VertexIndex * 3;
23+
24+
geometry_data[bufer_offset++] = p1;
25+
geometry_data[bufer_offset++] = p2;
26+
geometry_data[bufer_offset++] = vec2(frame_info.center);
27+
}

impeller/typographer/backends/skia/text_render_context_skia.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -252,11 +252,11 @@ static std::shared_ptr<SkBitmap> CreateAtlasBitmap(const GlyphAtlas& atlas,
252252
return nullptr;
253253
}
254254

255-
atlas.IterateGlyphs([canvas](const FontGlyphPair& font_glyph,
256-
const Rect& location) -> bool {
257-
DrawGlyph(canvas, font_glyph, location);
258-
return true;
259-
});
255+
atlas.IterateGlyphs(
256+
[canvas](const FontGlyphPair& font_glyph, const Rect& location) -> bool {
257+
DrawGlyph(canvas, font_glyph, location);
258+
return true;
259+
});
260260

261261
return bitmap;
262262
}

0 commit comments

Comments
 (0)