summaryrefslogtreecommitdiff
path: root/cmds/bootanimation/BootAnimation.cpp
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2021-09-09 21:34:16 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2021-09-09 21:34:16 +0000
commit03c37591265606e34e390d61d7bf08e42a5bac67 (patch)
treee23460b85e9db7865cfb42933486eef4f47b835e /cmds/bootanimation/BootAnimation.cpp
parent5c492a16388c02c18076824640ad43327e358797 (diff)
parent8dbf247294c0894306573c3207882bc6321fd6ab (diff)
Merge "Fixes boot animation not appearing issue on Oriole." into sc-qpr1-dev am: 3a986bb956 am: 580ae422b6 am: 8dbf247294
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15779528 Change-Id: I4501403e20e0a3b50af1629a3d01b8a20d0cefaa
Diffstat (limited to 'cmds/bootanimation/BootAnimation.cpp')
-rw-r--r--cmds/bootanimation/BootAnimation.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp
index 54fd4307814c..8c39b7140828 100644
--- a/cmds/bootanimation/BootAnimation.cpp
+++ b/cmds/bootanimation/BootAnimation.cpp
@@ -127,7 +127,7 @@ static const char VERTEX_SHADER_SOURCE[] = R"(
})";
static const char IMAGE_FRAG_DYNAMIC_COLORING_SHADER_SOURCE[] = R"(
precision mediump float;
- const float cWhiteMaskThreshold = 0.05f;
+ const float cWhiteMaskThreshold = 0.05;
uniform sampler2D uTexture;
uniform float uFade;
uniform float uColorProgress;
@@ -155,7 +155,7 @@ static const char IMAGE_FRAG_DYNAMIC_COLORING_SHADER_SOURCE[] = R"(
+ g * mix(uStartColor1, uEndColor1, uColorProgress)
+ b * mix(uStartColor2, uEndColor2, uColorProgress)
+ a * mix(uStartColor3, uEndColor3, uColorProgress);
- color = mix(color, vec4(vec3((r + g + b + a) * 0.25f), 1.0), useWhiteMask);
+ color = mix(color, vec4(vec3((r + g + b + a) * 0.25), 1.0), useWhiteMask);
gl_FragColor = vec4(color.x, color.y, color.z, (1.0 - uFade)) * color.a;
})";
static const char IMAGE_FRAG_SHADER_SOURCE[] = R"(
@@ -698,6 +698,11 @@ GLuint compileShader(GLenum shaderType, const GLchar *source) {
glGetShaderiv(shader, GL_COMPILE_STATUS, &isCompiled);
if (isCompiled == GL_FALSE) {
SLOGE("Compile shader failed. Shader type: %d", shaderType);
+ GLint maxLength = 0;
+ glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &maxLength);
+ std::vector<GLchar> errorLog(maxLength);
+ glGetShaderInfoLog(shader, maxLength, &maxLength, &errorLog[0]);
+ SLOGE("Shader compilation error: %s", &errorLog[0]);
return 0;
}
return shader;