diff options
Diffstat (limited to 'firmware/drivers/lcd-16bit-common.c')
-rw-r--r-- | firmware/drivers/lcd-16bit-common.c | 103 |
1 files changed, 0 insertions, 103 deletions
diff --git a/firmware/drivers/lcd-16bit-common.c b/firmware/drivers/lcd-16bit-common.c index 1b84847929..523354d5d2 100644 --- a/firmware/drivers/lcd-16bit-common.c +++ b/firmware/drivers/lcd-16bit-common.c | |||
@@ -40,30 +40,6 @@ void lcd_clear_viewport(void) | |||
40 | width = lcd_current_viewport->width; | 40 | width = lcd_current_viewport->width; |
41 | height = lcd_current_viewport->height; | 41 | height = lcd_current_viewport->height; |
42 | 42 | ||
43 | #if defined(HAVE_VIEWPORT_CLIP) | ||
44 | /********************* Viewport on screen clipping ********************/ | ||
45 | /* nothing to draw? */ | ||
46 | if ((x >= LCD_WIDTH) || (y >= LCD_HEIGHT) | ||
47 | || (x + width <= 0) || (y + height <= 0)) | ||
48 | return; | ||
49 | |||
50 | /* clip image in viewport in screen */ | ||
51 | if (x < 0) | ||
52 | { | ||
53 | width += x; | ||
54 | x = 0; | ||
55 | } | ||
56 | if (y < 0) | ||
57 | { | ||
58 | height += y; | ||
59 | y = 0; | ||
60 | } | ||
61 | if (x + width > LCD_WIDTH) | ||
62 | width = LCD_WIDTH - x; | ||
63 | if (y + height > LCD_HEIGHT) | ||
64 | height = LCD_HEIGHT - y; | ||
65 | #endif | ||
66 | |||
67 | len = STRIDE_MAIN(width, height); | 43 | len = STRIDE_MAIN(width, height); |
68 | step = STRIDE_MAIN(ROW_INC, COL_INC); | 44 | step = STRIDE_MAIN(ROW_INC, COL_INC); |
69 | 45 | ||
@@ -182,30 +158,6 @@ void lcd_fillrect(int x, int y, int width, int height) | |||
182 | x += lcd_current_viewport->x; | 158 | x += lcd_current_viewport->x; |
183 | y += lcd_current_viewport->y; | 159 | y += lcd_current_viewport->y; |
184 | 160 | ||
185 | #if defined(HAVE_VIEWPORT_CLIP) | ||
186 | /********************* Viewport on screen clipping ********************/ | ||
187 | /* nothing to draw? */ | ||
188 | if ((x >= LCD_WIDTH) || (y >= LCD_HEIGHT) | ||
189 | || (x + width <= 0) || (y + height <= 0)) | ||
190 | return; | ||
191 | |||
192 | /* clip image in viewport in screen */ | ||
193 | if (x < 0) | ||
194 | { | ||
195 | width += x; | ||
196 | x = 0; | ||
197 | } | ||
198 | if (y < 0) | ||
199 | { | ||
200 | height += y; | ||
201 | y = 0; | ||
202 | } | ||
203 | if (x + width > LCD_WIDTH) | ||
204 | width = LCD_WIDTH - x; | ||
205 | if (y + height > LCD_HEIGHT) | ||
206 | height = LCD_HEIGHT - y; | ||
207 | #endif | ||
208 | |||
209 | /* drawmode and optimisation */ | 161 | /* drawmode and optimisation */ |
210 | if (lcd_current_viewport->drawmode & DRMODE_INVERSEVID) | 162 | if (lcd_current_viewport->drawmode & DRMODE_INVERSEVID) |
211 | { | 163 | { |
@@ -310,32 +262,6 @@ void ICODE_ATTR lcd_mono_bitmap_part(const unsigned char *src, int src_x, | |||
310 | x += lcd_current_viewport->x; | 262 | x += lcd_current_viewport->x; |
311 | y += lcd_current_viewport->y; | 263 | y += lcd_current_viewport->y; |
312 | 264 | ||
313 | #if defined(HAVE_VIEWPORT_CLIP) | ||
314 | /********************* Viewport on screen clipping ********************/ | ||
315 | /* nothing to draw? */ | ||
316 | if ((x >= LCD_WIDTH) || (y >= LCD_HEIGHT) | ||
317 | || (x + width <= 0) || (y + height <= 0)) | ||
318 | return; | ||
319 | |||
320 | /* clip image in viewport in screen */ | ||
321 | if (x < 0) | ||
322 | { | ||
323 | width += x; | ||
324 | src_x -= x; | ||
325 | x = 0; | ||
326 | } | ||
327 | if (y < 0) | ||
328 | { | ||
329 | height += y; | ||
330 | src_y -= y; | ||
331 | y = 0; | ||
332 | } | ||
333 | if (x + width > LCD_WIDTH) | ||
334 | width = LCD_WIDTH - x; | ||
335 | if (y + height > LCD_HEIGHT) | ||
336 | height = LCD_HEIGHT - y; | ||
337 | #endif | ||
338 | |||
339 | /* move starting point */ | 265 | /* move starting point */ |
340 | src += stride * (src_y >> 3) + src_x; | 266 | src += stride * (src_y >> 3) + src_x; |
341 | src_y &= 7; | 267 | src_y &= 7; |
@@ -568,35 +494,6 @@ static void ICODE_ATTR lcd_alpha_bitmap_part_mix(const fb_data* image, | |||
568 | x += lcd_current_viewport->x; | 494 | x += lcd_current_viewport->x; |
569 | y += lcd_current_viewport->y; | 495 | y += lcd_current_viewport->y; |
570 | 496 | ||
571 | #if defined(HAVE_VIEWPORT_CLIP) | ||
572 | /********************* Viewport on screen clipping ********************/ | ||
573 | /* nothing to draw? */ | ||
574 | if ((x >= LCD_WIDTH) || (y >= LCD_HEIGHT) | ||
575 | || (x + width <= 0) || (y + height <= 0)) | ||
576 | { | ||
577 | BLEND_FINISH; | ||
578 | return; | ||
579 | } | ||
580 | |||
581 | /* clip image in viewport in screen */ | ||
582 | if (x < 0) | ||
583 | { | ||
584 | width += x; | ||
585 | src_x -= x; | ||
586 | x = 0; | ||
587 | } | ||
588 | if (y < 0) | ||
589 | { | ||
590 | height += y; | ||
591 | src_y -= y; | ||
592 | y = 0; | ||
593 | } | ||
594 | if (x + width > LCD_WIDTH) | ||
595 | width = LCD_WIDTH - x; | ||
596 | if (y + height > LCD_HEIGHT) | ||
597 | height = LCD_HEIGHT - y; | ||
598 | #endif | ||
599 | |||
600 | /* the following drawmode combinations are possible: | 497 | /* the following drawmode combinations are possible: |
601 | * 1) COMPLEMENT: just negates the framebuffer contents | 498 | * 1) COMPLEMENT: just negates the framebuffer contents |
602 | * 2) BG and BG+backdrop: draws _only_ background pixels with either | 499 | * 2) BG and BG+backdrop: draws _only_ background pixels with either |