Need some clarification on Developer Settings


Question

We have a bespoke app that uses a WebView to play some locally stored CSS animations.



I'd like to get full clarification on whether the following Developer options can have any impact on the animations playing in the WebView:




  • Animation and transition scales

  • Forced GPU Rendering

  • Disable Hardware overlays

  • Do not keep activities

  • Limiting background processes



EDIT - Can I also get an explanation as to what "Disable Hardware overlays" does exactly? Would checking it help in any scenario?


Answer

First of all ,those options are meant for development reasons ,mainly for developers to get different debugging outputs for every situation their app may face.



For the first part of your question :




Will those options affect the play of animations in a webView ?




I will go throw the options one by one :




  1. Animation and transition scales :



This option is for the system-core animation the ones included in framwork-res.apk and other system framework or in any android application under res/anim
android animation using XML



Those animations are used by the system to change between views or par third party applications to change between activities view or for playing animations so if you change the Animation and transition scales only those animations will be affected ,since your Application uses the Webview to render and play the animations it will not be affected by those sittings.




  1. Forced GPU Rendering :



As you may already now in any computer or phone there is two types of rendering software rendering and Hardware rendering the first one is when the screen is displayed by the CPU it self ,the second is when the GPU is the one rendering it ,in android the system decides when and where use softrendering or hardrendering if you activate this option the system will always choose the GPU to render the screen ,which may give you a small performance gain because the CPU will remain free for other operations ,the power consumption may increase (corect me if I am wrong) GPU uses more power than the CPU.




  1. Do not keep activities :



This option will kill any activity as soon as it goes to the background means that as soon as you leave an activity it will be destroyed so when you go back to that activity it will start a new one rather than resume the previews session ,this may not affect your application when you are on it but the second you leave it it will be destroyed ,this option may give you a little bit more performance because all other apps on the phone will not run in the background which may free up some resources (note that the background services will not be killed by this options only activities that are no longer displayed will be killed ) .




  1. Limiting background processes



For this one I will quote @Dan Hulme in this answer




Setting this option forces Android to stop each process as soon as it
is empty (that is, when no services are started and no activities are
on screen for that app).



To be clear: this option won't stop apps that would normally run in
the background from doing so. Your mail client will still run
periodically to check mail, if it's configured to do that. Apps that
use Google Cloud Messaging to receive push messages from Internet
servers (such as Gmail and Facebook) will still be able to do so. The
option would be better named "Cached background process limit", since
it limits apps that would otherwise show up with that label in the
apps manager.



Next time each app needs to start, Android has to load the app from
storage, from scratch. This uses more power and takes longer than
running it again when the process was in memory. This doesn't just
mean when you start an activity from that app deliberately; it also
means the email client has to be loaded after each time it wants to
check email. Over time this can build up to a huge battery drain.



Because this is a development option, it can also trigger rare bugs in
certain apps, and those apps' developers may not be keen to fix them.
One example is that, on Nexus devices running 4.2.2, when this option
is on, the in-built Calendar app will keep restarting itself with this
option set, because stopping the cached background process causes the
calendar's content provider to be removed, which causes a loop of
services restarting each other to check for calendar updates. If this
happens, the loop will run down your battery very quickly.




So as you can read this option will not affect your application all side affect of this option are noted in the previous quote.



For the second part of your question :




what "Disable Hardware overlays" does exactly?




To answer this I will define what is Hardware Overlays :



In computing, hardware overlay, a type of video overlay, provides a method of rendering an image to a display screen with a dedicated memory buffer inside computer video hardware. The technique aims to improve the display of a fast-moving video image — such as a computer game, a DVD, or the signal from a TV card. Most video cards manufactured since about 1998 and most media players support hardware overlay ,The overlay is a dedicated buffer into which one app can render (typically video), without incurring the significant performance cost of checking for clipping and overlapping rendering by other apps. The framebuffer has hardware support for importing and rendering the buffer contents without going through the GPU or CPU.



Now to get back to your question will it affect your scenario ,if you disable this feature android system will not allow hardware overlays which may cause a reduced performance , in other words 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 .Basically, using hardware overlays can reduce CPU usage by quite a bit, so I would leave it enabled in your case.



like I said earlier those options are meant for developers to get different debugging outputs for different scenarios their apps may face.



References
Hardware Overlays Wikipedia / Hardware Overlays on ComputerHope.com


Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes