自学内容网 自学内容网

Android16 提升绘图性能强制GPU渲染

        在性能较差的芯片上面,在某些情况下,比如下移屏幕(降屏)模式下,悬浮球等图标容易出现黑框,比如在Android16 RK3576里面,我尝试了开启单个APK性能也不能完全解决,当有些板载内存比较小,比如8G的时候,又出现悬浮图标黑框的情况。

        研究了一下,选择在开发者模式里面——>停用HW叠加层的功能:

这个功能是始终使用GPU进行屏幕合成,所以绘图更加快速,当然也可能产生不明的BUG,所以Android系统一般是关闭的。

      1.参考设置代码:

packages\apps\Settings\src\com\android\settings\development\HardwareOverlaysPreferenceController.java里面:

/*
 * Copyright (C) 2017 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by ap

原文地址:https://blog.csdn.net/tzj1058756809/article/details/156912003

免责声明:本站文章内容转载自网络资源,如侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!