Android graphics-hardware acceleration (hardware acceleration) (iii)

Source: Internet
Author: User

Drawing operations not supported by hardware acceleration

During hardware acceleration, the 2D rendering pipeline supports most of the drawing operations that are usually used for canvas and some rarely used operations. Used for rendering applicationsProgramAll of the drawing operations are sent to the Android system, the default widgets and layout, and some common visual effects, such as reflection and tile texture effects are supported. The following lists known actions that do not support hardware acceleration:

1. Canvas

Chippath ()

Chipregion ()

Drawpicture ()

Drawpostext ()

Drawtextonpath ()

Drawvertives ()

2. Paint

Setlineartext ()

Setmaskfilter ()

Setrasterizer ()

In addition, some operations may vary with hardware acceleration enabled:

1. Canvas

Cliprect (): hardware acceleration ignores the XOR, difference, and reversedifference editing modes. 3D transformation is not applicable to editing rectangles.

Drawbitmapmesh (): hardware acceleration ignores color arrays.

Drawlines (): hardware acceleration does not support anti-sawtooth processing.

Setdrawfilter (): hardware acceleration can be set but ignored.

2. Paint

Setdither (): hardware acceleration ignores its settings.

Setfilterbitmap (): bitmap filtering is always enabled.

Setshadowlayer (): this setting is only valid for text.

3. composeshader

The composeshader object can only contain different types of pasters (for example, bitmapshader and lineargradient, but cannot contain instances of two bitmapshader objects ).

The composeshader object cannot contain a composeshader object.

If the application is affected by these incorrect features or restrictions, you can disable hardware acceleration by calling the setlayertype (view. layer_type_software, null) method for the affected parts of the application. In this way, hardware acceleration can still be used elsewhere.

Related Article

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.