Tuesday, February 13, 2018

graphics - Can anyone explain all these Developer Options?


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?



Answer



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


No comments:

Post a Comment

samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...