disallowHardwareConfig

open fun disallowHardwareConfig(): T

Disables the use of HARDWARE in Downsampler to avoid errors caused by inspecting Bitmap pixels, drawing with hardware support disabled, drawing to android.graphics.Canvass backed by Bitmaps etc.

It's almost never safe to set ALLOW_HARDWARE_CONFIG to true so we only provide a way to disable hardware configs entirely. If no option is set for ALLOW_HARDWARE_CONFIG, Glide will set the value per request based on whether or not a Transformation is applied and if one is, the type of Transformation applied. Built in transformations like FitCenter and can safely use HARDWARE because they can be entirely replaced by scaling within Downsampler. Transformations like circleCrop that can't be replicated by Downsampler cannot use HARDWARE because HARDWARE cannot be drawn to android.graphics.Canvass, which is required by most Transformations.