The HardwareAccelerationPolicy to decide how to enable and disable hardware acceleration.
The default value webkit_hardware_acceleration_policy_on_demand enables the hardware acceleration when the web contents request it. It's possible to enforce hardware acceleration to be always enabled by using webkit_hardware_acceleration_policy_always. And it's also possible to disable it completely using webkit_hardware_acceleration_policy_never. Note that disabling hardware acceleration might cause some websites to not render correctly or consume more CPU.
Note that changing this setting might not be possible if hardware acceleration is not supported by the hardware or the system. In that case you can get the value to know the actual policy being used, but changing the setting will not have any effect.