summaryrefslogtreecommitdiff
path: root/vulkan/libvulkan/api.cpp
diff options
context:
space:
mode:
author Lloyd Pique <lpique@google.com> 2020-02-13 13:24:45 -0800
committer Lloyd Pique <lpique@google.com> 2020-03-20 00:02:16 +0000
commit1e10136954c181fa0511e70ee90bc808dc63f555 (patch)
tree633569b3ce65fcdc0335195d89dae85c4e275312 /vulkan/libvulkan/api.cpp
parent3895bbf1a894d8a034ce2b942b17af52c1cbc133 (diff)
libui: Fix clamping of input values in ui::Size
A previous change to fix a compiler warning broke the clamped-conversion of floating point input values to the int32_t values used internally. As a result, calling setWidth() or steHeight() with any floating point value resulted in a value of INT32_MIN being set, The existing Size_test unit test would have caught this issue, but it would have had to have been manually run since it was not configured to run automatically. No one noticed it was broken for a while since it is relatively new and the existing callers were not setting a floating point value. This change: 1) Fixes clamping of floating point values to work again, as verified by the existing test. 2) Helps enforce that the header remains conversion-warning free by enabling a few conversion warnings (as errors) when building the test. 3) Adds a TEST_MAPPING file, which will run Size_test as part of the presubmit runs (effectively continuously), as well as including the test in the device-test suite in the Android.bp file. 4) Adds a PrintTo() function for more clearly printing out a ui::Size value when using the Google Test framework. Bug: 149495759 Test: atest Size_test Change-Id: I8f18f20e6b5a3ea54eb383486a1f7222a1a2a544
Diffstat (limited to 'vulkan/libvulkan/api.cpp')
0 files changed, 0 insertions, 0 deletions