Class HardwareConfigState
java.lang.Object
com.bumptech.glide.load.resource.bitmap.HardwareConfigState
State and constants for interacting with
Bitmap.Config.HARDWARE on
Android O+.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanForce the state to wait until a call to allow hardware Bitmaps to be used when they'd otherwise be eligible to work around a framework issue pre Q that can cause a native crash when allocating a hardware Bitmap in this specific circumstance.static final booleanSupport for the hardware bitmap config was added in Android O.static final intDeprecated.This constant is unused and will be removed in a future version, avoid using it. -
Method Summary
Modifier and TypeMethodDescriptionvoidstatic HardwareConfigStatebooleanisHardwareConfigAllowed(int targetWidth, int targetHeight, boolean isHardwareConfigAllowed, boolean isExifOrientationRequired) void
-
Field Details
-
BLOCK_HARDWARE_BITMAPS_WHEN_GL_CONTEXT_MIGHT_NOT_BE_INITIALIZED
public static final boolean BLOCK_HARDWARE_BITMAPS_WHEN_GL_CONTEXT_MIGHT_NOT_BE_INITIALIZEDForce the state to wait until a call to allow hardware Bitmaps to be used when they'd otherwise be eligible to work around a framework issue pre Q that can cause a native crash when allocating a hardware Bitmap in this specific circumstance. See b/126573603#comment12 for details. -
HARDWARE_BITMAPS_SUPPORTED
@ChecksSdkIntAtLeast(api=28) public static final boolean HARDWARE_BITMAPS_SUPPORTEDSupport for the hardware bitmap config was added in Android O. -
NO_MAX_FD_COUNT
Deprecated.This constant is unused and will be removed in a future version, avoid using it.- See Also:
-
-
Method Details
-
getInstance
-
blockHardwareBitmaps
public void blockHardwareBitmaps() -
unblockHardwareBitmaps
public void unblockHardwareBitmaps() -
isHardwareConfigAllowed
public boolean isHardwareConfigAllowed(int targetWidth, int targetHeight, boolean isHardwareConfigAllowed, boolean isExifOrientationRequired)
-