#include "third_party/blink/renderer/modules/xr/xr_cpu_depth_information.h"
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include "base/numerics/byte_conversions.h"
#include "base/numerics/checked_math.h"
#include "base/numerics/ostream_operators.h"
#include "device/vr/public/mojom/xr_session.mojom-blink.h"
#include "third_party/blink/renderer/core/dom/dom_exception.h"
#include "third_party/blink/renderer/core/typed_arrays/dom_typed_array.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "ui/gfx/geometry/point3_f.h"
namespace {
constexpr char kOutOfBoundsAccess[] = …;
constexpr char kArrayBufferDetached[] = …;
constexpr size_t GetBytesPerElement(
device::mojom::XRDepthDataFormat data_format) { … }
static_assert …;
static_assert …;
static_assert …;
}
namespace blink {
XRCPUDepthInformation::XRCPUDepthInformation(
const XRFrame* xr_frame,
const gfx::Size& size,
const gfx::Transform& norm_texture_from_norm_view,
float raw_value_to_meters,
device::mojom::XRDepthDataFormat data_format,
DOMArrayBuffer* data)
: … { … }
DOMArrayBuffer* XRCPUDepthInformation::data(
ExceptionState& exception_state) const { … }
float XRCPUDepthInformation::getDepthInMeters(
float x,
float y,
ExceptionState& exception_state) const { … }
float XRCPUDepthInformation::GetItem(size_t index) const { … }
void XRCPUDepthInformation::Trace(Visitor* visitor) const { … }
}