Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 97a5d955 authored by Nicolas Capens's avatar Nicolas Capens Committed by Nicolas Capens
Browse files

DO NOT MERGE Disable filtering for BufferLayers which are not scaled

Previously, linear filtering was applied based on the window scaling
mode only. If the buffer size matches the layer size (after applying
any transforms), point filtering can/should be used instead.

This affects cases where overlays are composited with GL, because it
relied on sampling the exact center of texels, to not get any
contribution of neighboring texels in the filter result. This is not
guaranteed, due to numerical imprecision in texture coordinate
interpolation, perspective correction, sub-texel accuracy, and/or
other precision losses which GL implementations may incur.

BufferStateLayers already had the logic for checking whether the buffer
is actually scaled, to fix a similar case. This change moves it to the
BufferLayer base class, with a shortcut for the
NATIVE_WINDOW_SCALING_MODE_FREEZE case.

Bug: b/182584062
Test: android.uirendering.cts.testclasses.SurfaceViewTests#testMovingWhiteSurfaceView
Change-Id: I3e765b8aef23dce6346cf2c64a8e36a28baebd9f
parent b087db35
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment