path: root/apps/gui/skin_engine/skin_engine.c
AgeCommit message (Collapse)AuthorFilesLines
2020-11-01Skin engine Onda Vx747William Wilgus1-1/+3
Fixing issues that existed before framebuf rewrite Fix swap issue Change-Id: I43e03b7aaf4591c1b6f88e3ba0730e279934c0df
2020-10-26LCD core move buf ptr and address look up function viewport structWilliam Wilgus1-1/+5
I'm currently running up against the limitations of the lcd_draw functions I want these functions to be able to be used on any size buffer not just buffers with a stride matching the underlying device [DONE] allow the framebuffer to be decoupled from the device framebuffer [DONE need examples] allow for some simple blit like transformations [DONE] remove the device framebuffer from the plugin api [DONE}ditto remote framebuffer [DONE] remove _viewport_get_framebuffer you can call struct *vp = lcd_set_viewport(NULL) and vp->buffer->fb_ptr while remote lcds may compile (and work in the sim) its not been tested on targets [FIXED] backdrops need work to be screen agnostic [FIXED] screen statusbar is not being combined into the main viewport correctly yet [FIXED] screen elements are displayed incorrectly after switch to void* [FIXED] core didn't restore proper viewport on splash etc. [NEEDS TESTING] remote lcd garbled data [FIXED] osd lib garbled screen on bmp_part [FIXED] grey_set_vp needs to return old viewport like lcd_set_viewport [FIXED] Viewport update now handles viewports with differing buffers/strides by copying to the main buffer [FIXED] splash on top of WPS leaves old framebuffer data (doesn't redraw) [UPDATE] refined this a bit more to have clear_viewport set the clean bit and have skin_render do its own screen clear scrolling viewports no longer trigger wps refresh also fixed a bug where guisyncyesno was displaying and then disappearing [ADDED!] New LCD macros that allow you to create properly size frame buffers in you desired size without wasting bytes (LCD_ and LCD_REMOTE_) LCD_STRIDE(w, h) same as STRIDE_MAIN LCD_FBSTRIDE(w, h) returns target specific stride for a buffer W x H LCD_NBELEMS(w, h) returns the number of fb_data sized elemenst needed for a buffer W x H LCD_NATIVE_STRIDE(s) conversion between rockbox native vertical and lcd native stride (2bitH) test_viewports.c has an example of usage [FIXED!!] 2bit targets don't respect non-native strides [FIXED] Few define snags Change-Id: I0d04c3834e464eca84a5a715743a297a0cefd0af
2020-07-24[4/4] Remove HAVE_LCD_BITMAP, as it's now the only choice.Solomon Peachy1-10/+0
Note: I left behind lcd_bitmap in features.txt, because removing it would require considerable work in the manual and the translations. Change-Id: Ia8ca7761f610d9332a0d22a7d189775fb15ec88a
2019-02-26Fix skin_engine.c Album Art never dealloc'd on theme changeWilliam Wilgus1-0/+7
Patch from forum user Chris_s,52708.0.html Change-Id: I29f8702ced300d1dc90dfa0e8baa609b9051903e
2014-01-22Fix red on monochrome.Thomas Martitz1-0/+2
Change-Id: Ice40c81d0d07f7ec2014697e4de446dcb956afe8
2014-01-22skin_engine/backdrops: Have to reload default backdrops from setting when it ↵Thomas Martitz1-0/+3
changed. When skins use the default backdrop (via %X(-) or no %X at all) and the setting changes it needs to be reloaded, otherwise when changing themes the new theme could show the backdrop from the previous theme. The same needs to be done when re-selecting the same theme after USB because the backdrop file was potentially overwritten. Fixes FS#12892 and FS#12942. Change-Id: Ic2d20740cc385fa99667ce8a71507dbda2efceaf
2013-12-30Fix build errorJonathan Gordon1-0/+2
Change-Id: I32e06cc41c70e225622c87539feaca5f92131065
2013-12-29skin_engine: unload skin backdrops when the skins are resetJonathan Gordon1-0/+2
Hopefully this will fix various skin related bugs which happen on usb plug/unplug! Change-Id: Ie1d8378fca38dae02e42ed02a68bdb3663651b4d
2013-06-23skin_engine: Fix crash on skin_reset (e.g. on language change).Thomas Martitz1-1/+2
Change-Id: Ie2da1a1ba9d2dad76e2f1c45abd907c3ede4f56c
2013-06-09Fix warning (move variable into #ifdef section).Thomas Martitz1-2/+2
Change-Id: Ic6ba4b786eef00eab7f20abd5fbf2bcb8977993a
2013-06-09Fix reds (this code needs #ifdef HAVE_ALBUMART)Thomas Martitz1-0/+2
Change-Id: Ia50cd846d5451b0cb5cf3a6f8097ea9fe3b3c60a
2013-06-09skin_engine: Fix albumart logic on skin reloading.Thomas Martitz1-2/+15
This logic checks whether the skin's albumart dimensions differ from the previous skin to force rebuffering if necessary. This was broken since a while as the necessary information was reset. Change-Id: I3b9f3a819c6af202af8ad66c13742f704ce45ab1 Reviewed-on: Tested-by: Thomas Martitz <> Reviewed-by: Thomas Martitz <>
2013-02-12skin_engine: Add a debug screen to display skin ram usageJonathan Gordon1-2/+14
Change-Id: Ida9c33211d9360ac88e30a2cf8df9f191bee8b45
2013-02-12Fix (c) notice which was apparently copy/pasted from a completly unrelated fileJonathan Gordon1-2/+1
Change-Id: I465bd6a70e911c7a56213af82b4db64c25c294f7
2013-02-11remove unused membersJonathan Gordon1-8/+0
Change-Id: Ic0a0d300c9b7701c9173121d9d36a4dd4a28d8bd
2012-06-19CHARCELL doesn't have sbs support, so disable it properly.Frank Gevaerts1-2/+6
This actually fixes a nullpointer dereference. Change-Id: Ie3e153d72bcacdce46bfe5a514ff77aebdfd7225
2011-12-20Another round of making local functions staticBertrik Sikken1-1/+1
git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2011-11-29FS#12412 : Delete old buffer allocation code which has been replaced by ↵Boris Gjenero1-1/+0
core_alloc, and move buffer setup code to core_alloc.c git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2011-11-28Be less smart about when to reload skins as it caused more problems than it ↵Jonathan Gordon1-17/+8
was worth. If any theme setting is loading from a .cfg reload all skins. Fixes FS#12410 git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2011-11-28Fix FS#12408 - don't load skins too early causing buflib handles to leakJonathan Gordon1-0/+6
git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2011-11-21Fix the charcell compile error and rmeove an unused #defineJonathan Gordon1-0/+2
git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2011-11-21skinengine: Load the fms the first time the fm screen is entered instead of ↵Jonathan Gordon1-5/+10
on boot to save some ram git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2011-11-21skinengine: Rework skin loading so skins can be un/loaded individually. This ↵Jonathan Gordon1-112/+133
also means that loading a .cfg which doesnt change themes shouldnt have them reloaded git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2011-11-19Get rid of a really annoying #ifdef line to check if backdrop support should ↵Jonathan Gordon1-2/+2
be enabled git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2011-11-15Use buflib for all skin engine allocations.Jonathan Gordon1-13/+13
Massive thanks to Michael Chicoine and other testers for finding the early bugs. This removes all skin memory limitations git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2011-10-15Changed the FOR_NB_SCREENS macro to always be a for loop that declares its ↵Björn Stenberg1-4/+3
own loop variable. This removes the need to declare this variable in the outer scope. git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2011-10-05Revert r30599 "Check for the magic file "/.rockbox/skin_buffer_size.txt" [...]"Thomas Martitz1-28/+3
It's not clear whether a user setting is the right/accepted fix for the skin buffer. But even if it is, this implementation of it is considered bad, even by the author. See git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2011-09-28fix FS#12295Jonathan Gordon1-2/+7
git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2011-09-25fix APPLICATION build errorsJonathan Gordon1-0/+1
git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2011-09-25fix warningsJonathan Gordon1-0/+2
git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2011-09-25Check for the magic file "/.rockbox/skin_buffer_size.txt" on bootup which ↵Jonathan Gordon1-2/+25
can have a number which is the amount of kilobytes to allocate for the skin buffer. This is only checked on boot so if you need to change it you must reboot to enable. Currently the default size is 80KB on colour targets which can be way too much or not enough for users. The format of the /.rockbox/skin_buffer_size.txt file is simply a number (so 120 if you want 120 kilobytes), NO trainling spaces or text of any kind git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2011-09-24FS#12273 - use buflib for font storage. thanks to the testers :)Jonathan Gordon1-3/+2
git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2011-09-15skin_engine: make sure to free all buflib allocations so we dont leak ↵Jonathan Gordon1-28/+35
handles/memory git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2011-09-11Fix albumart which r30500 broke (FS#12271)Jonathan Gordon1-4/+4
git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2011-09-11Fix FS#12270 - properly initialiase the wps_data struct so skin_data_reset() ↵Jonathan Gordon1-0/+1
doesnt crash later git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2011-08-30GSoC/Buflib: Add buflib memory alocator to the core.Thomas Martitz1-2/+1
The buflib memory allocator is handle based and can free and compact, move or resize memory on demand. This allows to effeciently allocate memory dynamically without an MMU, by avoiding fragmentation through memory compaction. This patch adds the buflib library to the core, along with convinience wrappers to omit the context parameter. Compaction is not yet enabled, but will be in a later patch. Therefore, this acts as a replacement for buffer_alloc/buffer_get_buffer() with the benifit of a debug menu. See buflib.h for some API documentation. git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2011-03-07move code around to make checkwps compileJonathan Gordon1-62/+0
git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2011-03-07Merge a bunch of code which is 99% identical so it makes it easier to add ↵Jonathan Gordon1-0/+62
more of these later git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2010-12-06Get rid of get_user_file_path and do the path handling in wrappers for ↵Thomas Martitz1-4/+2
open() and friends. git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2010-11-05Undo the part of r28480 that caused the simulator to also use host malloc.Thomas Martitz1-6/+6
We want simulators to simulate target code where possible, that includes memory constraints and memory allocation schemes. It also removed the sim's ability to show the theme's ram usage. Use malloc only in application builds. git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2010-11-04RaaA: Use the host's malloc() for the skin engine.Jonathan Gordon1-1/+13
git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2010-10-16skin_engine: struct gui_skin can be staticBertrik Sikken1-1/+1
git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2010-09-14fix errors, warnings, tabsJonathan Gordon1-3/+8
git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2010-09-14new file got lostJonathan Gordon1-0/+246
git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657