[mutter] wayland-dma-buf: doc the odd format mapping
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] wayland-dma-buf: doc the odd format mapping
- Date: Mon, 19 Nov 2018 23:18:39 +0000 (UTC)
commit 63a6ead7d9449c10fdaeebcc3e13282dc70c1e23
Author: Pekka Paalanen <pekka paalanen collabora co uk>
Date: Tue Oct 16 14:45:14 2018 +0300
wayland-dma-buf: doc the odd format mapping
This format mapping looks wrong at first hand, so explain why it is like
it is.
See also https://gitlab.gnome.org/GNOME/mutter/issues/323
src/wayland/meta-wayland-dma-buf.c | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/src/wayland/meta-wayland-dma-buf.c b/src/wayland/meta-wayland-dma-buf.c
index 5f168f674..347da2484 100644
--- a/src/wayland/meta-wayland-dma-buf.c
+++ b/src/wayland/meta-wayland-dma-buf.c
@@ -3,6 +3,7 @@
/*
* Copyright (C) 2016 Red Hat Inc.
* Copyright (C) 2017 Intel Corporation
+ * Copyright (C) 2018 DisplayLink (UK) Ltd.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -85,6 +86,13 @@ meta_wayland_dma_buf_buffer_attach (MetaWaylandBuffer *buffer,
switch (dma_buf->drm_format)
{
+ /*
+ * NOTE: The cogl_format here is only used for texture color channel
+ * swizzling as compared to COGL_PIXEL_FORMAT_ARGB. It is *not* used
+ * for accessing the buffer memory. EGL will access the buffer
+ * memory according to the DRM fourcc code. Cogl will not mmap
+ * and access the buffer memory at all.
+ */
case DRM_FORMAT_XRGB8888:
cogl_format = COGL_PIXEL_FORMAT_RGB_888;
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]