zoukankan      html  css  js  c++  java
  • kernel logo到开机动画之间闪现黑屏(android 5.X)

    在BootAnimation開始画图之前,会先做一次clear screen的动作,避免出现前面的图干扰到BootAnimation的显示。

    通过check main_log先确认播放开机动画是哪个function。在相应function删除clear screen的动作的相应代码。
    /frameworks/base/cmds/bootanimation/BootAnimation.cpp
    450bool BootAnimation::android()
    451{
    452 initTexture(&mAndroid[0], mAssets, "images/android-logo-mask.png");
    453 initTexture(&mAndroid[1], mAssets, "images/android-logo-shine.png");
    454
     
    /*-删除clear screen相应code-*/
    455 // clear screen
    456 glShadeModel(GL_FLAT);
    457 glDisable(GL_DITHER);
    458 glDisable(GL_SCISSOR_TEST);
    459 glClearColor(0,0,0,1);
    460 glClear(GL_COLOR_BUFFER_BIT);
    461 eglSwapBuffers(mDisplay, mSurface);
    /*-删除clear screen相应code-*/


    462
    463 glEnable(GL_TEXTURE_2D);
    464 glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
    465
    ......
     
     
    594bool BootAnimation::movie()
    ......
    /*-删除clear screen相应code-*/
    700 // clear screen
    701 glShadeModel(GL_FLAT);
    702 glDisable(GL_DITHER);
    703 glDisable(GL_SCISSOR_TEST);
    704 glDisable(GL_BLEND);
    705 glClearColor(0,0,0,1);
    706 glClear(GL_COLOR_BUFFER_BIT);
    707
    708 eglSwapBuffers(mDisplay, mSurface);
    /*-删除clear screen相应code-*/
    709
    ......
     
     
     
    1128bool BootAnimation::MTKmovie()
    ......
    /*-删除clear screen相应code-*/
    1222 // clear screen
    1223 glDisable(GL_DITHER);
    1224 glDisable(GL_SCISSOR_TEST);
    1225 glDisable(GL_BLEND);
    1226 glClear(GL_COLOR_BUFFER_BIT);
    1227
    1228 eglSwapBuffers(mDisplay, mSurface);
    /*-删除clear screen相应code-*/
    1229
     

  • 相关阅读:
    codefoces 1405 D Tree Tag
    洛谷P3413 萌数
    数位DP模板
    leetcode 统计所有可行路径
    Josephus Transform 加速置换
    牛客IOI周赛18-提高组 排列
    Find a way HDU
    Oil Deposits HDU
    Fire! UVA
    Pots POJ
  • 原文地址:https://www.cnblogs.com/yxwkf/p/5403207.html
Copyright © 2011-2022 走看看