Layer diffing should only be performed when partial repaint is enabled (currently iOS/metal). However when looking at #95211 I realized that the diffing code is run on other platforms as well. This is unnecessary overhead because the result is unused.