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.