gpu_display: Don't include linux kernel headers

This makes it easier to integrate crosvm into Android (which doesn't
have the kernel headers available for all the build targets crosvm is
needed in).

The BTN_LEFT constant is already hardcoded in virtio/input/constants.rs,
so the additional tech debt seems acceptable.

BUG=b:228881829
TEST=cargo build && cargo test

Change-Id: Ia25586e855a29fc5f475904cad028eef30d3f016
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3717525
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Frederick Mayle <fmayle@google.com>
This commit is contained in:
Frederick Mayle 2022-06-21 23:34:38 +00:00 committed by Chromeos LUCI
parent 959a05e7cc
commit 7bba2599cf

View file

@ -11,7 +11,6 @@
#include <errno.h>
#include <fcntl.h>
#include <linux/input-event-codes.h>
#include <poll.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
@ -30,6 +29,10 @@
#include <wayland-client-protocol.h>
#include <wayland-client.h>
// BTN_LEFT is copied from linux/input-event-codes.h because the kernel headers
// aren't readily available in some downstream projects.
#define BTN_LEFT 0x110
#define DEFAULT_SCALE 2
#define MAX_BUFFER_COUNT 64
#define EVENT_BUF_SIZE 256