public void setHardwareAccelerationEnabled(boolean enabled) {
        if (enabled)
            setLayerType(View.LAYER_TYPE_HARDWARE, null);
        else
            setLayerType(View.LAYER_TYPE_SOFTWARE, null);
    }
Set layer-type HARDWARE or SOFTWARE for the view (true/false).

@param enabled True if should be hardware acceleration, false if should be software
vorolay/src/main/java/quatja/com/vorolay/VoronoiView.java