@@ -105,7 +105,7 @@ static std::optional<SkBitmap> CreateAtlasBitmap(const GlyphAtlas& atlas,
105
105
size_t atlas_size) {
106
106
TRACE_EVENT0 (" impeller" , __FUNCTION__);
107
107
SkBitmap bitmap;
108
- auto image_info = SkImageInfo::MakeN32Premul (atlas_size, atlas_size);
108
+ auto image_info = SkImageInfo::MakeA8 (atlas_size, atlas_size);
109
109
if (!bitmap.tryAllocPixels (image_info)) {
110
110
return std::nullopt;
111
111
}
@@ -131,28 +131,6 @@ static std::optional<SkBitmap> CreateAtlasBitmap(const GlyphAtlas& atlas,
131
131
132
132
auto glyph_color = SK_ColorWHITE;
133
133
134
- #if 0
135
- {
136
- glyph_color = SkColorSetARGB(255, //
137
- std::rand() % 255, //
138
- std::rand() % 255, //
139
- std::rand() % 255 //
140
- );
141
- SkPaint debug_paint;
142
- debug_paint.setARGB(255 / 4, //
143
- std::rand() % 255, //
144
- std::rand() % 255, //
145
- std::rand() % 255 //
146
- );
147
- canvas->drawRect(SkRect::MakeXYWH(location.origin.x, //
148
- location.origin.y, //
149
- location.size.width, //
150
- location.size.height //
151
- ),
152
- debug_paint);
153
- }
154
- #endif
155
-
156
134
SkPaint glyph_paint;
157
135
glyph_paint.setColor (glyph_color);
158
136
canvas->drawGlyphs (1u , // count
@@ -181,7 +159,7 @@ static std::shared_ptr<Texture> UploadGlyphTextureAtlas(
181
159
const auto & pixmap = bitmap.pixmap ();
182
160
183
161
TextureDescriptor texture_descriptor;
184
- texture_descriptor.format = PixelFormat::kR8G8B8A8UNormInt ;
162
+ texture_descriptor.format = PixelFormat::kR8UNormInt ;
185
163
texture_descriptor.size = ISize::MakeWH (atlas_size, atlas_size);
186
164
187
165
if (pixmap.rowBytes () * pixmap.height () !=
0 commit comments