Skip to content
Snippets Groups Projects
Commit d50385e8 authored by Stefan Haun's avatar Stefan Haun
Browse files

Check for BPP in display.c:compositor()

parent 6d0ca58b
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,7 @@
#include "FreeRTOS.h"
#include "LCD_Driver.h"
#include "epicardium.h"
#include "framebuffer.h"
#include "gfx.h"
#include "gpio.h"
#include "task.h"
......@@ -181,6 +182,15 @@ int epic_disp_circ(
void compositor()
{
/* Check that BPP is 2 for everything */
const size_t bpp_app = fb_bytes_per_pixel(application_screen.fb);
const size_t bpp_ovl = fb_bytes_per_pixel(overlay_screen.fb);
const size_t bpp_disp = fb_bytes_per_pixel(overlay_screen.fb);
if ((bpp_app != 2) || (bpp_ovl != 2) || (bpp_disp != 2))
return;
/* Compose overlay on application */
for (int y = 0; y < display_screen.height; y++) {
for (int x = 0; x < display_screen.width; x++) {
uint8_t *overlay_pixel =
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment