add hardware optimization on freebasenodedisplay and capturedimagedisplay