Using Hardware Layer in Custom View onDraw

后端 未结 2 1479
礼貌的吻别
礼貌的吻别 2021-02-15 12:19

So I\'m trying to understand how I can properly use hardware acceleration (when available) in a custom View that is persistently animating. This is the basic premis

2条回答
  •  不思量自难忘°
    2021-02-15 13:22

    You can use Android's Tracer for OpenGL ES to see if your view issue OpenGL commands.

    From developer.android.com

    Tracer is a tool for analyzing OpenGL for Embedded Systems (ES) code in your Android application. The tool allows you to capture OpenGL ES commands and frame by frame images to help you understand how your graphics commands are being executed.

    There is also a tutorial about Android Performance Study by Romain Guy which describes its use almost step by step.

提交回复
热议问题