Ejemplo n.º 1
0
VRDisplayVector VRController::updateDisplays(
    mojo::WTFArray<device::blink::VRDisplayPtr> displays) {
  VRDisplayVector vrDisplays;

  for (const auto& display : displays.PassStorage()) {
    VRDisplay* vrDisplay = createOrUpdateDisplay(display);
    vrDisplays.append(vrDisplay);
  }

  return vrDisplays;
}
Ejemplo n.º 2
0
VRDisplayVector VRDisplayCollection::updateDisplays(mojo::WTFArray<mojom::blink::VRDeviceInfoPtr> devices)
{
    VRDisplayVector vrDevices;

    for (const auto& device : devices.PassStorage()) {
        VRDisplay* display = getDisplayForIndex(device->index);
        if (!display) {
            display = new VRDisplay(m_navigatorVR);
            m_displays.append(display);
        }

        display->update(device);
        vrDevices.append(display);
    }

    return vrDevices;
}