blob: fb7ce3d6560fb637da1a65618c6df418faf72f9a [file] [log] [blame]
Avi Drissman3e1a26c2022-09-15 20:26:031// Copyright 2017 The Chromium Authors
hubbeb97f42d2017-01-27 21:04:092// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
Lei Zhang7fc035b42021-04-20 20:03:195#ifndef UI_GFX_HALF_FLOAT_H_
6#define UI_GFX_HALF_FLOAT_H_
hubbeb97f42d2017-01-27 21:04:097
8#include <stdint.h>
9#include <stdlib.h>
10
11#include "ui/gfx/gfx_export.h"
12
13namespace gfx {
14
15typedef uint16_t HalfFloat;
16
17// Floats are expected to be within +/- 65535.0;
18GFX_EXPORT void FloatToHalfFloat(const float* input,
19 HalfFloat* output,
20 size_t num);
Nico Weberca5f9592019-01-31 14:35:4121} // namespace gfx
22
Lei Zhang7fc035b42021-04-20 20:03:1923#endif // UI_GFX_HALF_FLOAT_H_