Avi Drissman | 3e1a26c | 2022-09-15 20:26:03 | [diff] [blame] | 1 | // Copyright 2017 The Chromium Authors |
hubbe | b97f42d | 2017-01-27 21:04:09 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
Lei Zhang | 7fc035b4 | 2021-04-20 20:03:19 | [diff] [blame] | 5 | #ifndef UI_GFX_HALF_FLOAT_H_ |
| 6 | #define UI_GFX_HALF_FLOAT_H_ |
hubbe | b97f42d | 2017-01-27 21:04:09 | [diff] [blame] | 7 | |
| 8 | #include <stdint.h> |
| 9 | #include <stdlib.h> |
| 10 | |
| 11 | #include "ui/gfx/gfx_export.h" |
| 12 | |
| 13 | namespace gfx { |
| 14 | |
| 15 | typedef uint16_t HalfFloat; |
| 16 | |
| 17 | // Floats are expected to be within +/- 65535.0; |
| 18 | GFX_EXPORT void FloatToHalfFloat(const float* input, |
| 19 | HalfFloat* output, |
| 20 | size_t num); |
Nico Weber | ca5f959 | 2019-01-31 14:35:41 | [diff] [blame] | 21 | } // namespace gfx |
| 22 | |
Lei Zhang | 7fc035b4 | 2021-04-20 20:03:19 | [diff] [blame] | 23 | #endif // UI_GFX_HALF_FLOAT_H_ |