Remove bswap into transparent rendering

replace/d3ac04cc7e423bb2e4ed0ec729f02e875069d8a6
Niccolò Izzo 2021-01-31 13:30:18 +01:00
rodzic d60c75d9e3
commit 81461669fe
1 zmienionych plików z 1 dodań i 2 usunięć

Wyświetl plik

@ -166,8 +166,7 @@ inline void gfx_setPixel(point_t pos, color_t color)
if (color.alpha < 255) {
uint8_t alpha = color.alpha;
rgb565_t new_pixel = _true2highColor(color);
uint16_t raw_pixel = __builtin_bswap16(
*((uint16_t *)buf + pos.x + pos.y*SCREEN_WIDTH));
uint16_t raw_pixel = *((uint16_t *)buf + pos.x + pos.y*SCREEN_WIDTH);
rgb565_t old_pixel = *((rgb565_t*) &raw_pixel);
rgb565_t pixel = {((255-alpha)*old_pixel.b+alpha*new_pixel.b)/255,
((255-alpha)*old_pixel.g+alpha*new_pixel.g)/255,