summaryrefslogtreecommitdiffstats
path: root/minui/resources.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2015-04-15Don't use typedefs that hide *s.Elliott Hughes1-19/+17
gr_surface was causing confusion for no good reason. Change-Id: If7120187f9a00dd16297877fc49352185a4d4ea6
2015-04-10Switch minui over to C++.Elliott Hughes1-12/+17
Change-Id: I59e08a304ae514a3fdb6fab58721f11670bc1b01
2015-02-12Fix Droid and animation color in recovery modeTony Kuo1-0/+12
[Problem] Droid and animation color in recovery mode are incorrect [Modify] - Add support for flipping (zero copy) with RECOVERY_ABGR. - Decodes PNG files to BGRA directly, and other fills, text and alpha blending are also done directly in BGRA (i.e. blits can still bypass conversion) - Remove the BGRA workaround added previous for single buffer mode (f766396) Bug:19216535 Change-Id: Ie864419fc6da776ff58b2d02e130f203c194500f Signed-off-by: Tony Kuo <tony.kuo@mediatek.com>
2015-01-30Add missing includes.Elliott Hughes1-0/+1
Change-Id: I06ea08400efa511e627be37a4fd70fbdfadea2e6
2014-03-20restore minui support for paletted images with < 8 bitsDoug Zongker1-1/+1
The PNG image loaders should support images that use palettes requiring fewer than 8 bits. Change-Id: Ibcb0ff6f04aea8de54b03c0efa7a79e9b3635146
2014-03-18fix error log statementDoug Zongker1-1/+1
We were printing the address of channels instead of the value there. Change-Id: I652340c7c1a0abaf01af555e54d2c0366d21ad78
2014-03-17refactor image resource loading code in minuiDoug Zongker1-233/+207
Reduce the number of copies of libpng boilerplate. Rename res_create_* functions to be more clear. Make explicit the use of the framebuffer pixel format for images, and handle more combinations of input and output (eg, loading a grayscale image for display rather than use as a text alpha channel). Change-Id: I3d41c800a8f4c22b2f0167967ce6ee4d6b2b8846
2014-03-14Recovery 64-bit compile issuesMark Salyzyn1-1/+1
Change-Id: I92d5abd1a628feab3b0246924fab7f97ba3b9d34
2014-03-11remove pixelflinger from recoveryDoug Zongker1-64/+33
Recovery now draws directly to the framebuffer by rolling its own graphics code, rather than depending on libpixelflinger. The recovery UI is modified slightly to eliminate operations that are slow with the software implementation: when the text display / menu is turned on, it now appears on a black background instead of a dimmed version of the recovery icon. There's probably substantial room for optimization of the graphics operations. Bug: 12131110 Change-Id: Iab6520e0a7aaec39e2ce39377c10aef82ae0c595 Conflicts: minui/resources.c
2014-03-11change how recovery animation is implementedDoug Zongker1-3/+179
Instead of one 'base' installing image and a number of overlay images that are drawn on top of it, we represent the installing animation with one PNG that contains all the animation frames, interlaced by row. The PNG is expected to have a text chunk with the keyword 'Frames' and a value that's the number of frames (as an ascii string). This representation provides better compression, removes the need to subclass ScreenRecoveryUI just to change the position of the overlay or number of frames, and doesn't require gr_blit() to support an alpha channel. We also remove the 'indeterminate' progress bar used when wiping data and/or cache. The main animation serves the same purpose (showing that the device is still alive); the spinning progress bar has been redundant for a while. This changes the default recovery animation to include the antenna-wiggling and gear-turning that's used in the Nexus 5 recovery animation. Change-Id: I51930a76035ac09969a25472f4e572b289418729 Conflicts: screen_ui.cpp screen_ui.h
2014-03-11remove pixelflinger from recoveryDoug Zongker1-71/+32
Recovery now draws directly to the framebuffer by rolling its own graphics code, rather than depending on libpixelflinger. The recovery UI is modified slightly to eliminate operations that are slow with the software implementation: when the text display / menu is turned on, it now appears on a black background instead of a dimmed version of the recovery icon. There's probably substantial room for optimization of the graphics operations. Bug: 12131110 Change-Id: Iab6520e0a7aaec39e2ce39377c10aef82ae0c595
2014-03-07change how recovery animation is implementedDoug Zongker1-3/+179
Instead of one 'base' installing image and a number of overlay images that are drawn on top of it, we represent the installing animation with one PNG that contains all the animation frames, interlaced by row. The PNG is expected to have a text chunk with the keyword 'Frames' and a value that's the number of frames (as an ascii string). This representation provides better compression, removes the need to subclass ScreenRecoveryUI just to change the position of the overlay or number of frames, and doesn't require gr_blit() to support an alpha channel. We also remove the 'indeterminate' progress bar used when wiping data and/or cache. The main animation serves the same purpose (showing that the device is still alive); the spinning progress bar has been redundant for a while. This changes the default recovery animation to include the antenna-wiggling and gear-turning that's used in the Nexus 5 recovery animation. Change-Id: I51930a76035ac09969a25472f4e572b289418729
2013-09-26fix use of RGBA images in minuiDoug Zongker1-3/+11
Bug: 10934401 Change-Id: I471b30e5b2e877c620e4a0a524e950cddbc6d2c0
2013-08-27Update libpng API usageJohn Reck1-12/+12
Remove usage of deprecated methods Change-Id: I747568a2c8c0c65ecbc9a3da4bac7b9cac7708ab
2013-08-13Fix libpng API usageJohn Reck1-12/+12
Remove usage of deprecated methods that were removed in 1.6 Change-Id: I2a669bf5201197f60adfdbe512fd729bebb74f9c
2013-03-05recovery: change font for menus to be an imageDoug Zongker1-8/+12
Instead of representing the font used for menus and log messages in the recovery binary, load it from a resource PNG image. This allows different devices to substitute their own font images. Change-Id: Ib36b86db3d01298aa7ae2b62a26ca29e6ef18014
2012-09-04minor recovery fixesDoug Zongker1-5/+2
- protect against missing/malformed bitmaps: fail to display them but don't crash. - don't draw animation overlays until the overlay offset is computed. - logging cleanup Change-Id: Ieb1c155cfbb11e643000bdb5d1a57900c8757739
2012-08-30recovery locale handling fixesDoug Zongker1-8/+0
- change locale filename to "last_locale" so the main system doesn't delete it - clean up some chatty logging - update images with real German (other languages TBD) Change-Id: I2ebb4ed4e054bd1808a3042d9efbb2c18f3a044d
2012-08-23add simple text to recovery UIDoug Zongker1-0/+150
- recovery takes a --locale argument, which will be passed by the main system - the locale is saved in cache, in case the --locale argument is missing (eg, when recovery is started from fastboot) - we include images that have prerendered text for many locales - we split the background states into four (installing update, erasing, no command, error) so that appropriate text can be shown. Change-Id: I731b8108e83d5ccc09a4aacfc1dbf7e86b397aaf
2012-08-21Fixing trivial warnings for libminuiEdwin Vane1-2/+2
After fixing three trivial warnings, libminui builds cleanly with clang. Change-Id: Id7c6228295427a5ed3c774c5f90e88a28336c1f7 Author: Edwin Vane <edwin.vane@intel.com> Reviewed-by: Kevin P Schoedel <kevin.p.schoedel@intel.com>
2011-03-05allow paletted RGB images in recoveryDoug Zongker1-2/+7
Recovery assumes any paletted images are in RGBA format. Make it handle both RGB and RGBA paletted images. Bug: 3514884 Change-Id: I517cd571aa3f434dacacc33a774236260aec20ef
2011-03-01make recovery UI images more general; allow for installation animationDoug Zongker1-0/+2
Change some of the UI parameters (# of indeterminate progress bar frames, fps, etc.) from #defined constants to variables that can be set by the device-specific recovery_ui code (via a new function). Support overlaying different images on top of the base installation icon to animate it. Make the FPS control more accurate. Change-Id: I9268b389b7ea6b3ed9e0c7eae37baf4272e60edd
2009-10-09simplify construction of the recovery progress barDoug Zongker1-3/+8
Instead of six separate images for the left end, right end, and tiled center portion of the full and empty progress bars, just use two images: a full bar and an empty bar. Draw the left side of the full bar and the right side of the empty one, moving the boundary rightward to "fill" the bar. This makes recovery trivially smaller, and allows fancier images to be used as progress bars. Support paletted PNG images as resources.
2009-03-28AI 143289: am: CL 143128 Use PNG instead of BMP for recovery image icons. This savesDoug Zongker1-100/+67
about 60k from the recovery and system images. Original author: dougz Merged from: //branches/donutburger/... Automated import of CL 143289
2009-03-27AI 143128: Use PNG instead of BMP for recovery image icons. This savesDoug Zongker1-100/+67
about 60k from the recovery and system images. Automated import of CL 143128
2009-03-04auto import from //depot/cupcake/@135843The Android Open Source Project1-0/+202
2009-03-04auto import from //depot/cupcake/@135843The Android Open Source Project1-202/+0