summaryrefslogtreecommitdiff
path: root/chromium/third_party/mesa
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2016-01-25 11:39:07 +0100
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2016-01-25 15:20:42 +0000
commit6c91641271e536ffaa88a1dff5127e42ee99a91e (patch)
tree703d9dd49602377ddc90cbf886aad37913f2496b /chromium/third_party/mesa
parentb145b7fafd36f0c260d6a768c81fc14e32578099 (diff)
downloadqtwebengine-chromium-6c91641271e536ffaa88a1dff5127e42ee99a91e.tar.gz
BASELINE: Update Chromium to 49.0.2623.23
Also adds missing printing sources. Change-Id: I3726b8f0c7d6751c9fc846096c571fadca7108cd Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'chromium/third_party/mesa')
-rw-r--r--chromium/third_party/mesa/BUILD.gn127
-rw-r--r--chromium/third_party/mesa/README.chromium5
-rw-r--r--chromium/third_party/mesa/mesa.gyp27
-rw-r--r--chromium/third_party/mesa/src/chromium_gensrc/egl/wayland/wayland-drm/wayland-drm-client-protocol.h235
-rw-r--r--chromium/third_party/mesa/src/chromium_gensrc/egl/wayland/wayland-drm/wayland-drm-protocol.c86
-rw-r--r--chromium/third_party/mesa/src/chromium_gensrc/egl/wayland/wayland-drm/wayland-drm-server-protocol.h246
-rw-r--r--chromium/third_party/mesa/src/src/egl/wayland/wayland-drm/wayland-drm.xml32
7 files changed, 699 insertions, 59 deletions
diff --git a/chromium/third_party/mesa/BUILD.gn b/chromium/third_party/mesa/BUILD.gn
index 58cb60c0d51..a6fdb119f6a 100644
--- a/chromium/third_party/mesa/BUILD.gn
+++ b/chromium/third_party/mesa/BUILD.gn
@@ -6,7 +6,7 @@ import("//build/config/ui.gni")
config("mesa_headers_config") {
include_dirs = [ "src/include" ]
- if (use_x11) {
+ if (!use_x11) {
defines = [ "MESA_EGL_NO_X11_HEADERS" ]
}
}
@@ -79,10 +79,7 @@ config("mesa_internal_config") {
]
if (is_android) {
- defines += [
- "__GLIBC__",
- "_GNU_SOURCE",
- ]
+ defines += [ "_GNU_SOURCE" ]
}
if (is_linux) {
@@ -144,6 +141,7 @@ config("mesa_internal_warnings") {
"/wd4305", # Truncation from int to float.
"/wd4334", # Result of 32-bit shift implicitly converted to 64 bits.
"/wd4345", # POD-type default initializers.
+ "/wd4311", # Pointer truncation TODO(brucedawson): http://crbug.com/554200
]
}
}
@@ -679,64 +677,79 @@ static_library("mesa") {
]
}
-if (!is_android) { # TODO(GYP) enable for Android.
- # Building this target will hide the native OpenGL shared library and
- # replace it with a slow software renderer.
- #
- # Note: on x64 Windows this target gives warnings to the effect of:
- # osmesa.osmesa.obj : warning LNK4197: export 'OSMesaGetIntegerv' specified
- # multiple times; using first specification
- # This also happens with the GYP build.
- shared_library("osmesa") {
- sources = [
- "src/src/mesa/drivers/common/driverfuncs.c",
- "src/src/mesa/drivers/common/driverfuncs.h",
- "src/src/mesa/drivers/common/meta.c",
- "src/src/mesa/drivers/common/meta.h",
- "src/src/mesa/drivers/osmesa/osmesa.c",
- ]
+# Building this target will hide the native OpenGL shared library and
+# replace it with a slow software renderer.
+#
+# Note: on x64 Windows this target gives warnings to the effect of:
+# osmesa.osmesa.obj : warning LNK4197: export 'OSMesaGetIntegerv' specified
+# multiple times; using first specification
+# This also happens with the GYP build.
+loadable_module("osmesa") {
+ sources = [
+ "src/src/mesa/drivers/common/driverfuncs.c",
+ "src/src/mesa/drivers/common/driverfuncs.h",
+ "src/src/mesa/drivers/common/meta.c",
+ "src/src/mesa/drivers/common/meta.h",
+ "src/src/mesa/drivers/osmesa/osmesa.c",
+ ]
- configs -= [ "//build/config/compiler:chromium_code" ]
- configs += [
- ":mesa_headers_config",
- "//build/config/compiler:no_chromium_code",
- ]
- previous_configs = configs
- configs = []
- configs = [ ":mesa_internal_config" ] + previous_configs +
- [ ":mesa_internal_warnings" ]
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [
+ ":mesa_headers_config",
+ "//build/config/compiler:no_chromium_code",
+ ]
+ previous_configs = configs
+ configs = []
+ configs = [ ":mesa_internal_config" ] + previous_configs +
+ [ ":mesa_internal_warnings" ]
- include_dirs = [ "src/src/mesa/drivers" ]
+ include_dirs = [ "src/src/mesa/drivers" ]
- if (is_clang) {
- # Mesa triggers some of these Clang warnings.
- configs -= [ "//build/config/clang:extra_warnings" ]
- }
+ if (is_clang) {
+ # Mesa triggers some of these Clang warnings.
+ configs -= [ "//build/config/clang:extra_warnings" ]
+ }
- if (is_win) {
- ldflags =
- [ "/DEF:" + rebase_path("src/src/mesa/drivers/osmesa/osmesa.def",
- root_build_dir) ]
- }
+ if (is_win) {
+ ldflags = [ "/DEF:" + rebase_path("src/src/mesa/drivers/osmesa/osmesa.def",
+ root_build_dir) ]
+ }
- deps = [
- ":mesa_headers",
- ":mesa",
- ":mesa_libglslcommon",
- "//build/config/sanitizers:deps",
+ deps = [
+ ":mesa",
+ ":mesa_headers",
+ ":mesa_libglslcommon",
+ "//build/config/sanitizers:deps",
+ ]
+
+ if (is_win) {
+ defines = [
+ "BUILD_GL32",
+ "KEYWORD1=GLAPI",
+ "KEYWORD2=GLAPIENTRY",
]
+ }
+}
- if (is_win) {
- defines = [
- "BUILD_GL32",
- "KEYWORD1=GLAPI",
- "KEYWORD2=GLAPIENTRY",
- ]
- }
+if (is_linux) {
+ config("wayland_drm_protocol_config") {
+ include_dirs = [ "$generated_src_dir/egl/wayland/wayland-drm" ]
}
-} else {
- # Placeholder to allow targets to unconditionally depend on this.
- group("osmesa") {
+
+ source_set("wayland_drm_protocol") {
+ sources = [
+ "$generated_src_dir/egl/wayland/wayland-drm/wayland-drm-client-protocol.h",
+ "$generated_src_dir/egl/wayland/wayland-drm/wayland-drm-protocol.c",
+ "$generated_src_dir/egl/wayland/wayland-drm/wayland-drm-server-protocol.h",
+ ]
+
+ deps = [
+ "//third_party/wayland:wayland_util",
+ ]
+
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+
+ public_configs = [ ":wayland_drm_protocol_config" ]
}
-} # !is_android
-# TODO(GYP) Android osmesa_in_lib_dir target.
+}
diff --git a/chromium/third_party/mesa/README.chromium b/chromium/third_party/mesa/README.chromium
index bad24edf06c..9407f8aef42 100644
--- a/chromium/third_party/mesa/README.chromium
+++ b/chromium/third_party/mesa/README.chromium
@@ -24,6 +24,9 @@ Modifications made:
- Checked in sources normally autogenerated during Mesa's build
process under src/chromium_gensrc.
+- Checked in public headers normally autogenerated during Mesa's build
+ process under include.
+
- Modified _mesa_add_parameter to not read from uninitialized
memory
@@ -65,4 +68,4 @@ Modifications made:
- Statically link libstdc++ in chromecast build
- Merge http://cgit.freedesktop.org/mesa/mesa/commit/?id=5a6ec26
- Regenerated glsl_lexer.cc using Linux 3.13.0-63 (Ubuntu 14.04), Flex 2.5.39. \ No newline at end of file
+ Regenerated glsl_lexer.cc using Linux 3.13.0-63 (Ubuntu 14.04), Flex 2.5.39.
diff --git a/chromium/third_party/mesa/mesa.gyp b/chromium/third_party/mesa/mesa.gyp
index 6e349468ab2..367e5ec3da3 100644
--- a/chromium/third_party/mesa/mesa.gyp
+++ b/chromium/third_party/mesa/mesa.gyp
@@ -271,6 +271,9 @@
# Mesa is ever rolled and the warnings are fixed.
'msvs_disabled_warnings': [
4005, 4018, 4090, 4099, 4146, 4291, 4305, 4334, 4748, 4267,
+ # TODO(brucedawson): http://crbug.com/554200 4311 is a VS
+ # 2015 64-bit warning for pointer truncation
+ 4311,
],
'variables': {
'clang_warning_flags': [
@@ -762,5 +765,29 @@
},
],
}],
+ [ 'OS=="linux"', {
+ 'targets': [
+ {
+ 'target_name': 'wayland_drm_protocol',
+ 'type': 'static_library',
+ 'dependencies' : [
+ '../wayland/wayland.gyp:wayland_util',
+ ],
+ 'include_dirs': [
+ '<(generated_src_dir)/egl/wayland/wayland-drm',
+ ],
+ 'sources': [
+ '<(generated_src_dir)/egl/wayland/wayland-drm/wayland-drm-client-protocol.h',
+ '<(generated_src_dir)/egl/wayland/wayland-drm/wayland-drm-protocol.c',
+ '<(generated_src_dir)/egl/wayland/wayland-drm/wayland-drm-server-protocol.h',
+ ],
+ 'direct_dependent_settings': {
+ 'include_dirs': [
+ '<(generated_src_dir)/egl/wayland/wayland-drm',
+ ],
+ },
+ },
+ ],
+ }],
],
}
diff --git a/chromium/third_party/mesa/src/chromium_gensrc/egl/wayland/wayland-drm/wayland-drm-client-protocol.h b/chromium/third_party/mesa/src/chromium_gensrc/egl/wayland/wayland-drm/wayland-drm-client-protocol.h
new file mode 100644
index 00000000000..dc37283841e
--- /dev/null
+++ b/chromium/third_party/mesa/src/chromium_gensrc/egl/wayland/wayland-drm/wayland-drm-client-protocol.h
@@ -0,0 +1,235 @@
+/*
+ * Copyright © 2008-2011 Kristian Høgsberg
+ * Copyright © 2010-2011 Intel Corporation
+ *
+ * Permission to use, copy, modify, distribute, and sell this
+ * software and its documentation for any purpose is hereby granted
+ * without fee, provided that\n the above copyright notice appear in
+ * all copies and that both that copyright notice and this permission
+ * notice appear in supporting documentation, and that the name of
+ * the copyright holders not be used in advertising or publicity
+ * pertaining to distribution of the software without specific,
+ * written prior permission. The copyright holders make no
+ * representations about the suitability of this software for any
+ * purpose. It is provided "as is" without express or implied
+ * warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+ * THIS SOFTWARE.
+ */
+
+#ifndef DRM_CLIENT_PROTOCOL_H
+#define DRM_CLIENT_PROTOCOL_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdint.h>
+#include <stddef.h>
+#include "wayland-client.h"
+
+struct wl_client;
+struct wl_resource;
+
+struct wl_drm;
+
+extern const struct wl_interface wl_drm_interface;
+
+#ifndef WL_DRM_ERROR_ENUM
+#define WL_DRM_ERROR_ENUM
+enum wl_drm_error {
+ WL_DRM_ERROR_AUTHENTICATE_FAIL = 0,
+ WL_DRM_ERROR_INVALID_FORMAT = 1,
+ WL_DRM_ERROR_INVALID_NAME = 2,
+};
+#endif /* WL_DRM_ERROR_ENUM */
+
+#ifndef WL_DRM_FORMAT_ENUM
+#define WL_DRM_FORMAT_ENUM
+enum wl_drm_format {
+ WL_DRM_FORMAT_C8 = 0x20203843,
+ WL_DRM_FORMAT_RGB332 = 0x38424752,
+ WL_DRM_FORMAT_BGR233 = 0x38524742,
+ WL_DRM_FORMAT_XRGB4444 = 0x32315258,
+ WL_DRM_FORMAT_XBGR4444 = 0x32314258,
+ WL_DRM_FORMAT_RGBX4444 = 0x32315852,
+ WL_DRM_FORMAT_BGRX4444 = 0x32315842,
+ WL_DRM_FORMAT_ARGB4444 = 0x32315241,
+ WL_DRM_FORMAT_ABGR4444 = 0x32314241,
+ WL_DRM_FORMAT_RGBA4444 = 0x32314152,
+ WL_DRM_FORMAT_BGRA4444 = 0x32314142,
+ WL_DRM_FORMAT_XRGB1555 = 0x35315258,
+ WL_DRM_FORMAT_XBGR1555 = 0x35314258,
+ WL_DRM_FORMAT_RGBX5551 = 0x35315852,
+ WL_DRM_FORMAT_BGRX5551 = 0x35315842,
+ WL_DRM_FORMAT_ARGB1555 = 0x35315241,
+ WL_DRM_FORMAT_ABGR1555 = 0x35314241,
+ WL_DRM_FORMAT_RGBA5551 = 0x35314152,
+ WL_DRM_FORMAT_BGRA5551 = 0x35314142,
+ WL_DRM_FORMAT_RGB565 = 0x36314752,
+ WL_DRM_FORMAT_BGR565 = 0x36314742,
+ WL_DRM_FORMAT_RGB888 = 0x34324752,
+ WL_DRM_FORMAT_BGR888 = 0x34324742,
+ WL_DRM_FORMAT_XRGB8888 = 0x34325258,
+ WL_DRM_FORMAT_XBGR8888 = 0x34324258,
+ WL_DRM_FORMAT_RGBX8888 = 0x34325852,
+ WL_DRM_FORMAT_BGRX8888 = 0x34325842,
+ WL_DRM_FORMAT_ARGB8888 = 0x34325241,
+ WL_DRM_FORMAT_ABGR8888 = 0x34324241,
+ WL_DRM_FORMAT_RGBA8888 = 0x34324152,
+ WL_DRM_FORMAT_BGRA8888 = 0x34324142,
+ WL_DRM_FORMAT_XRGB2101010 = 0x30335258,
+ WL_DRM_FORMAT_XBGR2101010 = 0x30334258,
+ WL_DRM_FORMAT_RGBX1010102 = 0x30335852,
+ WL_DRM_FORMAT_BGRX1010102 = 0x30335842,
+ WL_DRM_FORMAT_ARGB2101010 = 0x30335241,
+ WL_DRM_FORMAT_ABGR2101010 = 0x30334241,
+ WL_DRM_FORMAT_RGBA1010102 = 0x30334152,
+ WL_DRM_FORMAT_BGRA1010102 = 0x30334142,
+ WL_DRM_FORMAT_YUYV = 0x56595559,
+ WL_DRM_FORMAT_YVYU = 0x55595659,
+ WL_DRM_FORMAT_UYVY = 0x59565955,
+ WL_DRM_FORMAT_VYUY = 0x59555956,
+ WL_DRM_FORMAT_AYUV = 0x56555941,
+ WL_DRM_FORMAT_NV12 = 0x3231564e,
+ WL_DRM_FORMAT_NV21 = 0x3132564e,
+ WL_DRM_FORMAT_NV16 = 0x3631564e,
+ WL_DRM_FORMAT_NV61 = 0x3136564e,
+ WL_DRM_FORMAT_YUV410 = 0x39565559,
+ WL_DRM_FORMAT_YVU410 = 0x39555659,
+ WL_DRM_FORMAT_YUV411 = 0x31315559,
+ WL_DRM_FORMAT_YVU411 = 0x31315659,
+ WL_DRM_FORMAT_YUV420 = 0x32315559,
+ WL_DRM_FORMAT_YVU420 = 0x32315659,
+ WL_DRM_FORMAT_YUV422 = 0x36315559,
+ WL_DRM_FORMAT_YVU422 = 0x36315659,
+ WL_DRM_FORMAT_YUV444 = 0x34325559,
+ WL_DRM_FORMAT_YVU444 = 0x34325659,
+};
+#endif /* WL_DRM_FORMAT_ENUM */
+
+#ifndef WL_DRM_CAPABILITY_ENUM
+#define WL_DRM_CAPABILITY_ENUM
+/**
+ * wl_drm_capability - wl_drm capability bitmask
+ * @WL_DRM_CAPABILITY_PRIME: wl_drm prime available
+ *
+ * Bitmask of capabilities.
+ */
+enum wl_drm_capability {
+ WL_DRM_CAPABILITY_PRIME = 1,
+};
+#endif /* WL_DRM_CAPABILITY_ENUM */
+
+struct wl_drm_listener {
+ /**
+ * device - (none)
+ * @name: (none)
+ */
+ void (*device)(void *data,
+ struct wl_drm *wl_drm,
+ const char *name);
+ /**
+ * format - (none)
+ * @format: (none)
+ */
+ void (*format)(void *data,
+ struct wl_drm *wl_drm,
+ uint32_t format);
+ /**
+ * authenticated - (none)
+ */
+ void (*authenticated)(void *data,
+ struct wl_drm *wl_drm);
+ /**
+ * capabilities - (none)
+ * @value: (none)
+ */
+ void (*capabilities)(void *data,
+ struct wl_drm *wl_drm,
+ uint32_t value);
+};
+
+static inline int
+wl_drm_add_listener(struct wl_drm *wl_drm,
+ const struct wl_drm_listener *listener, void *data)
+{
+ return wl_proxy_add_listener((struct wl_proxy *) wl_drm,
+ (void (**)(void)) listener, data);
+}
+
+#define WL_DRM_AUTHENTICATE 0
+#define WL_DRM_CREATE_BUFFER 1
+#define WL_DRM_CREATE_PLANAR_BUFFER 2
+#define WL_DRM_CREATE_PRIME_BUFFER 3
+
+static inline void
+wl_drm_set_user_data(struct wl_drm *wl_drm, void *user_data)
+{
+ wl_proxy_set_user_data((struct wl_proxy *) wl_drm, user_data);
+}
+
+static inline void *
+wl_drm_get_user_data(struct wl_drm *wl_drm)
+{
+ return wl_proxy_get_user_data((struct wl_proxy *) wl_drm);
+}
+
+static inline void
+wl_drm_destroy(struct wl_drm *wl_drm)
+{
+ wl_proxy_destroy((struct wl_proxy *) wl_drm);
+}
+
+static inline void
+wl_drm_authenticate(struct wl_drm *wl_drm, uint32_t id)
+{
+ wl_proxy_marshal((struct wl_proxy *) wl_drm,
+ WL_DRM_AUTHENTICATE, id);
+}
+
+static inline struct wl_buffer *
+wl_drm_create_buffer(struct wl_drm *wl_drm, uint32_t name, int32_t width, int32_t height, uint32_t stride, uint32_t format)
+{
+ struct wl_proxy *id;
+
+ id = wl_proxy_marshal_constructor((struct wl_proxy *) wl_drm,
+ WL_DRM_CREATE_BUFFER, &wl_buffer_interface, NULL, name, width, height, stride, format);
+
+ return (struct wl_buffer *) id;
+}
+
+static inline struct wl_buffer *
+wl_drm_create_planar_buffer(struct wl_drm *wl_drm, uint32_t name, int32_t width, int32_t height, uint32_t format, int32_t offset0, int32_t stride0, int32_t offset1, int32_t stride1, int32_t offset2, int32_t stride2)
+{
+ struct wl_proxy *id;
+
+ id = wl_proxy_marshal_constructor((struct wl_proxy *) wl_drm,
+ WL_DRM_CREATE_PLANAR_BUFFER, &wl_buffer_interface, NULL, name, width, height, format, offset0, stride0, offset1, stride1, offset2, stride2);
+
+ return (struct wl_buffer *) id;
+}
+
+static inline struct wl_buffer *
+wl_drm_create_prime_buffer(struct wl_drm *wl_drm, int32_t name, int32_t width, int32_t height, uint32_t format, int32_t offset0, int32_t stride0, int32_t offset1, int32_t stride1, int32_t offset2, int32_t stride2)
+{
+ struct wl_proxy *id;
+
+ id = wl_proxy_marshal_constructor((struct wl_proxy *) wl_drm,
+ WL_DRM_CREATE_PRIME_BUFFER, &wl_buffer_interface, NULL, name, width, height, format, offset0, stride0, offset1, stride1, offset2, stride2);
+
+ return (struct wl_buffer *) id;
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/chromium/third_party/mesa/src/chromium_gensrc/egl/wayland/wayland-drm/wayland-drm-protocol.c b/chromium/third_party/mesa/src/chromium_gensrc/egl/wayland/wayland-drm/wayland-drm-protocol.c
new file mode 100644
index 00000000000..b91e400f004
--- /dev/null
+++ b/chromium/third_party/mesa/src/chromium_gensrc/egl/wayland/wayland-drm/wayland-drm-protocol.c
@@ -0,0 +1,86 @@
+/*
+ * Copyright © 2008-2011 Kristian Høgsberg
+ * Copyright © 2010-2011 Intel Corporation
+ *
+ * Permission to use, copy, modify, distribute, and sell this
+ * software and its documentation for any purpose is hereby granted
+ * without fee, provided that\n the above copyright notice appear in
+ * all copies and that both that copyright notice and this permission
+ * notice appear in supporting documentation, and that the name of
+ * the copyright holders not be used in advertising or publicity
+ * pertaining to distribution of the software without specific,
+ * written prior permission. The copyright holders make no
+ * representations about the suitability of this software for any
+ * purpose. It is provided "as is" without express or implied
+ * warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+ * THIS SOFTWARE.
+ */
+
+#include <stdlib.h>
+#include <stdint.h>
+#include "wayland-util.h"
+
+extern const struct wl_interface wl_buffer_interface;
+extern const struct wl_interface wl_buffer_interface;
+extern const struct wl_interface wl_buffer_interface;
+
+static const struct wl_interface *types[] = {
+ NULL,
+ &wl_buffer_interface,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ &wl_buffer_interface,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ &wl_buffer_interface,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+};
+
+static const struct wl_message wl_drm_requests[] = {
+ { "authenticate", "u", types + 0 },
+ { "create_buffer", "nuiiuu", types + 1 },
+ { "create_planar_buffer", "nuiiuiiiiii", types + 7 },
+ { "create_prime_buffer", "2nhiiuiiiiii", types + 18 },
+};
+
+static const struct wl_message wl_drm_events[] = {
+ { "device", "s", types + 0 },
+ { "format", "u", types + 0 },
+ { "authenticated", "", types + 0 },
+ { "capabilities", "u", types + 0 },
+};
+
+WL_EXPORT const struct wl_interface wl_drm_interface = {
+ "wl_drm", 2,
+ 4, wl_drm_requests,
+ 4, wl_drm_events,
+};
+
diff --git a/chromium/third_party/mesa/src/chromium_gensrc/egl/wayland/wayland-drm/wayland-drm-server-protocol.h b/chromium/third_party/mesa/src/chromium_gensrc/egl/wayland/wayland-drm/wayland-drm-server-protocol.h
new file mode 100644
index 00000000000..22ed73e9323
--- /dev/null
+++ b/chromium/third_party/mesa/src/chromium_gensrc/egl/wayland/wayland-drm/wayland-drm-server-protocol.h
@@ -0,0 +1,246 @@
+/*
+ * Copyright © 2008-2011 Kristian Høgsberg
+ * Copyright © 2010-2011 Intel Corporation
+ *
+ * Permission to use, copy, modify, distribute, and sell this
+ * software and its documentation for any purpose is hereby granted
+ * without fee, provided that\n the above copyright notice appear in
+ * all copies and that both that copyright notice and this permission
+ * notice appear in supporting documentation, and that the name of
+ * the copyright holders not be used in advertising or publicity
+ * pertaining to distribution of the software without specific,
+ * written prior permission. The copyright holders make no
+ * representations about the suitability of this software for any
+ * purpose. It is provided "as is" without express or implied
+ * warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+ * THIS SOFTWARE.
+ */
+
+#ifndef DRM_SERVER_PROTOCOL_H
+#define DRM_SERVER_PROTOCOL_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdint.h>
+#include <stddef.h>
+#include "wayland-util.h"
+
+struct wl_client;
+struct wl_resource;
+
+struct wl_drm;
+
+extern const struct wl_interface wl_drm_interface;
+
+#ifndef WL_DRM_ERROR_ENUM
+#define WL_DRM_ERROR_ENUM
+enum wl_drm_error {
+ WL_DRM_ERROR_AUTHENTICATE_FAIL = 0,
+ WL_DRM_ERROR_INVALID_FORMAT = 1,
+ WL_DRM_ERROR_INVALID_NAME = 2,
+};
+#endif /* WL_DRM_ERROR_ENUM */
+
+#ifndef WL_DRM_FORMAT_ENUM
+#define WL_DRM_FORMAT_ENUM
+enum wl_drm_format {
+ WL_DRM_FORMAT_C8 = 0x20203843,
+ WL_DRM_FORMAT_RGB332 = 0x38424752,
+ WL_DRM_FORMAT_BGR233 = 0x38524742,
+ WL_DRM_FORMAT_XRGB4444 = 0x32315258,
+ WL_DRM_FORMAT_XBGR4444 = 0x32314258,
+ WL_DRM_FORMAT_RGBX4444 = 0x32315852,
+ WL_DRM_FORMAT_BGRX4444 = 0x32315842,
+ WL_DRM_FORMAT_ARGB4444 = 0x32315241,
+ WL_DRM_FORMAT_ABGR4444 = 0x32314241,
+ WL_DRM_FORMAT_RGBA4444 = 0x32314152,
+ WL_DRM_FORMAT_BGRA4444 = 0x32314142,
+ WL_DRM_FORMAT_XRGB1555 = 0x35315258,
+ WL_DRM_FORMAT_XBGR1555 = 0x35314258,
+ WL_DRM_FORMAT_RGBX5551 = 0x35315852,
+ WL_DRM_FORMAT_BGRX5551 = 0x35315842,
+ WL_DRM_FORMAT_ARGB1555 = 0x35315241,
+ WL_DRM_FORMAT_ABGR1555 = 0x35314241,
+ WL_DRM_FORMAT_RGBA5551 = 0x35314152,
+ WL_DRM_FORMAT_BGRA5551 = 0x35314142,
+ WL_DRM_FORMAT_RGB565 = 0x36314752,
+ WL_DRM_FORMAT_BGR565 = 0x36314742,
+ WL_DRM_FORMAT_RGB888 = 0x34324752,
+ WL_DRM_FORMAT_BGR888 = 0x34324742,
+ WL_DRM_FORMAT_XRGB8888 = 0x34325258,
+ WL_DRM_FORMAT_XBGR8888 = 0x34324258,
+ WL_DRM_FORMAT_RGBX8888 = 0x34325852,
+ WL_DRM_FORMAT_BGRX8888 = 0x34325842,
+ WL_DRM_FORMAT_ARGB8888 = 0x34325241,
+ WL_DRM_FORMAT_ABGR8888 = 0x34324241,
+ WL_DRM_FORMAT_RGBA8888 = 0x34324152,
+ WL_DRM_FORMAT_BGRA8888 = 0x34324142,
+ WL_DRM_FORMAT_XRGB2101010 = 0x30335258,
+ WL_DRM_FORMAT_XBGR2101010 = 0x30334258,
+ WL_DRM_FORMAT_RGBX1010102 = 0x30335852,
+ WL_DRM_FORMAT_BGRX1010102 = 0x30335842,
+ WL_DRM_FORMAT_ARGB2101010 = 0x30335241,
+ WL_DRM_FORMAT_ABGR2101010 = 0x30334241,
+ WL_DRM_FORMAT_RGBA1010102 = 0x30334152,
+ WL_DRM_FORMAT_BGRA1010102 = 0x30334142,
+ WL_DRM_FORMAT_YUYV = 0x56595559,
+ WL_DRM_FORMAT_YVYU = 0x55595659,
+ WL_DRM_FORMAT_UYVY = 0x59565955,
+ WL_DRM_FORMAT_VYUY = 0x59555956,
+ WL_DRM_FORMAT_AYUV = 0x56555941,
+ WL_DRM_FORMAT_NV12 = 0x3231564e,
+ WL_DRM_FORMAT_NV21 = 0x3132564e,
+ WL_DRM_FORMAT_NV16 = 0x3631564e,
+ WL_DRM_FORMAT_NV61 = 0x3136564e,
+ WL_DRM_FORMAT_YUV410 = 0x39565559,
+ WL_DRM_FORMAT_YVU410 = 0x39555659,
+ WL_DRM_FORMAT_YUV411 = 0x31315559,
+ WL_DRM_FORMAT_YVU411 = 0x31315659,
+ WL_DRM_FORMAT_YUV420 = 0x32315559,
+ WL_DRM_FORMAT_YVU420 = 0x32315659,
+ WL_DRM_FORMAT_YUV422 = 0x36315559,
+ WL_DRM_FORMAT_YVU422 = 0x36315659,
+ WL_DRM_FORMAT_YUV444 = 0x34325559,
+ WL_DRM_FORMAT_YVU444 = 0x34325659,
+};
+#endif /* WL_DRM_FORMAT_ENUM */
+
+#ifndef WL_DRM_CAPABILITY_ENUM
+#define WL_DRM_CAPABILITY_ENUM
+/**
+ * wl_drm_capability - wl_drm capability bitmask
+ * @WL_DRM_CAPABILITY_PRIME: wl_drm prime available
+ *
+ * Bitmask of capabilities.
+ */
+enum wl_drm_capability {
+ WL_DRM_CAPABILITY_PRIME = 1,
+};
+#endif /* WL_DRM_CAPABILITY_ENUM */
+
+struct wl_drm_interface {
+ /**
+ * authenticate - (none)
+ * @id: (none)
+ */
+ void (*authenticate)(struct wl_client *client,
+ struct wl_resource *resource,
+ uint32_t id);
+ /**
+ * create_buffer - (none)
+ * @id: (none)
+ * @name: (none)
+ * @width: (none)
+ * @height: (none)
+ * @stride: (none)
+ * @format: (none)
+ */
+ void (*create_buffer)(struct wl_client *client,
+ struct wl_resource *resource,
+ uint32_t id,
+ uint32_t name,
+ int32_t width,
+ int32_t height,
+ uint32_t stride,
+ uint32_t format);
+ /**
+ * create_planar_buffer - (none)
+ * @id: (none)
+ * @name: (none)
+ * @width: (none)
+ * @height: (none)
+ * @format: (none)
+ * @offset0: (none)
+ * @stride0: (none)
+ * @offset1: (none)
+ * @stride1: (none)
+ * @offset2: (none)
+ * @stride2: (none)
+ */
+ void (*create_planar_buffer)(struct wl_client *client,
+ struct wl_resource *resource,
+ uint32_t id,
+ uint32_t name,
+ int32_t width,
+ int32_t height,
+ uint32_t format,
+ int32_t offset0,
+ int32_t stride0,
+ int32_t offset1,
+ int32_t stride1,
+ int32_t offset2,
+ int32_t stride2);
+ /**
+ * create_prime_buffer - (none)
+ * @id: (none)
+ * @name: (none)
+ * @width: (none)
+ * @height: (none)
+ * @format: (none)
+ * @offset0: (none)
+ * @stride0: (none)
+ * @offset1: (none)
+ * @stride1: (none)
+ * @offset2: (none)
+ * @stride2: (none)
+ * @since: 2
+ */
+ void (*create_prime_buffer)(struct wl_client *client,
+ struct wl_resource *resource,
+ uint32_t id,
+ int32_t name,
+ int32_t width,
+ int32_t height,
+ uint32_t format,
+ int32_t offset0,
+ int32_t stride0,
+ int32_t offset1,
+ int32_t stride1,
+ int32_t offset2,
+ int32_t stride2);
+};
+
+#define WL_DRM_DEVICE 0
+#define WL_DRM_FORMAT 1
+#define WL_DRM_AUTHENTICATED 2
+#define WL_DRM_CAPABILITIES 3
+
+static inline void
+wl_drm_send_device(struct wl_resource *resource_, const char *name)
+{
+ wl_resource_post_event(resource_, WL_DRM_DEVICE, name);
+}
+
+static inline void
+wl_drm_send_format(struct wl_resource *resource_, uint32_t format)
+{
+ wl_resource_post_event(resource_, WL_DRM_FORMAT, format);
+}
+
+static inline void
+wl_drm_send_authenticated(struct wl_resource *resource_)
+{
+ wl_resource_post_event(resource_, WL_DRM_AUTHENTICATED);
+}
+
+static inline void
+wl_drm_send_capabilities(struct wl_resource *resource_, uint32_t value)
+{
+ wl_resource_post_event(resource_, WL_DRM_CAPABILITIES, value);
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/chromium/third_party/mesa/src/src/egl/wayland/wayland-drm/wayland-drm.xml b/chromium/third_party/mesa/src/src/egl/wayland/wayland-drm/wayland-drm.xml
index 265d4f892af..5e64622df67 100644
--- a/chromium/third_party/mesa/src/src/egl/wayland/wayland-drm/wayland-drm.xml
+++ b/chromium/third_party/mesa/src/src/egl/wayland/wayland-drm/wayland-drm.xml
@@ -29,7 +29,7 @@
<!-- drm support. This object is created by the server and published
using the display's global event. -->
- <interface name="wl_drm" version="1">
+ <interface name="wl_drm" version="2">
<enum name="error">
<entry name="authenticate_fail" value="0"/>
<entry name="invalid_format" value="1"/>
@@ -150,6 +150,36 @@
<!-- Raised if the authenticate request succeeded -->
<event name="authenticated"/>
+
+ <enum name="capability" since="2">
+ <description summary="wl_drm capability bitmask">
+ Bitmask of capabilities.
+ </description>
+ <entry name="prime" value="1" summary="wl_drm prime available"/>
+ </enum>
+
+ <event name="capabilities">
+ <arg name="value" type="uint"/>
+ </event>
+
+ <!-- Version 2 additions -->
+
+ <!-- Create a wayland buffer for the prime fd. Use for regular and planar
+ buffers. Pass 0 for offset and stride for unused planes. -->
+ <request name="create_prime_buffer" since="2">
+ <arg name="id" type="new_id" interface="wl_buffer"/>
+ <arg name="name" type="fd"/>
+ <arg name="width" type="int"/>
+ <arg name="height" type="int"/>
+ <arg name="format" type="uint"/>
+ <arg name="offset0" type="int"/>
+ <arg name="stride0" type="int"/>
+ <arg name="offset1" type="int"/>
+ <arg name="stride1" type="int"/>
+ <arg name="offset2" type="int"/>
+ <arg name="stride2" type="int"/>
+ </request>
+
</interface>
</protocol>