summaryrefslogtreecommitdiff
path: root/vulkan/libvulkan/api.cpp
diff options
context:
space:
mode:
author Nicolas Capens <capn@google.com> 2021-03-24 13:10:15 -0400
committer Nicolas Capens <nicolascapens@google.com> 2021-03-30 08:39:03 +0000
commit97a5d955f90418017c03e5a3a1792048c6ae10d2 (patch)
tree315abc4796b33a4f0f2810de2c775173eb8c6265 /vulkan/libvulkan/api.cpp
parentb087db35bd0e7fdf7d4e6311d5acd37acda8793e (diff)
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
Diffstat (limited to 'vulkan/libvulkan/api.cpp')
0 files changed, 0 insertions, 0 deletions