135 ColorBitness bitness,
bool big_endian,
int x_offset,
int y_offset,
int x_pad) {
143 Hub75ColorOrder color_order = Hub75ColorOrder::RGB;
148 format = Hub75PixelFormat::RGB565;
152#if LV_COLOR_DEPTH == 32
154 format = Hub75PixelFormat::RGB888_32;
160#elif LV_COLOR_DEPTH == 24
162 format = Hub75PixelFormat::RGB888;
166 ESP_LOGE(TAG,
"Unsupported LV_COLOR_DEPTH: %d", LV_COLOR_DEPTH);
171 format = Hub75PixelFormat::RGB888;
176 ESP_LOGE(TAG,
"Unsupported bitness: %d",
static_cast<int>(bitness));
181 const int stride_px = x_offset + w + x_pad;
182 const bool is_packed = (x_offset == 0 && x_pad == 0 && y_offset == 0);
186 driver_->draw_pixels(x_start, y_start, w,
h, ptr,
format, color_order, big_endian);
189 for (
int yy = 0; yy <
h; ++yy) {
190 const size_t row_offset = ((y_offset + yy) * stride_px + x_offset) * bytes_per_pixel;
191 const uint8_t *row_ptr = ptr + row_offset;
193 driver_->draw_pixels(x_start, y_start + yy, w, 1, row_ptr,
format, color_order, big_endian);