mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-09-25 02:33:59 +08:00
add prime_fd and name fields for DrmSurface object and info
This commit is contained in:
+6
-2
@@ -24,7 +24,7 @@
|
||||
and Graphics User Interface (GUI) support system for embedded systems
|
||||
and smart IoT devices.
|
||||
|
||||
Copyright (C) 2007~2018, Beijing FMSoft Technologies Co., Ltd.
|
||||
Copyright (C) 2007~2019, Beijing FMSoft Technologies Co., Ltd.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -96,7 +96,11 @@ typedef struct _DrmDriver DrmDriver;
|
||||
* MiniGUI NEWGAL engine for hardware surface.
|
||||
*/
|
||||
typedef struct _DrmSurfaceBuffer {
|
||||
/** The handle of the buffer */
|
||||
/** The prime fd of the buffer */
|
||||
int prime_fd;
|
||||
/** The global name of the buffer */
|
||||
uint32_t name;
|
||||
/** The local handle of the buffer */
|
||||
uint32_t handle;
|
||||
/** The buffer identifier */
|
||||
uint32_t id;
|
||||
|
||||
+5
-1
@@ -23,7 +23,7 @@
|
||||
and Graphics User Interface (GUI) support system for embedded systems
|
||||
and smart IoT devices.
|
||||
|
||||
Copyright (C) 2002~2018, Beijing FMSoft Technologies Co., Ltd.
|
||||
Copyright (C) 2002~2019, Beijing FMSoft Technologies Co., Ltd.
|
||||
Copyright (C) 1998~2002, WEI Yongming
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
@@ -13734,6 +13734,10 @@ MG_EXPORT int drmGetDeviceFD (GHANDLE video);
|
||||
* THe struct type defines the DRM surface information.
|
||||
*/
|
||||
typedef struct _DrmSurfaceInfo {
|
||||
/** The prime fd of the buffer object. */
|
||||
int prime_fd;
|
||||
/** The global name of the buffer object. */
|
||||
uint32_t name;
|
||||
/** The local handle of the buffer object. */
|
||||
uint32_t handle;
|
||||
/** The buffer identifier. */
|
||||
|
||||
@@ -1718,6 +1718,8 @@ BOOL __drm_get_surface_info (GAL_Surface *surface, DrmSurfaceInfo* info)
|
||||
DrmSurfaceBuffer* surface_buffer = (DrmSurfaceBuffer*)surface->hwdata;
|
||||
|
||||
if (surface_buffer) {
|
||||
info->prime_fd = surface_buffer->prime_fd;
|
||||
info->name = surface_buffer->name;
|
||||
info->handle = surface_buffer->handle;
|
||||
info->id = surface_buffer->id;
|
||||
info->width = surface_buffer->width;
|
||||
|
||||
Reference in New Issue
Block a user