mirror of
https://github.com/wez/wezterm.git
synced 2024-11-28 01:06:37 +03:00
parent
87350bde4d
commit
d2419fb99e
@ -152,12 +152,9 @@ impl FreeTypeRasterizer {
|
|||||||
let src_offset = y * pitch as usize;
|
let src_offset = y * pitch as usize;
|
||||||
let dest_offset = y * width * 4;
|
let dest_offset = y * width * 4;
|
||||||
for x in 0..width {
|
for x in 0..width {
|
||||||
// Note: it is unclear whether the LCD data format
|
let red = data[src_offset + (x * 3)];
|
||||||
// is BGR or RGB. I'm using RGB here because the
|
|
||||||
// antialiasing in other apps seems to do this.
|
|
||||||
let blue = data[src_offset + (x * 3)];
|
|
||||||
let green = data[src_offset + (x * 3) + 1];
|
let green = data[src_offset + (x * 3) + 1];
|
||||||
let red = data[src_offset + (x * 3) + 2];
|
let blue = data[src_offset + (x * 3) + 2];
|
||||||
let alpha = red.max(green).max(blue);
|
let alpha = red.max(green).max(blue);
|
||||||
|
|
||||||
// Texture is SRGBA, which in OpenGL means
|
// Texture is SRGBA, which in OpenGL means
|
||||||
|
Loading…
Reference in New Issue
Block a user