Debug GPU Overdraw Walkthrough

  This walkthrough shows how to visualize overdraw on your mobile device by color-coding interface elements based on how often they are drawn underneath.

  What it's good for:

 检测哪个view有过度的绘制。不同颜色含义不同。
    1. Showing where an app might be doing more rendering work than necessary.
    2. Helping you see where you might be able to reduce rendering overhead.

2.Prerequisites

3.Visualizing Overdraw on your Mobile Device

  1. On your mobile device, go to Settings and tap Developer Options.
  2. In the Hardware accelerated rendering section, select Debug GPU Overdraw.
  3. In the Debug GPU overdraw popup, select Show overdraw areas.
    开发者选项->硬件加速渲染->调试 GPU 过度绘制->显示过度绘制区域

       5.1.1版本设置如图: 

       Figure 1. Steps for turning on Debug GPU Overdraw.

  4. Don't panic as your screen turns into a delirium of colors. The coloring is provided to help you diagnose your app's display behavior.        
    打开开发选项中的 调试GPU过度绘制 后,可以通过颜色判断应用各部位view的绘制是否过度。 

       

      Figure 2. Example of Debug GPU Overdraw output.

  5. The colors are hinting at the amount of overdraw on your screen for each pixel, as follows:
    过度绘制情况的好坏通过颜色来表示,从正常颜色,蓝色、绿色、淡红色到红色,分别代表从好到坏(没有过度绘制,1x过度绘制、2x过度绘制、3x过度绘制和超过4x过度绘制)。少量的淡红色可以接受,二红色就是实现有问题,需要解决。
    • True color: No overdraw        正常颜色,没有过度绘制
    • Blue: Overdrawn once       有1次
    • Green: Overdrawn twice         有2次
    • Pink: Overdrawn three times     有3次
    • Red: Overdrawn four or more times  4次以上

        Figure 3. Color key for Debug GPU Overdraw output.

  6. Some overdraw is unavoidable. As you are tuning your app's user interface, the goal is to arrive at a visualization that shows mostly true colors and 1X overdraw in blue.
    有些时候,过度绘制是可以避免不了的,保持在正常颜色和1x过度绘制是可接受的。

    

      Figure 4. Examples of undesirable and desirable Debug GPU Overdraw output.

Android 性能优化(3)性能工具之「调试 GPU 过度绘制」Debug GPU Overdraw Walkthrough-查看哪些view过度绘制了的更多相关文章

  1. Android 性能优化(26)*性能工具之「Batterystats,Battery Historian」Batterystats & Battery Historian Walkthrough

    Batterystats & Battery Historian Walkthrough Working with Batterystats & Battery Historian B ...

  2. Android 性能优化(21)*性能工具之「GPU呈现模式分析」Profiling GPU Rendering Walkthrough:分析View显示是否超标

    Profiling GPU Rendering Walkthrough 1.In this document Prerequisites Profile GPU Rendering $adb shel ...

  3. Android 性能优化 五 性能分析工具dumpsys的使用

    Android提供的dumpsys工具能够用于查看感兴趣的系统服务信息与状态,手机连接电脑后能够直接命令行运行adb shell dumpsys 查看全部支持的Service可是这样输出的太多,能够通 ...

  4. Android开发学习之路--性能优化之常用工具

      android性能优化相关的开发工具有很多很多种,这里对如下六个工具做个简单的使用介绍,主要有Android开发者选项,分析具体耗时的Trace view,布局复杂度工具Hierarchy Vie ...

  5. MYSQL之性能优化 ----MySQL性能优化必备25条

    今天,数据库的操作越来越成为整个应用的性能瓶颈了,这点对于Web应用尤其明显.关于数据库的性能,这并不只是DBA才需要担心的事,而这更是我 们程序员需要去关注的事情.当我们去设计数据库表结构,对操作数 ...

  6. 前端性能优化jQuery性能优化

    一.使用合适的选择器 $("#id"); 1.使用id来定位DOM元素无疑是最佳提高性能的方式,因为jQuery底层将直接调用本地方法document.getElementById ...

  7. Java程序性能优化之性能概述

    性能的基本概念 一).什么叫程序的性能? 程序运行所需的内存和时间. 二).性能的表现形式: 1).执行速度: 程序的反应是否迅速,响应时间是否足够短. 2).启动时间:程序从运行到可以处理正常业务所 ...

  8. Android性能优化之Systrace工具介绍(一) _&& Systrace生成的trace.html打开空白或者打不开的解决办法

    1.必须用Chrome打开 2.在mac电脑上,可能Chrome打开也是空白,解决办法是:在chrome地址栏中输入”chrome:tracing”,然后点击load按钮load你的trace.htm ...

  9. Android性能优化-线程性能优化

    原文链接:Better Performance through Threading 线程的性能 熟练使用Android上的线程可以帮助你提高应用程序的性能. 本篇文章讨论了使用线程的几个方面:使用UI ...

随机推荐

  1. msp430入门学习20

    msp430的USART模式 msp430入门学习

  2. JSP中自动刷新

    以下内容引用自http://wiki.jikexueyuan.com/project/jsp/auto-refresh.html: 细想一个显示在线比赛分数.股市状态或当前交易额的网页.对于所有这种类 ...

  3. uva 1411 Ants (权值和最小的完美匹配---KM算法)

    uva 1411 Ants Description Young naturalist Bill studies ants in school. His ants feed on plant-louse ...

  4. Android多媒体-MediaPlayer唤醒锁及音频焦点

    MediaPlayer的唤醒锁 一般使用MediaPlayer播放音频流,推荐使用一个Service来承载MediaPlayer,而不是直接在Activity里使用.可是Android系统的功耗设计里 ...

  5. redux 调试工具

    首先安装谷歌插件: redux-devtools 然后项目中安装插件:redux-devtools-extension 最后在创建 store 的时候进行配置: import { composeWit ...

  6. Python爬虫开发【第1篇】【beautifulSoup4解析器】

    CSS 选择器:BeautifulSoup4 Beautiful Soup 也是一个HTML/XML的解析器,主要的功能也是如何解析和提取 HTML/XML 数据. pip 安装:pip instal ...

  7. yispider 开源小说採集器 (来源http://git.oschina.net/yispider/yispider 我的改动版由于他的我无法跑)

    我的git地址  http://git.oschina.net/yangdc/yispider 小说採集器 watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/ ...

  8. C语言8大经典排序算法(2)

    二.插入类排序 插入排序(Insertion Sort)的基本思想是:每次将一个待排序的记录,按其关键字大小插入到前面已经排好序的子文件中的适当位置,直到全部记录插入完成为止. 插入排序一般意义上有两 ...

  9. YTU 2543: 数字整除

    2543: 数字整除 时间限制: 1 Sec  内存限制: 128 MB 提交: 33  解决: 8 题目描述 定理:把一个至少两位的正整数的个位数字去掉,再从余下的数中减去个位数的5倍.当且仅当差是 ...

  10. iOS开发-多台机器共用证书问题

    今天又被证书的问题卡壳了: 在公司的电脑上申请的开发.发布证书,回家用自己的电脑从苹果开发者中心上将证书和配置文件都下载下来提示用不了,弄了很久才想起.p12文件,必须从申请证书的电脑上导出,导入到自 ...