summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/modules/xr/xr_reflection_probe.cc
blob: 81b55d81f0e16ebcbf2ace00e11dc7f51e3a4c12 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Copyright 2019 The Chromium Authors. All rights reserved.
// 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_reflection_probe.h"

#include "device/vr/public/mojom/vr_service.mojom-blink.h"
#include "third_party/blink/renderer/modules/xr/xr_cube_map.h"

namespace blink {

XRReflectionProbe::XRReflectionProbe(
    const device::mojom::blink::XRReflectionProbe& reflection_probe) {
  cube_map_ = MakeGarbageCollected<XRCubeMap>(*reflection_probe.cube_map);
}

XRCubeMap* XRReflectionProbe::cubeMap() const {
  return cube_map_.Get();
}

void XRReflectionProbe::Trace(Visitor* visitor) {
  visitor->Trace(cube_map_);
  ScriptWrappable::Trace(visitor);
}

}  // namespace blink