|
Added
Link Here
|
| 1 |
https://gitlab.gnome.org/GNOME/mutter/-/commit/32affbf05a70 |
| 2 |
|
| 3 |
../src/wayland/meta-wayland-buffer.c:288:23: error: unknown type name 'MetaDrmFormatBuf' |
| 4 |
shm_format_to_string (MetaDrmFormatBuf *format_buf, |
| 5 |
^ |
| 6 |
../src/wayland/meta-wayland-buffer.c:302:16: warning: implicit declaration of function 'meta_drm_format_to_string' is invalid in C99 [-Wimplicit-function-declaration] |
| 7 |
result = meta_drm_format_to_string (format_buf, shm_format); |
| 8 |
^ |
| 9 |
../src/wayland/meta-wayland-buffer.c:323:3: error: use of undeclared identifier 'MetaDrmFormatBuf' |
| 10 |
MetaDrmFormatBuf format_buf; |
| 11 |
^ |
| 12 |
../src/wayland/meta-wayland-buffer.c:339:38: error: use of undeclared identifier 'format_buf' |
| 13 |
shm_format_to_string (&format_buf, |
| 14 |
^ |
| 15 |
|
| 16 |
--- src/wayland/meta-wayland-buffer.c.orig 2022-08-11 15:46:26 UTC |
| 17 |
+++ src/wayland/meta-wayland-buffer.c |
| 18 |
@@ -304,6 +304,7 @@ shm_buffer_get_cogl_pixel_format (struct wl_shm_buffer |
| 19 |
return TRUE; |
| 20 |
} |
| 21 |
|
| 22 |
+#ifdef HAVE_NATIVE_BACKEND |
| 23 |
static const char * |
| 24 |
shm_format_to_string (MetaDrmFormatBuf *format_buf, |
| 25 |
uint32_t shm_format) |
| 26 |
@@ -325,6 +326,7 @@ shm_format_to_string (MetaDrmFormatBuf *format_buf, |
| 27 |
|
| 28 |
return result; |
| 29 |
} |
| 30 |
+#endif |
| 31 |
|
| 32 |
static gboolean |
| 33 |
shm_buffer_attach (MetaWaylandBuffer *buffer, |
| 34 |
@@ -340,7 +342,9 @@ shm_buffer_attach (MetaWaylandBuffer *buffer, |
| 35 |
CoglTextureComponents components; |
| 36 |
CoglBitmap *bitmap; |
| 37 |
CoglTexture *new_texture; |
| 38 |
+#ifdef HAVE_NATIVE_BACKEND |
| 39 |
MetaDrmFormatBuf format_buf; |
| 40 |
+#endif |
| 41 |
|
| 42 |
shm_buffer = wl_shm_buffer_get (buffer->resource); |
| 43 |
stride = wl_shm_buffer_get_stride (shm_buffer); |
| 44 |
@@ -353,12 +357,14 @@ shm_buffer_attach (MetaWaylandBuffer *buffer, |
| 45 |
return FALSE; |
| 46 |
} |
| 47 |
|
| 48 |
+#ifdef HAVE_NATIVE_BACKEND |
| 49 |
meta_topic (META_DEBUG_WAYLAND, |
| 50 |
"[wl-shm] wl_buffer@%u wl_shm_format %s -> CoglPixelFormat %s", |
| 51 |
wl_resource_get_id (meta_wayland_buffer_get_resource (buffer)), |
| 52 |
shm_format_to_string (&format_buf, |
| 53 |
wl_shm_buffer_get_format (shm_buffer)), |
| 54 |
cogl_pixel_format_to_string (format)); |
| 55 |
+#endif |
| 56 |
|
| 57 |
if (*texture && |
| 58 |
cogl_texture_get_width (*texture) == width && |