Commit 68ed9fa3ec66b3e41207546cde7c4b1cae3e4174

  • avatar
  • Chia-I Wu <olvaffe @gm…l.com>
  • Thu Aug 06 09:15:44 CEST 2009
Re-enable boot animation.

Boot animation was disabled in 17f38d332c4cb6aa4d6b07072fb3335dc77d6db9.
  
131131
132132 // create the native surface
133133 sp<Surface> s = session()->createSurface(getpid(), 0, dinfo.w, dinfo.h,
134 PIXEL_FORMAT_RGB_565);
134 PIXEL_FORMAT_RGB_565, ISurfaceComposer::eGPU);
135135 session()->openTransaction();
136136 s->setLayer(0x40000000);
137137 session()->closeTransaction();
167167 glEnable(GL_TEXTURE_2D);
168168 glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
169169
170 glViewport(0, 0, mWidth, mHeight);
171 glOrthof(0.0f, (GLfloat) mWidth, 0.0f, (GLfloat) mHeight, -1.0f, 1.0f);
172
170173 return NO_ERROR;
171174}
172175
178178 Thread::requestExit();
179179}
180180
181static void DrawTex(GLfloat x, GLfloat y, GLfloat z, GLfloat w, GLfloat h)
182{
183 const GLfloat texs[4][2] = {
184 { 0.0f, 0.0f },
185 { 1.0f, 0.0f },
186 { 1.0f, 1.0f },
187 { 0.0f, 1.0f },
188 };
189 GLfloat verts[4][3];
190
191 verts[0][0] = x;
192 verts[0][1] = y;
193 verts[0][2] = z;
194 verts[1][0] = x + w;
195 verts[1][1] = y;
196 verts[1][2] = z;
197 verts[2][0] = x + w;
198 verts[2][1] = y + h;
199 verts[2][2] = z;
200 verts[3][0] = x;
201 verts[3][1] = y + h;
202 verts[3][2] = z;
203
204 glVertexPointer(3, GL_FLOAT, 0, verts);
205 glTexCoordPointer(2, GL_FLOAT, 0, texs);
206 glEnableClientState(GL_VERTEX_ARRAY);
207 glEnableClientState(GL_TEXTURE_COORD_ARRAY);
208
209 glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
210
211 glDisableClientState(GL_VERTEX_ARRAY);
212 glDisableClientState(GL_TEXTURE_COORD_ARRAY);
213}
214
181215bool BootAnimation::threadLoop() {
182216 bool r = android();
183217 eglMakeCurrent(mDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
257257
258258 glDisable(GL_BLEND);
259259 glBindTexture(GL_TEXTURE_2D, mAndroid[1].name);
260 glDrawTexiOES(x, yc, 0, mAndroid[1].w, mAndroid[1].h);
261 glDrawTexiOES(x + mAndroid[1].w, yc, 0, mAndroid[1].w, mAndroid[1].h);
260 DrawTex(x, yc, 0, mAndroid[1].w, mAndroid[1].h);
261 DrawTex(x + mAndroid[1].w, yc, 0, mAndroid[1].w, mAndroid[1].h);
262262
263263 glEnable(GL_BLEND);
264264 glBindTexture(GL_TEXTURE_2D, mAndroid[0].name);
265 glDrawTexiOES(xc, yc, 0, mAndroid[0].w, mAndroid[0].h);
265 DrawTex(xc, yc, 0, mAndroid[0].w, mAndroid[0].h);
266266
267267 eglSwapBuffers(mDisplay, mSurface);
268268
  
209209 property_get("debug.sf.showfps", value, "0");
210210 mDebugFps = atoi(value);
211211 property_get("debug.sf.nobootanimation", value, "0");
212 /* do not show boot animation as eagle is not thread-safe */
213 mDebugNoBootAnimation = true;
212 mDebugNoBootAnimation = atoi(value);
214213
215214 LOGI_IF(mDebugRegion, "showupdates enabled");
216215 LOGI_IF(mDebugCpu, "showcpu enabled");