aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPrashant Malani2016-03-11 12:00:55 -0600
committerPrashant Malani2016-03-11 17:22:20 -0600
commit7a491225bbbb24593a4eda5dabe2fc1850d60dd1 (patch)
tree79758ad1e9fdeeb36f287460131a224fcd79ea90 /screen_ui.h
parent0ba21cff07ceafeaa43e17aa26e341d961f6f29f (diff)
downloadplatform-bootable-recovery-7a491225bbbb24593a4eda5dabe2fc1850d60dd1.tar.gz
platform-bootable-recovery-7a491225bbbb24593a4eda5dabe2fc1850d60dd1.tar.xz
platform-bootable-recovery-7a491225bbbb24593a4eda5dabe2fc1850d60dd1.zip
recovery: Remove SetColor, and other refactoring for WearUI
The only difference from SetColor in ScreenRecoveryUI is the that the LOG messages have slightly different colors. That's not enough to warrant a duplicate function. So this patch removes SetColor and uses the parent class version. This patch also moves the DrawTextLine* functions into ScreenRecoveryUI since they're mostly the same. It also moves char_width and char_height into the class instead of keeping them as static variables. Bug: 27407422 Change-Id: I30428c9433baab8410cf710a01c9b1c44c217bf1
Diffstat (limited to 'screen_ui.h')
-rw-r--r--screen_ui.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/screen_ui.h b/screen_ui.h
index 6d119108..9e1b2dfa 100644
--- a/screen_ui.h
+++ b/screen_ui.h
@@ -131,15 +131,17 @@ class ScreenRecoveryUI : public RecoveryUI {
131 void ClearText(); 131 void ClearText();
132 132
133 void DrawHorizontalRule(int* y); 133 void DrawHorizontalRule(int* y);
134 void DrawTextLine(int* y, const char* line, bool bold);
135 void DrawTextLines(int* y, const char* const* lines);
136 134
137 void LoadBitmapArray(const char* filename, int* frames, int* fps, GRSurface*** surface); 135 void LoadBitmapArray(const char* filename, int* frames, int* fps, GRSurface*** surface);
138 void LoadLocalizedBitmap(const char* filename, GRSurface** surface); 136 void LoadLocalizedBitmap(const char* filename, GRSurface** surface);
139 protected: 137 protected:
138 int char_width_;
139 int char_height_;
140 pthread_mutex_t updateMutex; 140 pthread_mutex_t updateMutex;
141 bool rtl_locale; 141 bool rtl_locale;
142 void LoadBitmap(const char* filename, GRSurface** surface); 142 void LoadBitmap(const char* filename, GRSurface** surface);
143 void DrawTextLine(int x, int* y, const char* line, bool bold);
144 void DrawTextLines(int x, int* y, const char* const* lines);
143}; 145};
144 146
145#endif // RECOVERY_UI_H 147#endif // RECOVERY_UI_H