blob: d4c6dd668c9d9f0ee644e8fe16d3937a061ac446 [file] [log] [blame]
Greg Hartman86b114a2017-11-03 21:04:14 -07001/*
2 * Copyright (C) 2017 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
Greg Hartman4cbb6ab2017-12-04 18:31:37 -080017#include "common/vsoc/lib/fb_bcast_region_view.h"
Jorge E. Moreira4b9bbb12017-12-28 15:49:06 -080018#include "host/libs/config/host_config.h"
Greg Hartman86b114a2017-11-03 21:04:14 -070019
20using vsoc::framebuffer::FBBroadcastRegionView;
21
Greg Hartman153b1062017-11-11 12:09:21 -080022namespace cvd {
Greg Hartman86b114a2017-11-03 21:04:14 -070023namespace vnc {
24
Jorge E. Moreira4b9bbb12017-12-28 15:49:06 -080025std::shared_ptr<FBBroadcastRegionView> GetFBBroadcastRegionView() {
26 std::shared_ptr<FBBroadcastRegionView> region =
27 FBBroadcastRegionView::GetInstance(vsoc::GetDomain().c_str());
28 if (!region) {
29 LOG(FATAL) << "Unable to open FBBroadcastRegion";
30 }
31 return region;
Greg Hartman86b114a2017-11-03 21:04:14 -070032}
33
34} // namespace vnc
Greg Hartman153b1062017-11-11 12:09:21 -080035} // namespace cvd