跳转到相应内容

最常访问

最近访问

navigation

Examine OpenGL ES Apps with the GPU Debugger

Note: The GPU Debugger has been removed from Android Studio as of version 2.3. An open-source, standalone version of the tool is available on GitHub.

The GPU Debugger helps you analyze and debug your apps that use OpenGL ES 2.0 or 3.1. It lets you inspect the GPU state and helps you understand what caused a specific rendering outcome. You can start a GPU trace from an app project in Android Studio. You can then display the GPU trace in the GPU Debugger.

To collect a GPU trace, you can run your app on a connected Android hardware device, including a phone, tablet, Android TV, or Android Auto. Your Android Studio project must be set to debuggable, not release.

Android Studio lets you analyze Android apps written in any language supported by projects, including Java, C, and C++.

Who can benefit from the GPU Debugger?

With the GPU Debugger, developers can analyze any Android app that uses OpenGL ES to render graphics on an Android device, for example, a game or map app. Here are some typical scenarios where the GPU Debugger is useful to game developers.

Many game developers use 3D computer graphics software, such as Autodesk Maya or open-source Blender, to create models. For example, they can create models of inanimate objects or animated characters in the game. They then import the 3D models into a game engine, such as Unity or Unreal Engine, and create their game. The engine generates the game app code for the platform, such as Android or iOS. Whether game developers choose to primarily auto-generate code, or write much of the code themselves, the GPU Debugger can help identify areas to improve, optimize, and correct.

Some developers port games from one platform to another. For example, they might take a game that runs on Windows using Microsoft DirectX and port it to Android. In these cases, the GPU Debugger can help to identify and correct graphical errors that occur due to the different rendering schemes. The fix can sometimes be as simple as changing the parameters that a game engine uses to generate code on a different platform.

About the GPU Debugger display

After you capture a GPU trace, Android Studio opens it in the GPU Debugger. The trace file appears in the project-specific Captures window, so you can open it any time you want. You can also open a GPU trace file stored on your computer.

Figure 1 shows a GPU trace displayed in the GPU Debugger.

Figure 1. GPU Debugger display.

Where to go next

To take a GPU trace from a project, see Capture a GPU Trace.

For instructions on using the GPU Debugger, see Analyze a Trace in the GPU Debugger.

此网站会使用 Cookie 来存储您在此网站上指定的语言和显示选项偏好设置。

获取最新的 Android Developers 资讯和提示,助您在 Google Play 上取得成功。

* 必填字段

成功!

在微信上关注 Google Developers

要以浏览此网站吗?

您请求访问的是网页,但是您为此网站设置的语言偏好为

要更改您的语言偏好设置并以浏览此网站吗?如果以后您想要更改语言偏好设置,请使用每个页面底部的语言菜单。

该类需要 或更高的 API 级别

此文档已被隐藏,因为您为该文档选择的 API 级别是 。您可以使用左侧导航栏上方的选择器来更改文档的 API 级别。

要详细了解如何根据您的应用需求指定 API 级别,请参阅支持不同平台版本

Take a short survey?
Help us improve the Android developer experience. (April 2018 — Developer Survey)