In case a GC is initialized with data that does not contain a valid nativeZoom, the value is extracted via the operating system handle. This is less efficient than directly passing the zoom to the GC, but will only occur in case someone (illegally) implements Drawable.
For those consumers who have a custom Drawable implementation (even though not allowed by the API), it could be beneficial to allow some more strict handling to get aware of something less efficient happening. A concrete solution could be a strict mode that throws an exception in case GC.extractZoom() is called, which can be enabled via a flag / VM argument.
In case a
GC
is initialized with data that does not contain a validnativeZoom
, the value is extracted via the operating system handle. This is less efficient than directly passing the zoom to the GC, but will only occur in case someone (illegally) implementsDrawable
.For those consumers who have a custom
Drawable
implementation (even though not allowed by the API), it could be beneficial to allow some more strict handling to get aware of something less efficient happening. A concrete solution could be a strict mode that throws an exception in caseGC.extractZoom()
is called, which can be enabled via a flag / VM argument.