Commit graph

89 commits

Author SHA1 Message Date
Andriy Naborskyy
a5d5082222 Revert "Byte swap to support BGRA in recovery mode"
This reverts commit e5879c3639.

The swap in page flip code is not needed any more.
New changes take care of ABGR and BGRA formats swapping bytes in
png and drawing routines

See commit fd778e3e40

Bug: 26243152
Change-Id: I313ee41bee2c143b4e5412515285a65ac394ec77
2016-01-08 10:15:57 -08:00
Stéphane Marchesin
1a92c4458d Add drm support to minui
Bug: 22231636

Change-Id: I103c8e906b7dd9862b7bb89d8642268e9a3006b4
Signed-off-by: Stéphane Marchesin <marcheu@chromium.org>
2015-07-01 15:27:48 -07:00
Elliott Hughes
2f5feedf1d Check all lseek calls succeed.
Also add missing TEMP_FAILURE_RETRYs on read, write, and lseek.

Bug: http://b/20625546
Change-Id: I03b198e11c1921b35518ee2dd005a7cfcf4fd94b
(cherry picked from commit 7bad7c4646)
2015-04-29 21:14:56 -07:00
Elliott Hughes
0a5cb0c7cd Don't use typedefs that hide *s.
gr_surface was causing confusion for no good reason.

Change-Id: If7120187f9a00dd16297877fc49352185a4d4ea6
2015-04-15 10:58:56 -07:00
Elliott Hughes
8fd86d77f1 Move the menu header out of the menu.
This makes it easier for us to deal with arbitrary information at the
top, and means that headers added by specific commands don't overwrite
the default ones.

Add the fingerprint back, but broken up so it fits even on sprout's
display.

Change-Id: Id71da79ab1aa455a611d72756a3100a97ceb4c1c
2015-04-13 15:46:15 -07:00
Elliott Hughes
07cfb8fe79 Switch minui over to C++.
Change-Id: I59e08a304ae514a3fdb6fab58721f11670bc1b01
2015-04-10 13:42:55 -07:00
Elliott Hughes
642aaa7a3e Fix ScreenRecoveryUI to handle devices without power/up/down.
Currently fugu has a custom subclass to handle this. The default code
supports devices with trackballs but not all shipping Nexus devices?
That's just silly.

Change-Id: Id2779c91284899a26b4bb1af41e7033aa889df10
2015-04-10 12:47:46 -07:00
Elliott Hughes
0713819fd2 Add ev_iterate_available_keys to minui.
This lets us recognize whether we have up/down/power, say, and tailor
the UI accordingly.

Change-Id: If94e454f14243b59d2f473ac9a436bd60591da01
2015-04-10 09:40:53 -07:00
Elliott Hughes
59156bdeda Remove support for Cupcake kernels.
Change-Id: I7376b9d3c1e11d19e164072d6e9d09c1183114a0
2015-03-24 15:58:15 -07:00
Elliott Hughes
01a4d08010 Fix recovery image text rendering.
Previously most devices would lose the character before a line wrap.
The log's text rendering was starting at offset 4 but none of the
arithmetic was taking this into account. It just happened to work
on the Nexus 9's 1536-pixel wide display (1536/18=85.3) but not on
a device such as the Nexus 5 (1080/18=60).

The only active part of this change is the change from 4 to 0 in the
gr_text call. The rest is just a few bits of trivial cleanup while I
was working out what was going on.

Change-Id: I9279ae323c77bc8b6ea87dc0fe009aaaec6bfa0e
2015-03-24 15:21:48 -07:00
Narayan Kamath
83e5d1dc73 am c9bc3cc9: Merge "Drop hardcoded LOCAL_C_INCLUDES from minui/Android.mk"
* commit 'c9bc3cc92a2c2f584b28049238c4a583c80f149d':
  Drop hardcoded LOCAL_C_INCLUDES from minui/Android.mk
2015-02-26 17:49:13 +00:00
Trevor Drake
fee324f1b6 Drop hardcoded LOCAL_C_INCLUDES from minui/Android.mk
The zlib include was not required. libpng is now handled by referencing
the libpng static library

Change-Id: Ie4e0abad3fff5b763eba363d3d0fa96128ff49bc
2015-02-26 15:57:58 +00:00
Elliott Hughes
f8dd04e1a5 am ff934d02: Merge "Fix Droid and animation color in recovery mode"
* commit 'ff934d0257909e9c5420815547a6e2ff89455314':
  Fix Droid and animation color in recovery mode
2015-02-12 17:42:11 +00:00
Tony Kuo
fd778e3e40 Fix Droid and animation color in recovery mode
[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-02-11 21:36:00 -08:00
Elliott Hughes
98e2c509a6 am 78aa50d3: Merge "recovery: Handle EV_SW events"
* commit '78aa50d3499e105d04e37ae3d3d92dad0d2c711c':
  recovery: Handle EV_SW events
2015-02-11 00:33:17 +00:00
Elliott Hughes
ee7127cca5 am bf0be350: Merge "recovery: Generate libminui dynamic library"
* commit 'bf0be350ddf4fb75178f33ee64706cb795ceade0':
  recovery: Generate libminui dynamic library
2015-02-11 00:33:16 +00:00
Ajay Dudani
07d9627d7c recovery: Handle EV_SW events
Change-Id: I29c13a941067cd1bbdced3bd67fd93293347d7b6
2015-02-10 16:28:07 -08:00
Ajay Dudani
9905f3a4ee recovery: Generate libminui dynamic library
Allow factory test images to use minui functionaltiy
by making use of libminui dynamic library.

Change-Id: I63e77420d5addbcc6eebeedc213f629085766b4c
2015-02-10 16:25:17 -08:00
Elliott Hughes
40862ab59e am aeecac54: Merge "Add missing includes."
* commit 'aeecac5444ce55d2e82ee1b2aa35ff61a038c14e':
  Add missing includes.
2015-01-30 21:16:36 +00:00
Elliott Hughes
cd3c55ab40 Add missing includes.
Change-Id: I06ea08400efa511e627be37a4fd70fbdfadea2e6
2015-01-29 20:50:08 -08:00
Heather Lee Wilson
e5879c3639 Byte swap to support BGRA in recovery mode
Fixes color palate of recovery mode when double buffer enabled.

Bug: 18169447
Change-Id: Ia50b0fb9afd8001dfd740c09ce109fa421e691f7
2014-11-14 12:00:18 -08:00
Joey Pan
ba545d7e23 minui: avoid random screen frame at startup
Clear framebuffer at init.

[toddpoynor@google.com: forward port]
Change-Id: Ie98c7724cd974dcacef3e3559a6fe492864a5e72
2014-06-12 11:06:52 -07:00
Doug Zongker
eed6483638 am 0766cdf4: am d2fb4ed5: am d27aa76a: Merge "Support BGRA framebuffer"
* commit '0766cdf49acb77677864995e931eec391243505d':
  Support BGRA framebuffer
2014-05-13 22:24:06 +00:00
Daniel Leung
f766396d99 Support BGRA framebuffer
The re-designed recovery graphics code only supports RGB{_,X,A}
framebuffer, and this patch adds support for BGRA framebuffer.

Change-Id: I3780c8288088f497fa248f3492c54f43834a8598
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Reviewed-by: Jovanovic, Radivoje <radivoje.jovanovic@intel.com>
Reviewed-by: Parkinson, TimothyX L <timothyx.l.parkinson@intel.com>
Tested-by: Parkinson, TimothyX L <timothyx.l.parkinson@intel.com>
Reviewed-by: Boie, Andrew P <andrew.p.boie@intel.com>
Reviewed-by: Gumbel, Matthew K <matthew.k.gumbel@intel.com>
2014-05-13 15:00:40 -07:00
Greg Hackmann
64e7fcd925 am e9f9238a: am 1cd52423: am 1c2cf1db: Merge "recovery: minui: add adf backend"
* commit 'e9f9238af83f949dc000667356eba025e1241a2f':
  recovery: minui: add adf backend
2014-05-02 23:26:42 +00:00
Greg Hackmann
41909ddefb recovery: minui: add adf backend
Change-Id: I1ad97b5b62bddbcb1104fa0b4e54415b793a4194
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2014-04-25 15:47:34 -07:00
Doug Zongker
3e1cadc8f5 am 03008bc1: am aa4545b5: Merge "restore minui support for paletted images with < 8 bits"
* commit '03008bc1e89a780e382abe0567e709daecce92ff':
  restore minui support for paletted images with < 8 bits
2014-03-20 21:05:12 +00:00
Doug Zongker
577a130435 restore minui support for paletted images with < 8 bits
The PNG image loaders should support images that use palettes
requiring fewer than 8 bits.

Change-Id: Ibcb0ff6f04aea8de54b03c0efa7a79e9b3635146
2014-03-20 08:27:01 -07:00
Doug Zongker
7425d035ef am 47c7e365: am 130a7985: Merge "fix error log statement"
* commit '47c7e365071f75489604b2d0ba3109fe39bac1ef':
  fix error log statement
2014-03-18 00:02:38 +00:00
Doug Zongker
a388a76976 fix error log statement
We were printing the address of channels instead of the value there.

Change-Id: I652340c7c1a0abaf01af555e54d2c0366d21ad78
2014-03-17 16:51:47 -07:00
Doug Zongker
a68c517c62 am 80c1a386: resolved conflicts for merge of d90da130 to klp-modular-dev-plus-aosp
* commit '80c1a386d3f614919708b37986919ecaf74ee738':
  refactor image resource loading code in minui
2014-03-17 23:33:14 +00:00
Doug Zongker
a418aa7dd5 refactor image resource loading code in minui
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-17 12:27:08 -07:00
Mark Salyzyn
679baa06b7 am 4b6de1ba: am 026ebe02: Merge "Recovery 64-bit compile issues"
* commit '4b6de1ba1ce0fff95c18a8abb7ba6e5762006d49':
  Recovery 64-bit compile issues
2014-03-14 21:35:41 +00:00
Mark Salyzyn
f3bb31c32f Recovery 64-bit compile issues
Change-Id: I92d5abd1a628feab3b0246924fab7f97ba3b9d34
2014-03-14 13:51:39 -07:00
Doug Zongker
5290f2087a separate fbdev-specific code out from minui
Isolate the code that interacts with fbdev, in preparation for adding
a new backend.

Change-Id: I19105e9da1ca6408cebc110f7e2bb5abfb481ee9
2014-03-11 14:56:41 -07:00
Doug Zongker
16f97c3961 remove pixelflinger from recovery
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-11 14:40:04 -07:00
Doug Zongker
469954fe3d change how recovery animation is implemented
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-11 14:06:35 -07:00
Doug Zongker
830b3e3363 separate fbdev-specific code out from minui
Isolate the code that interacts with fbdev, in preparation for adding
a new backend.

Change-Id: I19105e9da1ca6408cebc110f7e2bb5abfb481ee9
2014-03-11 13:22:04 -07:00
Doug Zongker
39cf417e17 remove pixelflinger from recovery
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-11 11:10:00 -07:00
Doug Zongker
eac881c952 change how recovery animation is implemented
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
2014-03-07 09:45:44 -08:00
Colin Cross
707d321a87 am 2739ed96: am a5d105e2: Merge "recovery: fix building with pointer-to-int errors turned on"
* commit '2739ed9628f72813d213b7a429c4c1b8dcebe5fc':
  recovery: fix building with pointer-to-int errors turned on
2014-02-06 03:07:48 +00:00
Colin Cross
92cdf9c372 recovery: fix building with pointer-to-int errors turned on
Use intptr_t/uintptr_t to cast between pointer and int to allow
building with -Werror=pointer-to-int-cast and
Werror=int-to-pointer-cast turned on.

Cast to char* instead of unsigned int for pointer arithmetic.

Change-Id: Ia862306fdcca53866b330e8cf726f3d62f2248a0
2014-02-05 17:34:45 -08:00
Nick Kralevich
f3819c271e am 27efc8f9: am 617d1cad: Merge "minui: do not use flexible array initialization"
* commit '27efc8f9d1711134051b45d28b2fc38bfb4c7dc6':
  minui: do not use flexible array initialization
2014-01-04 02:02:17 +00:00
synergy dev
a0ecc8c427 minui: do not use flexible array initialization
Avoiding the use of gnu extensions improves code portability

Change-Id: I441a49ce08b6ecb1d735ca453552fa92026c5016
2013-11-26 03:21:13 +00:00
Doug Zongker
58207b84d3 fix use of RGBA images in minui
Bug: 10934401
Change-Id: I471b30e5b2e877c620e4a0a524e950cddbc6d2c0
2013-09-25 16:41:07 -07:00
Todd Poynor
a5ef19fabd recovery: fix epoll events type to uint32_t
Change-Id: I5db9987102201c18821acb45d1f824e9865a1451
2013-09-17 21:58:52 +00:00
Todd Poynor
4665ede960 minui: add ev_get_epollfd() to retrieve epoll file descriptor
To allow use of ev_* functions with an external main loop.

Change-Id: If73717b64d7c455ca726b90a815a31c1edf52544
2013-09-12 12:42:34 -07:00
Todd Poynor
1fc89d4c84 minui: convert ev_*() event interface to epoll
Help enable external main loop combined with ev_*() key event processing.

Specify EPOLLWAKEUP to hold a wakelock on any event, assuming this is needed
(may need to make this optional).

Convert callback events parameter to unsigned int.

Change-Id: Ib5e09abbd7724ffd830e2cf8e25e7eb59d3aa072
2013-09-12 12:42:33 -07:00
John Reck
19877de513 am 5c4e1dac: Merge "Update libpng API usage"
* commit '5c4e1dac0bd8f31559bd50eec4343b7a17b7a976':
  Update libpng API usage
2013-08-27 09:54:05 -07:00
John Reck
94fd07ba6d Update libpng API usage
Remove usage of deprecated methods

Change-Id: I747568a2c8c0c65ecbc9a3da4bac7b9cac7708ab
2013-08-26 16:45:33 -07:00