mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-10-23 00:09:53 +00:00
fix(core): remove unnecessary framebuffer copying
[no changelog]
This commit is contained in:
parent
e01fda59a9
commit
51b703cb1a
@ -166,10 +166,12 @@ display_fb_info_t display_get_frame_buffer(void) {
|
|||||||
if (state == FB_STATE_EMPTY) {
|
if (state == FB_STATE_EMPTY) {
|
||||||
// First use of this buffer, copy the previous buffer into it
|
// First use of this buffer, copy the previous buffer into it
|
||||||
#if (FRAME_BUFFER_COUNT > 1)
|
#if (FRAME_BUFFER_COUNT > 1)
|
||||||
|
#ifndef NEW_RENDERING
|
||||||
uint8_t *src = get_fb_ptr((FRAME_BUFFER_COUNT + drv->queue.wix - 1) %
|
uint8_t *src = get_fb_ptr((FRAME_BUFFER_COUNT + drv->queue.wix - 1) %
|
||||||
FRAME_BUFFER_COUNT);
|
FRAME_BUFFER_COUNT);
|
||||||
uint8_t *dst = get_fb_ptr(drv->queue.wix);
|
uint8_t *dst = get_fb_ptr(drv->queue.wix);
|
||||||
memcpy(dst, src, PHYSICAL_FRAME_BUFFER_SIZE);
|
memcpy(dst, src, PHYSICAL_FRAME_BUFFER_SIZE);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user