summaryrefslogtreecommitdiff
path: root/firmware/drivers/lcd-16bit-common.c (follow)
Commit message (Collapse)AuthorAge
* Fix dangerous castsAmaury Pouly2017-02-04
| | | | | | | | | On Windows 64-bit, the size of long is 32-bit, thus any pointer to long cast is not valid. In any case, one should use intptr_t and ptrdiff_t when casting to integers. This commit attempts to fix all instances reported by GCC. When relevant, I replaced code by the macros PTR_ADD, ALIGN_UP from system.h Change-Id: I2273b0e8465d3c4689824717ed5afa5ed238a2dc
* lcd-16bit: Split out some functions to lcd-color-common.cThomas Martitz2014-06-21
| | | | | | | An upcoming lcd-24bit.c driver will re-use a lot of code from the 16bit drivers, so prepare for that. Change-Id: I7bc7f6b992e5e3f4e0a0aa54dc08103ebb05315f
* lcd-16bit: Remove {lss,lse,lst}_pattern fields from struct viewport.Thomas Martitz2014-01-07
| | | | | | | These where used for line styling during scrolling, which is now done in apps/, The viewport struct doesn't need to record these anymore. Change-Id: I810d9dcb2644b00a798c6e75acab69c74a78e77f
* lcd-16bit: Move lcd_gradient_fillrect/_part() to lcd-16bit-common.c.Thomas Martitz2014-01-07
| | | | Change-Id: I6b2d2ba73464610556cfd9ecec52fc62adb007c7
* lcd: Fix certain drawmode combinations.Thomas Martitz2014-01-05
| | | | | | | | Some seldomly used drawmode combinations did not work in conjunction with alpha bitmaps and backdrops. Now all should work (see comment added) by using more bits. Change-Id: I2bc96ecf471fa8c1a608a321a235b9c8527b3dc5
* scroll_engine: Rename scroll_stop* functions to be more consistent with the ↵Thomas Martitz2013-12-14
| | | | | | lcd api. Change-Id: I8ada10b96bfb628cca0331689e8b936ae47c7e1c
* lcd-*: Merge common viewport operations into lcd-bitmap-common.cThomas Martitz2013-12-14
| | | | Change-Id: Ibec2d039ac0ba1214c9bd1b667bc8a9538a0d3d7
* bitmap drawing: Support alpha blend if image over the framebuffer contents.Thomas Martitz2013-02-12
| | | | | | | | If DRMODE_FG now the alpha channel in bitmaps can be used to draw the bitmap over the framebuffer, so that e.g. a line selector isn't cleared for for transparent bitmap pixels. Change-Id: I09d59a09d2f3c90450a0fe2b83c6c59d757b686b
* bitmap drawing: use temp vars to help gcc opmize loops.Thomas Martitz2013-02-12
| | | | | | | By saving current_vp fields into temp vars just before the loop gcc can put them into registers. This yields ~15% speedup for drawing anti-aliased fonts. Change-Id: I4c0c9f5ff7a7f084e2eb08c4ed874176b1f9832c
* bitmap drawing: Use extra bit in mask to avoid nested if() in switch-cases.Thomas Martitz2013-02-12
| | | | | | Speeds up alpha bitmap drawing by up to 10%. mono bitmap drawing is also a tiny bit faster. Change-Id: I5a9379740c1a0091de9c621aabbe57d767ce2905
* bitmap drawing: Negate alpha channel to match alpha information format of ↵Thomas Martitz2013-02-12
| | | | | | | | | | font files. The comment about the format was actually incorrect. The alpha information is now negated during conversion to native format, according to the corrected comment. Change-Id: Ifdb9ffdf9b55e39e64983eec2d9d60339e570bd9
* Fix a drawing bug where rectangles stop drawing too early.Michael Sevakis2012-05-19
| | | | | | | | As far as I can say only one file is affected. The loops needs to go one more time since the end pointer is on the last pixel, not beyond it. Change-Id: Ie629138f8399b927bef7bad3847ef42db37e2fed
* Remove left-over debug statement (oops).Thomas Martitz2012-03-20
| | | | Change-Id: Ic672ad77bd9e30285f4bd95275a170f8ec75869b
* lcd_fillrect(): Unify 16bit implementations (move to 16bit-common.c)Thomas Martitz2012-03-20
| | | | Change-Id: I457ea9fcb67869fdac7f1201a059a362b087e908
* Refactor lcd_clear_viewport().Thomas Martitz2012-03-20
| | | | | | | * Unify 16bit implementaitons (move to 16bit-common.c). * Add viewport clipping (within #ifdef HAVE_VIEWPORT_CLIP) like other lcd_* functions have. Change-Id: I4e96b2efdb94d2f7bc5bcdb710554117989579ec
* lcd drivers: Convert lcd_[remote_]framebuffer to a pointerJonathan Gordon2012-02-28
| | | | | | | | | | Change all lcd drivers to using a pointer to the static framebuffer instead of directly accessing the static array. This will let us later do fun things like dynamic framebuffer sizes (RaaA) or ability to use different buffers for different layers (dynamic skin backdrops!) Change-Id: I0a4d58a9d7b55e6c932131b929e5d4c9f9414b06
* Fix incomplete comment.Thomas Martitz2012-01-22
| | | | Change-Id: I1874b4e64b3ae19689a0230f10ea623a4d0d1dea
* Coldfire: Fix alpha bitmap drawing from messing up the emac status register.Michael Sevakis2012-01-05
| | | | | | | | | It failed to restore macsr to the expected default (FRAC/SAT) which caused DSP functions like tone control filter calculation to fail (resulting in noise). The FFT plugin was also affected. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31589 a1c6a512-1295-4272-9138-f99709370657
* lcd_blit_yuv(): don't use weak attribute when building for windowsRafaël Carré2011-12-09
| | | | | | | | | current gcc/binutils don't support weak attribute correctly see http://sourceware.org/bugzilla/show_bug.cgi?id=9687 fix FS#12427 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31193 a1c6a512-1295-4272-9138-f99709370657
* lcd-16bit: move lcd_bitmap and lcd_bitmap_transparent to common codeRafaël Carré2011-12-03
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31131 a1c6a512-1295-4272-9138-f99709370657
* lcd-16bit: move common code to lcd-16bit-common.cRafaël Carré2011-12-03
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31130 a1c6a512-1295-4272-9138-f99709370657
* lcd_blit_yuv: move to lcd-16bit-common.cRafaël Carré2011-12-03
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31129 a1c6a512-1295-4272-9138-f99709370657
* Document the internal alpha channel format better, and fixes for 32bit alpha ↵Thomas Martitz2011-11-11
| | | | | | | | | bitmaps. For images, rows need to be even (this is not true for anti-aliased font files). Fix stride and size calculation. This makes images that have odd pixel rows display properly and fixes buffer overflows. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30966 a1c6a512-1295-4272-9138-f99709370657
* Support for transparency in 32bit bitmaps on color targets.Thomas Martitz2011-11-08
| | | | | | | | | This uses the alpha blending capabilities introduced with anti-aliased fonts to draw bitmaps with transparency information. The bmp loader is extended to read this information (pass FORMAT_TRANSPARENT in format). The alpha information will be used when drawing the bitmap. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30937 a1c6a512-1295-4272-9138-f99709370657
* Add new lcd_bmp and lcd_bmp_part APIs.Thomas Martitz2011-11-08
| | | | | | | | This new APIs wrap around lcd_[mono|transparent]_bitmap/_part calls and handle all kinds bitmaps. The intended use is to draw bitmaps that come from read_bmp_fd/_file. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30936 a1c6a512-1295-4272-9138-f99709370657
* Merge lcd_{alpha,mono}_bitmap_part() for both lcd-16bit. Add small loop ↵Thomas Martitz2011-03-08
optimizations too. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29541 a1c6a512-1295-4272-9138-f99709370657