#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/renderer/modules/xr/xr_cube_map.h"
#include <algorithm>
#include <bit>
#include <cstring>
#include "device/vr/public/mojom/vr_service.mojom-blink.h"
#include "third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.h"
#include "third_party/blink/renderer/modules/webgl/webgl_texture.h"
#include "third_party/blink/renderer/platform/bindings/exception_code.h"
#include "third_party/blink/renderer/platform/graphics/gpu/drawing_buffer.h"
namespace {
float HalfFloatToFloat(const uint16_t input) { … }
uint8_t LinearToSrgb(float cl) { … }
void Rgba16fToSrgba8(const uint16_t* input,
uint8_t* output,
WTF::wtf_size_t num) { … }
}
namespace blink {
XRCubeMap::XRCubeMap(const device::mojom::blink::XRCubeMap& cube_map) { … }
WebGLTexture* XRCubeMap::updateWebGLEnvironmentCube(
WebGLRenderingContextBase* context,
WebGLTexture* texture,
GLenum internal_format,
GLenum format,
GLenum type) const { … }
}