Skip to content

Commit 0b2c767

Browse files
[autofix.ci] apply automated fixes
1 parent f0a904b commit 0b2c767

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

demos/zephyr-common/slint-zephyr.cpp

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,8 @@ static ZephyrWindowAdapter *ZEPHYR_WINDOW = nullptr;
170170
#ifdef CONFIG_SHIELD_LCD_PAR_S035
171171
static constexpr std::size_t RENDER_BUFFER_WIDTH = 480;
172172
static constexpr std::size_t RENDER_BUFFER_HEIGHT = 64;
173-
alignas(8) static slint::platform::Rgb565Pixel render_buffer[RENDER_BUFFER_WIDTH * RENDER_BUFFER_HEIGHT];
173+
alignas(8) static slint::platform::Rgb565Pixel
174+
render_buffer[RENDER_BUFFER_WIDTH * RENDER_BUFFER_HEIGHT];
174175
// GT911 touch X-axis range in native orientation (320 pixels, used for invert-x transform)
175176
static constexpr int GT911_TOUCH_X_MAX = 319;
176177
#endif
@@ -300,24 +301,23 @@ void ZephyrWindowAdapter::maybe_redraw()
300301
line_desc.pitch = m_size.width;
301302

302303
m_renderer.render_by_line<slint::platform::Rgb565Pixel>(
303-
[this, &line_desc](size_t line_y, size_t first_x, size_t last_x,
304-
auto render_fn) {
305-
size_t width = last_x - first_x;
306-
render_fn(std::span<slint::platform::Rgb565Pixel>(m_buffer, width));
304+
[this, &line_desc](size_t line_y, size_t first_x, size_t last_x, auto render_fn) {
305+
size_t width = last_x - first_x;
306+
render_fn(std::span<slint::platform::Rgb565Pixel>(m_buffer, width));
307307

308-
line_desc.width = width;
309-
line_desc.height = 1;
310-
line_desc.buf_size = width * sizeof(slint::platform::Rgb565Pixel);
308+
line_desc.width = width;
309+
line_desc.height = 1;
310+
line_desc.buf_size = width * sizeof(slint::platform::Rgb565Pixel);
311311

312-
display_write(m_display, first_x, line_y, &line_desc, m_buffer);
313-
});
312+
display_write(m_display, first_x, line_y, &line_desc, m_buffer);
313+
});
314314
#else
315315
auto start = k_uptime_get();
316316
auto region = m_renderer.render(m_buffer, m_size.width);
317317
const auto slintRenderDelta = k_uptime_delta(&start);
318318
LOG_DBG("Rendering %d dirty regions:", std::ranges::size(region.rectangles()));
319319
for (auto [o, s] : region.rectangles()) {
320-
#ifndef CONFIG_SHIELD_RK055HDMIPI4MA0
320+
# ifndef CONFIG_SHIELD_RK055HDMIPI4MA0
321321
// Convert to big endian pixel data for Zephyr, unless we are using the RK055HDMIPI4MA0
322322
// shield. See is_supported_pixel_format above.
323323
for (int y = o.y; y < o.y + s.height; y++) {
@@ -328,9 +328,9 @@ void ZephyrWindowAdapter::maybe_redraw()
328328
}
329329
LOG_DBG(" - converted pixel data for x: %d y: %d w: %d h: %d", o.x, o.y, s.width,
330330
s.height);
331-
#endif
331+
# endif
332332

333-
#ifndef CONFIG_MCUX_ELCDIF_PXP
333+
# ifndef CONFIG_MCUX_ELCDIF_PXP
334334
m_buffer_descriptor.width = s.width;
335335
m_buffer_descriptor.height = s.height;
336336

@@ -340,18 +340,18 @@ void ZephyrWindowAdapter::maybe_redraw()
340340
LOG_WRN("display_write returned non-zero: %d", ret);
341341
}
342342
LOG_DBG(" - rendered x: %d y: %d w: %d h: %d", o.x, o.y, s.width, s.height);
343-
#endif
343+
# endif
344344
}
345345

346-
#ifdef CONFIG_MCUX_ELCDIF_PXP
346+
# ifdef CONFIG_MCUX_ELCDIF_PXP
347347
// The display driver cannot do partial updates when the PXP is using the DMA API.
348348
if (const auto ret =
349349
display_write(m_display, 0, 0, &m_buffer_descriptor, m_buffer.data()) != 0) {
350350
LOG_WRN("display_write returned non-zero: %d", ret);
351351
}
352352
LOG_DBG(" - rendered x: 0 y: 0 w: %d h: %d", m_buffer_descriptor.width,
353353
m_buffer_descriptor.height);
354-
#endif
354+
# endif
355355

356356
const auto displayWriteDelta = k_uptime_delta(&start);
357357
LOG_DBG(" - total: %lld ms, slint: %lld ms, write: %lld ms",

0 commit comments

Comments
 (0)