chromium/third_party/blink/renderer/modules/xr/xr_cpu_depth_information.cc

// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#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) {}

// We have to use the type names below, this enables us to ensure that we are
// using them properly in a switch statement.
static_assert;
static_assert;
static_assert;
}  // namespace

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 {}

}  // namespace blink