summaryrefslogtreecommitdiff
path: root/apps/gui/skin_engine/skin_render.c (follow)
Commit message (Collapse)AuthorAge
* lcd-24bit: Introduce a 24-bit mid-level LCD driverThomas Martitz2014-06-21
| | | | | | | | | | | | | | | | | With LCD driver all calculation will be performed on RGB888 and the hardware/OS can display from our 24bit framebuffer. It is not yet as performance optimized as the existing drivers but should be good enough.The vast number of small changes is due to the fact that fb_data can be a struct type now, while most of the code expected a scalar type. lcd-as-memframe ASM code does not work with 24bit currently so the with 24bit it enforces the generic C code. All plugins are ported over. Except for rockpaint. It uses so much memory that it wouldnt fit into the 512k plugin buffer anymore (patches welcome). Change-Id: Ibb1964545028ce0d8ff9833ccc3ab66be3ee0754
* skin engine: Fix FS#12884.Thomas Martitz2014-01-10
| | | | | | | | | The %Vf and %Vb tags change the colors for the rest of the viewport. This requires the rest of the vp to be redrawn when they change due to a conditional. The previous code did this redraw in all cases (conditional or not) which led to visible blinking. Change-Id: Ie59dfc6fe8ed76485a2a2bd7caf1315f1944c227
* Oops, pasted to the wrong place.Thomas Martitz2014-01-07
| | | | Change-Id: Icb07ddd04171699e997eca171bf8756b5fd9f024
* Fix a few reds and yellows.Thomas Martitz2014-01-07
| | | | Change-Id: I9ad2aca494f2ea3ca5453082ec5491ec031f9ae5
* 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
* skin_engine: Adapt put_line().Thomas Martitz2014-01-07
| | | | | | This allows for code unification and removal of a workaround (STYLE_XY_PIXELS). Change-Id: Ie92d377414cad943cdb06976af10b4f315f32710
* fix some reds.Thomas Martitz2013-12-23
| | | | Change-Id: Iecb1305dbd1519434e0f476d2199e728b96091f9
* playback,talk: Share audiobuffer via core_alloc_maximum().Thomas Martitz2013-12-23
| | | | | | | | | | | | | | | | This fixes the radioart crash that was the result of buffering.c working on a freed buffer at the same time as buflib (radioart uses buffering.c for the images). With this change the buffer is owned by buflib exclusively so this cannot happen. As a result, audio_get_buffer() doesn't exist anymore. Callers should call core_alloc_maximum() directly. This buffer needs to be protected as usual against movement if necessary (previously it was not protected at all which cased the radioart crash), To get most of it they can adjust the willingness of the talk engine to give its buffer away (at the expense of disabling voice interface) with the new talk_buffer_set_policy() function. Change-Id: I52123012208d04967876a304451d634e2bef3a33
* scroll_engine: Major rework to support pixel-based scrolling and scroll ↵Thomas Martitz2013-12-14
| | | | | | | | | | | | | | | | | | | callbacks. Much of the scrolling work is moved from lcd-bitmap-common to lcd-scroll.c, a small scroll callback routine remains. This callback can potentially be overridden by more extensive scrollers. The callback also gets fed with pixel-based scrolling information, which finally removes the strict line-based nature of the scroll engine. Along with this is the change from scroll_stop_viewport_line() to scroll_stop_viewport_rect() which works on a pixel-based rectangle instead of lines. The ultimate goal is to move most of the scroll work to apps, which can much better decide which line decorations to apply etc. This work is laying the ground work. Change-Id: I3b2885cf7d8696ddd9253d5a9a73318d3d42831a
* scroll_engine: Rename scroll_stop* functions to be more consistent with the ↵Thomas Martitz2013-12-14
| | | | | | lcd api. Change-Id: I8ada10b96bfb628cca0331689e8b936ae47c7e1c
* radio screen: Disable displaying radio art, FS#12797Jonathan Gordon2013-01-03
| | | | | | | | | With radioart enabled there appears to be buffer corruption when the image is loaded causing the player to data abort in skin_render_line() So, disable the code untill someone can fix it. Change-Id: I6acf3f76ce38aa2784b1b24ed6da29a9c5bee479
* 9 segment bitmap drawing:Jonathan Gordon2012-12-09
| | | | | | | | | | Use %x9(id) to draw an image in the whole current viewport using the 9 segment drawer (which draws the corners as normal and *tiles* the middle segments to the needed width/height). Future work is to make it scale instead of tile Change-Id: Ic3ed1cad93f96091694801eb442e0da5a2401203
* skin_engine: Allow the %St() (setting) skin tag be used as a barJonathan Gordon2012-07-05
| | | | | | %St(<setting name>) or %St(<bar tags>, setting, <setting name>) Change-Id: I71396d683634d4d1ad2357018c4029ecb4229677
* (hopefully) Fix FS#12639 and other skin related buflib corruption issues.Jonathan Gordon2012-05-16
| | | | | | | | | | | Kudos to funman for figuring out the problem - skin_find_item() rather stupidly uses the global skin_buffer variable in skin_parser.c which is fine in the parser EXCEPT it gets changed in skin_render when the sbs is being redrawn while another skin is loading, so fix this by makeing skin_find_item() use a local data pointer so a skin_render() during parsing won't break anything. Change-Id: I80e1c0efe569c18225e5772159c18ebb21e07332
* skin_engine: fix scrolling lines with dynamic contentJonathan Gordon2012-03-26
| | | | Change-Id: If85220c8b59123814e0e6b1a3b8e00c981271021
* Fix FS#12606 - next track can cause the screen to be clearedJonathan Gordon2012-03-20
| | | | | | | | | | | | | This is a bit of a hack. We now trigger an event when the skin engine is doing a full redraw (which means fullscreen clear) before the lcd_update() to give the current screen a chance to redraw to avoid the screen flicker. This commit fixes the issue for screens which are entirely the list widget (i.e browser and menus), other screens will need aditional fixes (i.e quickscreen, time&date screen) Change-Id: I3725c51518be724ce7aacee9877663c2de6866fa
* Fix compile errorsJonathan Gordon2012-03-15
| | | | Change-Id: Ic985bf57da04847bff716ee41db8f107100ff95b
* skin_engine: New tag to draw a rectangle (optionally with a gradient)Jonathan Gordon2012-03-15
| | | | | | | | | | | %dr(x, y, width, height, [colour1[, colour2]]): x,y - viewport relative pixel coordinates to start the rectangle. width, height - obvious. can be '-' to fill the viewport if both colours are left out the viewports foreground colour will be used if one colour is specified it will fill the rectangle that colour. if both colours are specified it will gradient fill the rectangle. Change-Id: Iad451e99ded663bc7c5d182443659db7d909b388
* Revert "Fix FS#12606 - next track can cause the screen to be cleared"Jonathan Gordon2012-03-15
| | | | This reverts commit cb9bc3bbc8a66c3d5296bfbc68f4487c39c6ac68.
* Fix FS#12606 - next track can cause the screen to be clearedJonathan Gordon2012-03-14
| | | | | | | | | | | | | This is a bit of a hack. We now trigger an event when the skin engine is doing a full redraw (which means fullscreen clear) before the lcd_update() to give the current screen a chance to redraw to avoid the screen flicker. This commit fixes the issue for screens which are entirely the list widget (i.e browser and menus), other screens will need aditional fixes (i.e quickscreen, time&date screen) Change-Id: I3ffdcd8ccad2c663732f8d5983049c837de00fe5
* Call skinlist_set_cfg() unconditionally, i.e. also if do_refresh==falseFrank Gevaerts2012-02-29
| | | | | | | | | | | | This call is cheap (except if the list config changes, but then it should be called anyway), and do_refresh isn't always set appropriately, e.g. when the screen has just changed, which could cause the list config to be null at bad times, which caused the standard list to be shown instead of the desired skinned list. Change-Id: I47dd2552d6d1062456ede4529c4891e80a8159ea Reviewed-on: http://gerrit.rockbox.org/113 Reviewed-by: Frank Gevaerts <frank@gevaerts.be>
* skin_engine: Clean up %x() handling - beware theme issuesJonathan Gordon2012-02-28
| | | | | | | | | Internally remove some hacks around how %x() is handled. %x() inside the default viewport will no longer work if other viewports are used, so if you are using viewports and %x() make sure it is in a viewport! Change-Id: I8ecab805d55fc0f8476ff0516cba38e23400aa20
* Fix build errorsJonathan Gordon2012-02-28
| | | | Change-Id: Ie46e807799034af2a025c607a76e17c50c5b613e
* lcd/skin_engine: Add the ability to draw onto the backdrop layerJonathan Gordon2012-02-28
| | | | | | | | | | | | | | The framebuffer the lcd driver uses can now be changed on the fly which means that regular lcd_* drawing functions can draw onto the "backdrop" buffer. The skin engine can use this to create layered effects. Add the tag %VB to a viewport to draw that viewport onto the backdrop layer. If you want to draw an image onto the backdrop framebuffer use %x(backdrop filename) instead of %X() inside a viewport with %VB. Change-Id: I741498e2af6d4f2d78932cabe8942317893e7cfc
* skin engine: Make %vs() dynamic so it updated every screen updateJonathan Gordon2012-02-21
| | | | | | This makes it easier to use %?vl() (variable last changed) in a sensible manner. Change-Id: I0bf9ae24bc4516d2fd5691af236cc4439a0863c8
* Allow scrolling lines to have their content changed without restarting the ↵Jonathan Gordon2011-12-14
| | | | | | scroll line. This means skin lines with dynamic tags can be updated in realtime instead of delayed git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31247 a1c6a512-1295-4272-9138-f99709370657
* Use buflib for all skin engine allocations.Jonathan Gordon2011-11-15
| | | | | | | | Massive thanks to Michael Chicoine and other testers for finding the early bugs. This removes all skin memory limitations git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30991 a1c6a512-1295-4272-9138-f99709370657
* Redo r30826 (and hopefully not reintroduce font issues) which cleans up the ↵Jonathan Gordon2011-11-08
| | | | | | font API. FONT_UI is deprecated, use screens[screen].getuifont() instead (and .setuifont() to set it after a font has been loaded) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30932 a1c6a512-1295-4272-9138-f99709370657
* Fix a 'set but not used' warning.Andree Buschmann2011-09-28
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30615 a1c6a512-1295-4272-9138-f99709370657
* FS#12273 - use buflib for font storage. thanks to the testers :)Jonathan Gordon2011-09-24
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30589 a1c6a512-1295-4272-9138-f99709370657
* fix the last of the errorJonathan Gordon2011-09-06
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30464 a1c6a512-1295-4272-9138-f99709370657
* Lists can now be completly draw using the skin engine!Jonathan Gordon2011-09-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | due to lack of user feedback the actual tags may change, hopefully not though. The way it works is the skin specifies a rectangle and a viewport label. For each item in the list that is being displayed all viewports with the specified label are drawn. However, instead of the viewport x/y position being offset from the top left corner like normal they are offset from the rectangle position in the list (so think of them as child-viewports of the rectangle which moves). Normally the rectangle will move down the screen to show a normal list, this can be changed to move across the screen in a grid pattern. The UI viewport is used to bound the items (i.e %Vi() ) Scrolling is completly disabled in all items except the currently selected item. This works well in combination with the %cs tag to show differently styled lists based on the current screen :) New tags: %LT - Get the current items text %LI - Get the current items icon number %Lc - Use as a conditional to determine if the current item is the selected item %LB - BAR TAG to show the scroll bar, params/options like other bar types. It still needs a bit of work though. Use as a conditional to find out if the bar is actually needed %Lb(viewport, width, height [,tile]) - specify the viewport label to draw for each item and the size of each item. if the last param is 'tile' it will form a grid instead of a list example.sbs: %?cs<%Lb(a,100,20)|> %V(0,0,10,-,1)%Vf(aabbcc) %?LB<%LB(0,0,10,185, invert)> %Vi(-,10,0,-,-35,1) %Vl(a,5,5,160,12,1) %s%?Lc<%Vg(00ffaa, ff0000, 000000)%Vs(gradient)%>%>%>%ac>zzzzzzz %LT zzzzz%s%?Lc<%ar%<%<%<> %V(0,185,-,-,1) %s%LT git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30461 a1c6a512-1295-4272-9138-f99709370657
* New skin tags: %Vs() to set the text style and %Vg() to get the viewports ↵Jonathan Gordon2011-08-14
| | | | | | | | | gradient colours %Vs(mode[, param]) : mode can be "invert", "color" (where param is the colour to use", "clear" to disable the current style, "gradient" where param is the number of lines the gradient should draw over. %Vg(start colour, end colour, [text colour]), if this tag isnt used the list selection colours from the settings will set the gradient colours git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30302 a1c6a512-1295-4272-9138-f99709370657
* Remove a couple of dead inits and assignments found by the ↵Nils Wallménius2011-06-12
| | | | | | clang-static-analyzer. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29996 a1c6a512-1295-4272-9138-f99709370657
* FS#11925 - Add a proper system to keep track of the current screen/activity ↵Jonathan Gordon2011-06-01
| | | | | | to make %cs far more useful git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29944 a1c6a512-1295-4272-9138-f99709370657
* Skin variables for touchscreen targets (origional implementation by Jens Theeß)Jonathan Gordon2011-03-27
| | | | | | | | | | %vs(name, [set|inc|dec], value [,max]) - name is the id, set sets the value, inc increments by value, dec decrements by value %vg(name) - get the current value %vl(name [,timeout]) - 'has it changed in [timeout]'? values start at 1 and are all reset to 1 on skin load git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29655 a1c6a512-1295-4272-9138-f99709370657
* Merge a bunch of code which is 99% identical so it makes it easier to add ↵Jonathan Gordon2011-03-07
| | | | | | more of these later git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29535 a1c6a512-1295-4272-9138-f99709370657
* FS#11867 - Add 2 new tags to allow skins to display themed peakmetersJonathan Gordon2011-01-13
| | | | | | | %pL for the left channel, %pR for the right channel... usable as a value, conditional or bar (exactly the same as %pv/%bl/etc) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29043 a1c6a512-1295-4272-9138-f99709370657
* Make the %tr (radio RSSI) tag work as a bar tag or as a conditional.Jonathan Gordon2010-11-18
| | | | | | As a conditional it scales its value to the number of options you give it (like volume) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28613 a1c6a512-1295-4272-9138-f99709370657
* Fix FS#11593 - %Vf() and %Vb() should be able to be used in conditionals. ↵Jonathan Gordon2010-10-13
| | | | | | Remember that these tags cause a new line to get drawn so text/tags on the same line wont be displayed git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28266 a1c6a512-1295-4272-9138-f99709370657
* Viewports dont necessarily have children lines, so make sure there is one or ↵Jonathan Gordon2010-10-12
| | | | | | it will crash git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28245 a1c6a512-1295-4272-9138-f99709370657
* Fix charcell %pb and %pf tags, FS#11592Frank Gevaerts2010-10-10
| | | | | | | This also moves draw_player_fullbar() and draw_player_progress() from skin_display.c to skin_tokens.c. Charcell is a bit different from bitmap here because drawing a progress bar is a combination of setting up the LCD controller (custom characters) and providing a format string. The custom character definition might fit in skin_display.c, but the format strings are needed in skin_tokens.c. Putting these functions in skin_tokens.c seemed to fit better. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28241 a1c6a512-1295-4272-9138-f99709370657
* Make skin_render_playlistviewer() noinline. This function uses lots of stack ↵Frank Gevaerts2010-10-10
| | | | | | (around 1 kilobyte), and is called from a recursive function. gcc's stack allocation strategy makes the calling function then use all this stack space when inlining. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28231 a1c6a512-1295-4272-9138-f99709370657
* Revert accidental commit of skin_render.cFrank Gevaerts2010-10-10
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28230 a1c6a512-1295-4272-9138-f99709370657
* Add a "early_usb" argument to gui_usb_screen_run(), and don't do skin ↵Frank Gevaerts2010-10-10
| | | | | | unloading/reloading in gui_usb_screen_run() in the early usb case. Fixes the crash part of FS#11589 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28229 a1c6a512-1295-4272-9138-f99709370657
* fix FS#11662 and FS#11629 - skin %t() issues. %t should now work properly ↵Jonathan Gordon2010-10-10
| | | | | | | | inside and outside of conditionals. Remember that skins update at a rather slow speed so even if you have %t(0.2) in your skin it depends on which screen you are in for it to work (the main menu only updates at 2FPS, the WPS is 25FPS with peakmeters enabled... this is on the fixme list) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28226 a1c6a512-1295-4272-9138-f99709370657
* Fix FS#1159 - stack overflow in the skin engine when there is too many ↵Jonathan Gordon2010-09-26
| | | | | | nested conditionals git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28167 a1c6a512-1295-4272-9138-f99709370657
* Another major skin backend update/hopefully bugfix:Jonathan Gordon2010-09-14
| | | | | | | | | | | Skins are now more self contained in the skin manager which in the future might allow on demand skin loading (i.e smaller skin buffers) Skin backdrops are also managed more intelegently (fixes a bug where you can get a crazy backdrop loaded if a .sbs fails to load) the rockbox_default rescue theme is now called rockbox_failsafe to better express what it actually is. This commit hopefully/maybe fixes the heavily reported data aborts, so please check if you are getting them git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28073 a1c6a512-1295-4272-9138-f99709370657
* fix FS#11588 - %t(0) inside conditionals wasnt making that subline skipJonathan Gordon2010-09-02
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27983 a1c6a512-1295-4272-9138-f99709370657
* Should fix the line alternator issue described in ↵Jonathan Gordon2010-08-31
| | | | | | http://forums.rockbox.org/index.php?topic=25545 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27956 a1c6a512-1295-4272-9138-f99709370657