summaryrefslogtreecommitdiffstats
path: root/gui/resources.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Improve backup & wipe exclusion handlingEthan Yonker2016-11-301-0/+1
| | | | | | | | | | | | | | Rename twrpDU.* to exclude.* Remove global variable for du and replace with partition specific variables. Use separate exclusion lists for backups and wiping. Clean up some includes Fix some parenthesis in twrp.cpp that I messed up. Note: twrpTarMain command line utility compiles but probably does not work correctly yet due to not properly setting part_settings Change-Id: Idec9c3e6a8782ba53f3420fa79ba33394f4f85fb
* gui: fix font scaling for zip themesthat2016-03-171-8/+11
| | | | | | | | | | All fonts were extracted to /tmp/extract.bin which was deleted after the initial load, so reloading for scaling failed. - extract fonts to /tmp with original name and don't delete them - minor code cleanup Change-Id: If8a0f657a7ef4c418fd5cc8550a24de44a38f303
* Update minuitwrp graphics in line with latest minuiEthan Yonker2016-01-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Note: events.cpp is still old code renamed to cpp to make it easier to call functions like gr_fb_width(). I had to modify AOSP fbdev code to provide a separate memory surface for drawing to as drawing directly to the framebuffer resulted in rendering taking about 5 times longer. I also modified AOSP adf code to provide a separate memory surface for drawing for the same performance reasons. The Nexus 9 supports adf graphics. Overlay graphics work on at least one device. Overlay provides a separate memory buffer already so performance is good. I do not have a drm device yet that I know of. I made some attempt to update the drm code to determine the correct pixel format based on the drm graphics format, but what is available in pixel flinger and what is available in drm do not line up all that well. Reports are that the Pixel C is using drm graphics, but performance is slow, likely due to the use of a mmap instead of a memory buffyer. Change-Id: Ibd45bccca6ac2cb826037aa9b2aa5065cf683eed
* Multiple Language SupportEthan Yonker2015-12-191-19/+114
| | | | | | | | | | | | | | | | | | | | | | | This is similar to https://gerrit.omnirom.org/#/c/14014 A lot of the features built in the older patch set have been split out into separate patches, most of which have already been merged. The remaining functionality here should all be directly related to language selection and loading. We always load English as a base before loading other languages over the top of the base. The idea is that if another language is missing a translation, then we will still display the English. Maybe still to do: read the /cache/recovery/last_locale file and load a language based on that. For me, this file contains just: en_US We probably won't bother with region specific translations so we would have to look at either trimming off the _US or using some other method like perhaps a symlink or a combination of the two. Thanks to _that for twmsg.cpp class Change-Id: I9647a22e47883a3ddd2de1da51f64aab7c328f74
* Fix a bunch of warningsEthan Yonker2015-10-251-1/+1
| | | | | | Mostly adding __unused where needed. Change-Id: Ia4f675b9b360782728c361ed1699db0cc277c3a5
* Remove support for non-TTF fontsEthan Yonker2015-10-151-26/+1
| | | | | | | | | | | This patch set removes support in TWRP for the old .dat file format as well as support for the AOSP style fonts in header files. We need TTF for scaling. Note that the old AOSP style header font is still supported in minui which is not used by TWRP. Change-Id: I6124a3333d479f1fc668138f7e32c4be9b519552
* gui: move retainaspect handling to the resource ctorsthat2015-06-011-12/+8
| | | | | | | LoadResources should only decide on the resource type, everything else is handled by the resources themselves. Change-Id: I30f68293960c23560979f650efc4393992cf5824
* gui: support string resourcesthat2015-03-111-9/+16
| | | | | | | | | | | | | | | storing strings in a map (for fast lookup) in resource manager To define a string resource in <resources>: <string name="foo">Hello</string> To use a string, e.g.: <text>%@foo%</text> Not yet done: language-specific resources (should be solved not only for strings, but for all kinds of resources - e.g. for localized images) Change-Id: I3ba5cf5298c09e0d28a83973e9662f179271b33f
* gui: allow specifying resource type in element namethat2015-03-111-8/+8
| | | | | | e.g. '<image ...>' instead of '<resource type="image" ...>' Change-Id: I5ce04ae0845351c8a4640d12e36f1aaf32e1ebc9
* gui: type safe resources part 2that2015-03-111-27/+51
| | | | | | | | | - separate collections for fonts, images, animations - no more ugly casts - fix crash if main ui.xml did not define any resources but include did - don't stop loading resources if one "type" attribute is missing Change-Id: I70c1c9ca66ca65d9fba1ba3eded34f3d8a07488e
* gui: make resources type safethat2015-02-151-1/+2
| | | | | | | | | | | - add string, int, color and resource loading helpers - use typed resource classes, and some cleanup in loading code - remove abstract GetResource() to enforce type safe access - add height and width query methods to resources and use them - minor cleanup - simplify LoadPlacement Change-Id: I9b81785109a80b3806ad6b50cba4d893b87b0db1
* Scale the GUI to fit the screenEthan Yonker2015-02-101-37/+76
| | | | | | | | | | | | With this patch set, if needed, we scale the images during early boot. TTF support is needed to properly scale the font. No font scaling is done on the old style fixed width font used in the console. Special thanks to _that for figuring out the scaling and blending function calls to make this possible. Change-Id: If2f79bef16d6db2e1298bfc3d00c9bcca2bee37a
* Use /twres instead of /res for theme resourcesDees Troy2015-01-221-1/+1
| | | | | | | | | AOSP and other ROM trees now do a rm -rf of the res folder during the ramdisk creation process that removes the TWRP resources. Using /twres instead of /res works around this issue making TWRP more compatible with AOSP and other build trees. Change-Id: I0d4c7e06ca381ac5aa0069b6f2b8c47f7dec49e7
* gui: clean up error handling in resource managerthat2015-01-181-61/+24
| | | | Change-Id: Ib94e661ab0c608deb2d119168709c85a9a44b2fa
* Improve resource error loggingEthan Yonker2014-12-121-10/+21
| | | | | | | | Actually display the name of the item or the filename of the item that we were unable to load in the log to make it easier to determine what went wrong. Change-Id: I027b35aab286e4d0f1957bcfb28ed40d81f9bbb2
* Thanks to _that, return null if vector is emptybigbiff2014-11-161-1/+0
| | | | Change-Id: Idc44455dd0c971c876ae283528c4367a82e145bd
* Add support for TrueType fontsVojtech Bocek2014-10-141-6/+61
| | | | | | | | | | | | | * Keeps original font system in place * Uses the same API as original font system: - You can render only one line at a time - You can only use one font and color for one gr_text* call * Caches all rendered text, with a string cache limited to 400 entries, then it trucates to 250, which results in memory usage hovering around 5-10MB Change-Id: I36107b9dcd8d57bae4486fce8b8f64e49ef3d906 Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
* Allow ui.xml to include additional xml files to readEthan Yonker2014-07-281-0/+5
| | | | | | | Use common portrait and landscape xml files based on resolution defined by the device. Change-Id: Iec528f9d846d49857ff98de1ac201e25dbb60339
* Whitespace and minor code cleanupMatt Mower2014-06-041-1/+1
| | | | | | This is by no means comprehensive, but is quite a bit better already. Change-Id: Ibc8654a5dfb0eec39cbd0b64bdb52bb4fbfe2f7e
* Unify indentation and little clean-up in TWRP filesVojtech Bocek2013-08-241-160/+158
| | | | Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
* Move all AOSP code out of recovery binaryDees_Troy2013-04-041-9/+8
| | | | | | Improves license compatibility between GPL and Apache Change-Id: I2b165aa575bb6213af6b07936f99610c113443f0
* TWRP-ify AOSP codeDees_Troy2012-09-051-0/+280
Pull in most TWRP sources Stub out partition management code Make it compile -- probably will not boot Kind of a mess but have to start somewhere