Merge "Avoid calling updateSurface twice when dimming is applied." into tm-dev