Understanding Android 2d/3d Graphics Architecture

Source: Internet
Author: User
Tags skia

First understand the function call of the EGL of Android, get display (corresponding display), then select a supported config (which is supported by the graphics card), then create the Windowsurface, and create the context (context equivalent to OpenGL this state machine), and then you can call GL's drawing function to paint on surface, after the work is done, you need to release the Context, windowsurace these resources

The Android 3D graphics architecture is as follows

When the user uses Glsurfaceview, the EGL function is called, the Glsurfaceview dependent Windowsurace,context are created, and then the Java GL Call is converted to the native call to Libgl.so. Libgl.so will be called to the graphics driver


If no hardware is the GL function of software simulation, it is worth noting that Andoid has optimized the copybit.

Rendering

Previously Android was using Skia to generate 2D graphics, and later (4.1 Jellybean) to improve performance by using OpenGL instead (because it can be GPU), but the previous Skia soft architecture remains

Hardware acceleration is turned on when Use_opengl_render:=true is turned on at compile time (by default), which is the implementation of libhwui.so hardware acceleration

Create surface like 3D, create context, call GL function to draw ...


The above two architectures render surface (whether GPU-rendered or CPU-rendered), and Surfaceflinger calls OpenGL's function at the last screen. is also divided into GPU hardware on screen, or CPU simulation



Understanding Android 2d/3d Graphics Architecture

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.