mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
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
This commit is contained in:
parent
1c044a8fa0
commit
63a6ead7d9
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user