What that call is doing is not turning off HW drawing, it is creating a
separate layer (bitmap) which that specific view can do software drawing in
to, but it is then drawn to the window with the GPU.

My first answer would be that this option is a developer option, and users
shouldn't be changing it, and they get what they deserve when apps crash.

I know that doesn't help with you getting crash reports from users messing
with things they shouldn't.

You could check in your app if hardware acceleration is being used, and if
in that case just change your UI to a simple message telling them they need
to turn off that developer debugging tool.

On Thu, Mar 1, 2012 at 12:46 PM, Ab <abe.oppenh...@gmail.com> wrote:

> My app allows the user to draw on the screen by capturing and
> processing touch events. Additionally, my application makes use of
> Canvas.drawPicture and some other methods not supported by hardware
> acceleration.
>
> On some ICS devices there is an option to force hardware acceleration
> in settings: "force gpu rendering, use 2d harware acceleartion in
> applciations". When this is enabled, my application crashes with
> error: android.view.GLES20Canvas.drawPicture(GLES20Canvas.java:895).
> So, I explicitly disabled hardware acceleration on the View that uses
> this method with: View.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
>
> However, disabling hardware acceleration in this way impacts the
> performance of my drawing, the drawing gets "choppy", as if less
> MotionEvent.ACTION_MOVE are being generated. This happens on all 3.0+
> devices, regardless of if the "force acceleration" setting is on.
>
> So, I figure that there was something in the View's LayerType which
> was assisting my drawing, and that this is lost when I call
> View.setLayerType(...). Prior to my call to View.setLayerType(...),
> View.getLayerType() evaluates to LAYER_TYPE_NONE.
>
> Any suggestions as to how to explicitly prevent Hardware Acceleration
> while preserving whatever it is that was assisting my touch input?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to