Android Hardware acceleration for Views with LAYER_TYPE_NONE

1k views Asked by At

I was not able to find a clear answer (found some contradicting answers) for the following scenario:

  1. Turn on Android HW accelerations (by adding to the manifest android:hardwareAccelerated="true")
  2. Set a View to layer type LAYER_TYPE_NONE [view.setLayerType(View.LAYER_TYPE_NONE,null)].

Does the view is rendered on the GPU or skia (software)?

I think that it will use Hardware rendering model but just not backed by Hardware layer (the view will rendered into screen without any "BITMAP/TEXTURE" like buffer on the GPU, but still should be rendered by the GPU and not skia).

Am I correct? And if I am, Why google called the disable HW Acceleration for View with the same API while just setting the layer type to software, where it is not related to layers at all, they should had different function for disabling the view HW acceleration and setting the view layer to software should have done the same as Canvas.saveLayer().

References say that:

LAYER_TYPE_NONE: the View is rendered normally, and is not backed by an off-screen buffer.

by normally they mean software/hardware according to the manifest file?

http://android-developers.blogspot.co.il/2011/03/android-30-hardware-acceleration.html

0

There are 0 answers