diff options
author | 2021-07-29 21:49:07 +0000 | |
---|---|---|
committer | 2021-08-16 20:17:48 +0000 | |
commit | dd7ed60de0efbc682ee98605faa128fa39bb99dc (patch) | |
tree | f08d022ea2818afe1d64681d9a4c74af4ceeea52 /cmds/bootanimation/BootAnimation.h | |
parent | 3e7384fbe27d80030c8c8988d5a1a0adc2e6783e (diff) |
Revert "Revert "Migrate boot animation from GLES 1.0 to GLES2.0.""
This reverts commit 2ded80094ee534cfbf360e89562f9d6f1cee33e0.
Reason for revert: Working on fixing the regression that happened on Wembly, so we can resume feature work.
Change-Id: I9a624beffdaf97f131046fd4441a251ed3a448ad
Test: adb shell /system/bin/bootanimation
Bug: 190093578
(cherry picked from commit 8eedc0293d53d31f96c2f9cd2f773149aaf5d63f)
Diffstat (limited to 'cmds/bootanimation/BootAnimation.h')
-rw-r--r-- | cmds/bootanimation/BootAnimation.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/cmds/bootanimation/BootAnimation.h b/cmds/bootanimation/BootAnimation.h index f8a31c6d8790..7b616d91c58b 100644 --- a/cmds/bootanimation/BootAnimation.h +++ b/cmds/bootanimation/BootAnimation.h @@ -31,7 +31,7 @@ #include <binder/IBinder.h> #include <EGL/egl.h> -#include <GLES/gl.h> +#include <GLES2/gl2.h> namespace android { @@ -166,6 +166,7 @@ private: status_t initTexture(Texture* texture, AssetManager& asset, const char* name); status_t initTexture(FileMap* map, int* width, int* height); status_t initFont(Font* font, const char* fallback); + void initShaders(); bool android(); bool movie(); void drawText(const char* str, const Font& font, bool bold, int* x, int* y); @@ -173,6 +174,7 @@ private: void drawProgress(int percent, const Font& font, const int xPos, const int yPos); void fadeFrame(int frameLeft, int frameBottom, int frameWidth, int frameHeight, const Animation::Part& part, int fadedFramesCount); + void drawTexturedQuad(float xStart, float yStart, float width, float height); bool validClock(const Animation::Part& part); Animation* loadAnimation(const String8&); bool playAnimation(const Animation&); @@ -218,6 +220,12 @@ private: sp<TimeCheckThread> mTimeCheckThread = nullptr; sp<Callbacks> mCallbacks; Animation* mAnimation = nullptr; + GLuint mImageShader; + GLuint mTextShader; + GLuint mImageFadeLocation; + GLuint mImageTextureLocation; + GLuint mTextCropAreaLocation; + GLuint mTextTextureLocation; }; // --------------------------------------------------------------------------- |