By MANI


2014-08-29 14:03:35 8 Comments

Can anyone explain these developer options?

  • Force GPU rendering
  • Disable non-rectangular clip ops
  • Force 4X MSAA
  • Disable HW overlays

What are the possible effects that can be seen in my device by disabling/enabling them? [Note: I've found other options by Google-ing but not these.]

Do the developer settings affect battery life by using lower animation speeds (all to 2x precisely) or higher animation speeds (0.5x precisely) at the expense of user experience?

1 comments

@RossC 2014-08-29 14:51:17

Please keep in mind these are Developer options, and may be of no use, or have a negative impact on the performance of your device.

Force GPU rendering

The GPU is the Graphics Processing Unit. It's very much like the CPU, but instead of crunching numbers and taking care of tasks for the operating system and hardware, the GPU renders graphical information and puts it on the screen for you.

The CPU can process graphical instructions just fine, but doing so takes time away from doing other computations, and can lead to lag while graphical instructions are processed

In Ice Cream Sandwich onwards, developers (or power users) are given the option to force apps to use GPU rendering, whether that bit is on or off in the app's manifest. This does not necessarily make the app faster, and may cause issues.


Disable non-rectangular clip ops

This is too technical for me to explain in great detail. Basically a "canvas" is used for drawing. The source Code for Android contains this:

/**
     * Turn on to **debug non-rectangular clip operations**.
     *
     * Possible values:
     * "hide", to disable this debug mode
     * "highlight", highlight drawing commands tested against a non-rectangular clip
     * "stencil", renders the clip region on screen when set
     *
     * @hide
     */
    public static final String DEBUG_SHOW_NON_RECTANGULAR_CLIP_PROPERTY =
            "debug.hwui.show_non_rect_clip";

You could turn it off to create unusual (non rectangular) canvas areas. See here for more details on this

As per @IanNi-Lewis points out in his comment:

It's probably worth pointing out that "non-rectangular clip regions" is a little misleading. It should be "clip regions that aren't screen-aligned rectangles." If you have a rectangular clip region that's rotated by some non-multiple of 90 degrees, then it goes down the same slow path as a clip region shaped like a donut or what have you. (The "slow path" uses the stencil buffer, and probably doesn't need to be as slow as it is; it's a good area for future optimization.)


Force 4X MSAA

Force 4x MSAA does not require a rooted device. This option does the same as any Anti Aliasing filter in PC games - smooths out all the pixelization and provides better rendering, which means better looking graphics. Users should know that this function is only recommended for devices that have GPU capable of native MSAA support.

From Wikipedia:

In signal processing and related disciplines, aliasing is an effect that causes different signals to become indistinguishable (or aliases of one another) when sampled. It also refers to the distortion or artifact that results when the signal reconstructed from samples is different from the original continuous signal.


Disable HW overlays

Without a hardware overlay every application that is displaying things on the screen will share video memory and will have to constantly check for collision and clipping to render a proper image, this can cost a lot of processing power. With a hardware overlay each application gets its own portion of video memory, getting rid of the need to check for collision and clipping.

As @DanHulme put it: Windows in Android are always composited rather than rendered into shared video memory. Normally, SurfaceFlinger uses the GPU for composition, but it will use a hardware overlay when that's possible, which is faster and uses less battery. Disabling overlays means it will always use GPU rendering. It's only useful for debugging system integration or HW video decode: even app developers don't need to turn on this option

@Dan Hulme 2014-08-29 15:45:42

4xMSAA might not actually be slower. On certain GPUs such as Mali-400, the speed difference between 4xMSAA and no anti-aliasing is negligible because of how fragment shaders execute. It's also worth mentioning that this only affects GLES applications, and won't make text and icons in normal apps any crisper.

@Dan Hulme 2014-08-29 15:50:52

I don't think your description of HW overlays is correct. Windows in Android are always composited rather than rendered into shared video memory. Normally, SurfaceFlinger uses the GPU for composition, but it will use a hardware overlay when that's possible, which is faster and uses less battery. Disabling overlays means it will always use GPU rendering. It's only useful for debugging system integration or HW video decode: even app developers don't need to turn on this option.

@RossC 2014-08-29 19:49:13

I'm away from my PC I'll edit as soon as I can, got a bit muddled. Or feel free to edit

@Canadian Luke 2014-08-30 02:21:24

Well updating to use gpu processing made the se app not crash on this question :-)

@MANI 2014-08-30 03:39:02

@RossC - Thank you for the answer. Everything is okay except 'Disable HW overlays'. Could you expand it for me? And 'Disable non-rectangular clip ops' is way too technical for me to understand as I'm not a developer. I've added one more point in my question. Check it out.

@MANI 2014-08-30 03:40:59

@DanHulme - Thank you too... for clarification.

@RossC 2014-09-01 07:14:00

Updated answer now, however, @MANI I don't know if I can answer what effects the battery more with the animation speed. The screen being on uses so much battery that it loading a quick animation at half speed or twice the speed would only have a negligible effect AFAIK. Unless anyone can advise me on that in more detail. Really the screen uses so much battery that most other things really don't matter once it is on (excluding very intensive games etc obviously)

@user285oo6 2014-09-01 07:18:57

@Ross I don't think it has a huge effect on battery just some battery saving like in Windows wherein we disable the Transparent graphics(I.e. Aero theme is suggested to disable for improving battery time)

@Ian Ni-Lewis 2014-12-11 20:16:09

@RossC it's probably worth pointing out that "non-rectangular clip regions" is a little misleading. It should be "clip regions that aren't screen-aligned rectangles." If you have a rectangular clip region that's rotated by some non-multiple of 90 degrees, then it goes down the same slow path as a clip region shaped like a donut or what have you. (The "slow path" uses the stencil buffer, and probably doesn't need to be as slow as it is; it's a good area for future optimization.)

@RossC 2014-12-12 09:32:52

@IanNi-Lewis whew, this is getting very technical. Many thanks for your input, I have posted what you said (with credit) into the answer directly. Much appreciated!

@shingaridavesh 2015-01-02 03:55:00

So when we say that "Disable HW overlays", then does that mean that application (eg. VLC player) should have code support so as to make it possible to run it on GPU insted of CPU OR does the android internally converts the CPU specific code into GPU understandable code?

@RossC 2015-01-02 10:43:36

@shingaridavesh as far as I understand it, this is done at an OS level so, in theory, requires no extra code. Disable HW Overlays doesn't force any rendering as far as I can tell. I am open to corrections though.

Related Questions

Sponsored Content

3 Answered Questions

[SOLVED] You are already a developer/but no developer options

2 Answered Questions

[SOLVED] Can USB Debugging and Developer Options be used to spy on me?

1 Answered Questions

[SOLVED] Re-enabling Developer Options

1 Answered Questions

[SOLVED] Can't enable "Developer options" on Android 8.1

2 Answered Questions

[SOLVED] Get N on screen when trying to access developer options

Sponsored Content