OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/exo/wayland/server.h" | 5 #include "components/exo/wayland/server.h" |
6 | 6 |
7 #include <linux/input.h> | 7 #include <linux/input.h> |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 #include <wayland-server-core.h> | 10 #include <wayland-server-core.h> |
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 wl_resource* buffer_resource = | 481 wl_resource* buffer_resource = |
482 wl_resource_create(client, &wl_buffer_interface, 1, id); | 482 wl_resource_create(client, &wl_buffer_interface, 1, id); |
483 if (!buffer_resource) { | 483 if (!buffer_resource) { |
484 wl_resource_post_no_memory(resource); | 484 wl_resource_post_no_memory(resource); |
485 return; | 485 return; |
486 } | 486 } |
487 | 487 |
488 buffer->set_release_callback( | 488 buffer->set_release_callback( |
489 base::Bind(&wl_buffer_send_release, base::Unretained(buffer_resource))); | 489 base::Bind(&wl_buffer_send_release, base::Unretained(buffer_resource))); |
490 | 490 |
491 SetImplementation(buffer_resource, &buffer_implementation, buffer.Pass()); | 491 SetImplementation(buffer_resource, &buffer_implementation, std::move(buffer)); |
492 } | 492 } |
493 | 493 |
494 const struct wl_drm_interface drm_implementation = { | 494 const struct wl_drm_interface drm_implementation = { |
495 drm_authenticate, drm_create_buffer, drm_create_planar_buffer, | 495 drm_authenticate, drm_create_buffer, drm_create_planar_buffer, |
496 drm_create_prime_buffer}; | 496 drm_create_prime_buffer}; |
497 | 497 |
498 const uint32_t drm_version = 2; | 498 const uint32_t drm_version = 2; |
499 | 499 |
500 void bind_drm(wl_client* client, void* data, uint32_t version, uint32_t id) { | 500 void bind_drm(wl_client* client, void* data, uint32_t version, uint32_t id) { |
501 wl_resource* resource = wl_resource_create( | 501 wl_resource* resource = wl_resource_create( |
(...skipping 944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1446 DCHECK(event_loop); | 1446 DCHECK(event_loop); |
1447 wl_event_loop_dispatch(event_loop, timeout.InMilliseconds()); | 1447 wl_event_loop_dispatch(event_loop, timeout.InMilliseconds()); |
1448 } | 1448 } |
1449 | 1449 |
1450 void Server::Flush() { | 1450 void Server::Flush() { |
1451 wl_display_flush_clients(wl_display_.get()); | 1451 wl_display_flush_clients(wl_display_.get()); |
1452 } | 1452 } |
1453 | 1453 |
1454 } // namespace wayland | 1454 } // namespace wayland |
1455 } // namespace exo | 1455 } // namespace exo |
OLD | NEW |