The Honeycomb docs are vague:
When the hardware-accelerated renderer is enabled, most operations in Canvas, Paint, Xfermode, ColorFilter, Shader, and Camera are accelerated.
Is there a definitive list of the exact APIs that are (and are not) supported when hardware acceleration is enabled? Some methods fail fast with exceptions, while other features simply render differently when acceleration is enabled.
For example, Canvas.clipPath(...) fails fast with an exception. Though the clipPath API makes no mention of this, it is easy enough to determine when testing on real hardware.
Other features render improperly without throwing exceptions, leading to difficult and time-consuming porting efforts. For example, I have a screen that uses a ComposeShader consisting of a RadialGradient and LinearGradient, using PorterDuff.Mode.SRC_IN. It looks beautiful without acceleration, but completely wrong when acceleration is enabled.
I'm working on getting a complete list published. The features not supported are:
- clipPath
- clipRegion
- clipRect with XOR or Difference op
- drawPicture
- drawPoints
- drawPosText
- drawTextOnPath
- drawTextPos
- drawVertices
- setMaskFilter
- setRasterizer
Edit: Read this article to know everything there is to know about hardware acceleration in Android 3.0.
However, what you are describing should work just fine. All gradients are supported, as well as all blending modes. Please report bugs with reproducible test cases for any issue you encounter and I'll get them fixed.
来源:https://stackoverflow.com/questions/5215815/which-apis-are-supported-when-hardware-acceleration-is-enabled-on-honeycomb