summaryrefslogtreecommitdiff
path: root/firmware/drivers/lcd-16bit.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_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
* 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
* lcd_blit_yuv: move from sdl driver to lcd16bit-commonRafaël Carré2011-12-03
| | | | | | Declare as weak, so it can be overridden by targets git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31127 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
* Add viewport clipping to lcd_alpha_bitmap_part as lcd_mono_bitmap_part also has.Thomas Martitz2011-03-05
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29526 a1c6a512-1295-4272-9138-f99709370657
* Anti-Aliased Fonts support.Thomas Martitz2011-03-05
| | | | | | | | | | | | | This enables Rockbox to render anti-aliased fonts using an alpha blending method. The input font bitmaps are 4bit, i.e. 4x larger, but the metadata size stays the same. A tool, convttf, for converting ttf fonts directly to the Rockbox fnt format is provided. It has a useful help output, but the parameter that works best is -c1 or -c2 (2 for larger font sizes). Flyspray: FS#8961 Author: Initial work by Jonas Hurrelmann, further work by Fred Bauer, Andrew Mahone, Teruaki Kawashima and myself. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29523 a1c6a512-1295-4272-9138-f99709370657
* Move memset6() declaration to string-extra.h, kills a warning compiling for ↵Thomas Martitz2010-08-12
| | | | | | android since it ships a memory.h. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27789 a1c6a512-1295-4272-9138-f99709370657
* Comment out lcd_drawline() DEBUGF messages which show in various simulatorsTomer Shalev2010-02-20
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24784 a1c6a512-1295-4272-9138-f99709370657
* Add optional viewport clipping, can be enabled with HAVE_VIEWPORT_CLIP. A ↵Karl Kurbjun2009-11-07
| | | | | | simulator check is also added to set_viewport that will show an error/note when DEBUGF is enabled. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23551 a1c6a512-1295-4272-9138-f99709370657
* Save one branch for archs without conditional execution (e.g. coldfire).Jens Arnold2009-10-26
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23355 a1c6a512-1295-4272-9138-f99709370657
* Make current_vp static and importings from Gigabeat F/X/S lcd drivers as ↵Thomas Martitz2009-10-26
| | | | | | they don't need it anymore. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23354 a1c6a512-1295-4272-9138-f99709370657
* Color targets: Ported assembler optimised transparent bitmap drawing from ↵Jens Arnold2009-10-26
| | | | | | Gigabeat S/F/X to all ARM targets (~23..40% speedup). * C optimised transparent bitmap drawing for non-ARM targets and sims. * Use the more compact boundary checking for non-transparent native bitmap drawing as well. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23353 a1c6a512-1295-4272-9138-f99709370657
* Convert lcd_activation callbacks to use the event system to allow for ↵Thomas Martitz2009-10-20
| | | | | | | | | multiple parallel callbacks (for custom statusbar). Increase maximum event count as we need more (I actually had a report about it during custom statusbar testing). Removed corresponding functions from the core and plugin api. Bump min version and sort. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23302 a1c6a512-1295-4272-9138-f99709370657
* LCD bitmap driver code consolidation from FS#4817:Andrew Mahone2009-08-13
| | | | | | | | | Move text-drawing code into firmware-drivers/lcd-bitmap-common.c, included by the various driver files. Add new static function LCDFN(putsxyofs_style) to draw styled text, and use it in both LCDFN(puts_style_offset) and LCDFN(scroll_fn). Merge lcd_gradient_rect functions, with new function containing simplified code for drawing one line of a multi-line gradient. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22289 a1c6a512-1295-4272-9138-f99709370657
* FS#10080Nils Wallménius2009-07-14
| | | | | | | | | | * Move strncpy() from core to the pluginlib * Introduce strlcpy() and use that instead in most places (use memcpy in a few) in core and some plugins * Drop strncpy() from the codec api as no codec used it * Bump codec and plugin api versions git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21863 a1c6a512-1295-4272-9138-f99709370657
* Speed up mono bitmap drawing on horizontally packed greyscale targets ↵Jens Arnold2009-06-01
| | | | | | (greyscale iPods). Average speedup is 80% on PP5002, and 55% on PP502x. * Simplify mono bitmap drawing in the 16 bit driver and the greylib a bit, also giving a slight speedup (3% on PP502x, 1.5% on coldfire). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21163 a1c6a512-1295-4272-9138-f99709370657
* Rework lcd_enabled and lcd_set/call_enable hookThomas Martitz2009-03-17
| | | | | | | a) lcd_enabled() is now lcd_active(), and is available for HAVE_LCD_SLEEP only targets (e.g. ipod video) too. It was depandent on HAVE_LCD_ENALE only before b) rename the hook accordingly, and implement the hook for other other targets too (e.g. the clip [the only mono target with lcd_enable/lcd_sleep yet, so the code is still in the lcd driver], ipod, fuze, c200) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20331 a1c6a512-1295-4272-9138-f99709370657
* Optimize hline, fillrect and mono bitmap drawing for chunky displays (16 bit ↵Jens Arnold2009-03-08
| | | | | | colour and greylib). Speeds up text rendering by 20..45% on colour coldfire, by 30..50% on colour ARM, and is noticeable in archos pictureflow. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20242 a1c6a512-1295-4272-9138-f99709370657
* Correct test to avoid drawing outside display, fixes a problem in sim with ↵Nils Wallménius2008-10-03
| | | | | | spacerocks, could possibly fix things on target too. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18691 a1c6a512-1295-4272-9138-f99709370657
* Colour targets: Revert an optimisation from almost 18 months ago that ↵Jens Arnold2008-06-29
| | | | | | actually turned out to slow down things. Speeds up mono bitmap drawing by ~15..60% depending on target and drawmode. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17876 a1c6a512-1295-4272-9138-f99709370657
* Updated our source code header to explicitly mention that we are GPL v2 orDaniel Stenberg2008-06-28
| | | | | | | | | later. We still need to hunt down snippets used that are not. 1324 modified files... http://www.rockbox.org/mail/archive/rockbox-dev-archive-2008-06/0060.shtml git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17847 a1c6a512-1295-4272-9138-f99709370657
* FS#9051 - remove LCD margins... use viewports if you need them...Jonathan Gordon2008-06-23
| | | | | | | | | | | NOTE to WPS people.... %m has been removed, but (i think) because of the other %m tags it wont fail if you try loading a wps with %m|..|, it will just be ignored. Also note that if the statusbar is enabled the default viewport is 8 pixels shorter than when its not, i.e (0,0) is really (0,8) if the statusbar is shown... I dont think this will be a major issue because almost no WPS show the bar and use bitmaps... text only WPS shouldnt be affected. Please report problem screens in http://forums.rockbox.org/index.php?topic=17358.0 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17763 a1c6a512-1295-4272-9138-f99709370657
* Targets with HAVE_LCD_ENABLE: Provide a means to receive notifications when ↵Michael Sevakis2008-05-28
| | | | | | the lcd is enabled and the image is refreshed so overlayed drawing can also be refreshed. Chiefly mpegplayer needs this so it can redraw the YUV data after the backlight is turned on while paused or when using 'Set Start Time'. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17640 a1c6a512-1295-4272-9138-f99709370657
* Make the transparent bitmaps work on Gigabeat S.Michael Sevakis2008-04-15
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17118 a1c6a512-1295-4272-9138-f99709370657
* LCD drivers: * Automatically optimise horizontal and vertical lines drawn ↵Jens Arnold2008-04-12
| | | | | | via _drawline(), with debug message to show possible optimisations in the caller. * Get rid of the extra ICODE function declarations by putting the attribute into the definition. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17081 a1c6a512-1295-4272-9138-f99709370657
* Make the lcd_gradient_* functions static - they're not exported in lcd.hDave Chapman2008-01-13
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16070 a1c6a512-1295-4272-9138-f99709370657
* Add the viewport functions to the screens API, including a new getfont() ↵Dave Chapman2008-01-08
| | | | | | function to return the font used by the current viewport. A change to the screens API makes the plugin API incompatible, so we bump version and sort. Also commit the test_viewports plugin (not built by default). This is some more of FS#8385. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16022 a1c6a512-1295-4272-9138-f99709370657
* Add viewport capabilities to all the LCD drivers, and adapt scrolling code. ↵Dave Chapman2008-01-07
| | | | | | This is the firmware/ part of FS#8385 - the changes to the WPS code still need more work and will be committed at a later date. NOTE: There are no user-visible changes with this commit - just the infrastructure. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16018 a1c6a512-1295-4272-9138-f99709370657
* Make the "current line" value in the gradient style code zero-based, and an ↵Nicolas Pennequin2007-12-06
| | | | | | attempt at more understandable names and better comments. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15886 a1c6a512-1295-4272-9138-f99709370657
* Accept FS#7901 by Akio Idehara: Fix gradient for scrolling lines when more ↵Nicolas Pennequin2007-11-19
| | | | | | than one line is selected git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15698 a1c6a512-1295-4272-9138-f99709370657
* Add some CACHEALIGN_* macros and a helper function to assist in aligning ↵Michael Sevakis2007-11-08
| | | | | | data and buffers on PortalPlayer processors to cache line boundaries. They're noops when PROC_NEED_CACHEALIGN isn't defined. Go safe and increase the value to 32 since I'm not sure yet if 16 is sufficient - changing that is a one-liner. Add helper to plugin API which will be needed shortly. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15523 a1c6a512-1295-4272-9138-f99709370657
* Bugfix: The solid colour and gradient selector no longer extends to the left ↵Jens Arnold2007-10-15
| | | | | | display margin when the text needs to scroll and the lcd margins are zeroed, e.g. overwriting the icon in the file browser when loading a file. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15115 a1c6a512-1295-4272-9138-f99709370657
* Save a few bytes in the line selector style handling code.Antoine Cellerier2007-09-30
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14927 a1c6a512-1295-4272-9138-f99709370657
* Make the gradient look better when more than one line is selected (running ↵Nicolas Pennequin2007-09-28
| | | | | | | | | time, ID3 info, cuesheet viewer...). I haven't found a solution for scrolling yet, so that won't look too good. The recording screen code needs a bit of adapting too, but I don't have a target to test on, so leave it for now. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14884 a1c6a512-1295-4272-9138-f99709370657
* Factor out the gradient drawing code. Should save some bytes and makes the ↵Nicolas Pennequin2007-09-28
| | | | | | code more readable. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14883 a1c6a512-1295-4272-9138-f99709370657
* Fix corrupted display of the gradient selector for scrolling lines in some ↵Nicolas Pennequin2007-09-27
| | | | | | colour configurations. Thanks to preglow for spotting. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14869 a1c6a512-1295-4272-9138-f99709370657
* FS#7808 by Tom Ross, Ken Fazzone and me, with help from Antoine Cellerier.Nicolas Pennequin2007-09-27
| | | | | | | | | Add two new line selector types: solid colour and gradient. Solid colour only uses the primary colour setting. The secondary colour setting is used for the gradient. Text colour for the selected item is also changeable. These new settings are a bit controversial so they may be removed later. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14868 a1c6a512-1295-4272-9138-f99709370657
* Merge the Gigabeat S branch back into trunk. Fingers crossed nothing breaks.Will Robertson2007-09-21
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14805 a1c6a512-1295-4272-9138-f99709370657
* Scroll on main and remote with a single thread. Change the way system ↵Michael Sevakis2007-07-28
| | | | | | messages are defined before running out is an issue (which requires a full update of rockbox on the player). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14035 a1c6a512-1295-4272-9138-f99709370657
* Hrm. Commit the other needed change too. :)Michael Sevakis2007-07-15
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13899 a1c6a512-1295-4272-9138-f99709370657
* Fix FS#7044 - if the color RGB(0,255,255) is in a bmp it will be replaced ↵Jonathan Gordon2007-07-14
| | | | | | with the current foreground colour git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13878 a1c6a512-1295-4272-9138-f99709370657
* Fix FS#7336 - scrolling lines don't stay coloured.Jonathan Gordon2007-06-22
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13682 a1c6a512-1295-4272-9138-f99709370657
* Give color targets the ability to display each LCD line a different color ↵Brandon Low2007-06-17
| | | | | | and use this newfangled ability to provide themable colored file types. See the comments on read_color_theme_file and the sample.colors file provided for how to use this. .colors files go in themes directory for now. This separate line color function should be trivial to add to menus and wpss. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13656 a1c6a512-1295-4272-9138-f99709370657
* More gigabeat LCD cleanup and completely remove the use of DMA for ↵Dave Chapman2007-05-15
| | | | | | lcd_update_rect() (this was accidentally disabled anyway by the previous commit). The DMA version of lcd_update_rect() managed 64fps, but the memcpy based implementation manages 264fps. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13393 a1c6a512-1295-4272-9138-f99709370657