From b723f4f38f53a38502abb1a63165ac0749bc9cd9 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Fri, 11 Dec 2015 15:18:51 -0800 Subject: res: Embed FPS into icon_installing.png. We allow vendor-specific icon installing image but have defined private animation_fps that can't be overridden. This CL changes the image generator to optionally embed FPS (otherwise use the default value of 20) into the generated image. For wear devices, they are using individual images instead of the interlaced one. Change the animation_fps from private to protected so that it can be customized. Bug: 26009230 Change-Id: I9fbf64ec717029d4c54f72316f6cb079e8dbfb5e --- screen_ui.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'screen_ui.h') diff --git a/screen_ui.h b/screen_ui.h index 8e18864d7..08a5f44a9 100644 --- a/screen_ui.h +++ b/screen_ui.h @@ -109,6 +109,8 @@ class ScreenRecoveryUI : public RecoveryUI { pthread_t progress_thread_; + // The following two are parsed from the image file + // (e.g. '/res/images/icon_installing.png'). int animation_fps; int installing_frames; @@ -135,7 +137,7 @@ class ScreenRecoveryUI : public RecoveryUI { void DrawTextLines(int* y, const char* const* lines); void LoadBitmap(const char* filename, GRSurface** surface); - void LoadBitmapArray(const char* filename, int* frames, GRSurface*** surface); + void LoadBitmapArray(const char* filename, int* frames, int* fps, GRSurface*** surface); void LoadLocalizedBitmap(const char* filename, GRSurface** surface); }; -- cgit v1.2.3