2019-04-22 22:59:43 +00:00
|
|
|
// Copyright 2019 The Chromium OS Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
2018-05-03 20:19:37 +00:00
|
|
|
use gpu_display::*;
|
|
|
|
|
|
|
|
fn main() {
|
2019-04-16 22:09:20 +00:00
|
|
|
let mut disp = GpuDisplay::open_wayland(None::<&str>).unwrap();
|
2018-05-03 20:19:37 +00:00
|
|
|
let surface_id = disp.create_surface(None, 1280, 1024).unwrap();
|
2019-04-16 22:09:20 +00:00
|
|
|
disp.flip(surface_id);
|
|
|
|
disp.commit(surface_id);
|
2018-05-03 20:19:37 +00:00
|
|
|
while !disp.close_requested(surface_id) {
|
|
|
|
disp.dispatch_events();
|
|
|
|
}
|
|
|
|
}
|