Patent attributes
An electronic device may include a display and an optical sensor formed underneath the display. The display may have both a full pixel density region and a pixel removal region with a plurality of high-transmittance areas that overlap the optical sensor. The display may include a black masking layer with a plurality of horizontal portions and a plurality of vertical portions that form a grid that defines a plurality of apertures. The black masking layer may additionally include patches in the apertures. The patches may be optimally positioned to mitigate diffraction artifacts in the sensor that operates through the pixel removal region. The patches may have unique sizes and shapes. The display may include first and second pixel removal regions with different black masking layer layouts. The layouts may cause complementary diffraction artifacts such that a single artifact-free image may be constructed using the first and second optical sensors.