aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDoug Zongker2014-03-07 11:21:25 -0600
committerDoug Zongker2014-03-07 11:45:44 -0600
commiteac881c952fc6be0beeb5f719e3a70e651f3610e (patch)
tree89508421fe11ed892975a0d967c12a9e97619384 /screen_ui.h
parent182c1df40a3af36eca4ff0106a26a93f5744a56e (diff)
downloadplatform-bootable-recovery-eac881c952fc6be0beeb5f719e3a70e651f3610e.tar.gz
platform-bootable-recovery-eac881c952fc6be0beeb5f719e3a70e651f3610e.tar.xz
platform-bootable-recovery-eac881c952fc6be0beeb5f719e3a70e651f3610e.zip
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
Diffstat (limited to 'screen_ui.h')
-rw-r--r--screen_ui.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/screen_ui.h b/screen_ui.h
index 5c4366d2..0221ff25 100644
--- a/screen_ui.h
+++ b/screen_ui.h
@@ -68,8 +68,7 @@ class ScreenRecoveryUI : public RecoveryUI {
68 pthread_mutex_t updateMutex; 68 pthread_mutex_t updateMutex;
69 gr_surface backgroundIcon[5]; 69 gr_surface backgroundIcon[5];
70 gr_surface backgroundText[5]; 70 gr_surface backgroundText[5];
71 gr_surface *installationOverlay; 71 gr_surface *installation;
72 gr_surface *progressBarIndeterminate;
73 gr_surface progressBarEmpty; 72 gr_surface progressBarEmpty;
74 gr_surface progressBarFill; 73 gr_surface progressBarFill;
75 gr_surface stageMarkerEmpty; 74 gr_surface stageMarkerEmpty;
@@ -101,12 +100,11 @@ class ScreenRecoveryUI : public RecoveryUI {
101 pthread_t progress_t; 100 pthread_t progress_t;
102 101
103 int animation_fps; 102 int animation_fps;
104 int indeterminate_frames;
105 int installing_frames; 103 int installing_frames;
106 protected: 104 protected:
107 int install_overlay_offset_x, install_overlay_offset_y;
108 private: 105 private:
109 int overlay_offset_x, overlay_offset_y; 106
107 int iconX, iconY;
110 108
111 int stage, max_stage; 109 int stage, max_stage;
112 110
@@ -120,6 +118,7 @@ class ScreenRecoveryUI : public RecoveryUI {
120 void progress_loop(); 118 void progress_loop();
121 119
122 void LoadBitmap(const char* filename, gr_surface* surface); 120 void LoadBitmap(const char* filename, gr_surface* surface);
121 void LoadBitmapArray(const char* filename, int* frames, gr_surface** surface);
123 void LoadLocalizedBitmap(const char* filename, gr_surface* surface); 122 void LoadLocalizedBitmap(const char* filename, gr_surface* surface);
124}; 123};
125 124