Merge branch 'rel-4-0' of gitlab.fmsoft.cn:VincentWei/minigui into rel-4-0

This commit is contained in:
Vincent Wei
2020-07-23 18:35:03 +08:00
4 changed files with 12 additions and 6 deletions

View File

@@ -800,9 +800,9 @@ GAL_Surface* __drm_create_surface_from_name (GHANDLE video,
uint32_t name, uint32_t drm_format, uint32_t pixels_off,
uint32_t width, uint32_t height, uint32_t pitch);
GAL_Surface* __drm_create_surface_from_handle (GHANDLE video,
uint32_t handle, size_t size, uint32_t drm_format, uint32_t pixels_off,
uint32_t width, uint32_t height, uint32_t pitch);
//GAL_Surface* __drm_create_surface_from_handle (GHANDLE video,
// uint32_t handle, size_t size, uint32_t drm_format, uint32_t pixels_off,
// uint32_t width, uint32_t height, uint32_t pitch);
GAL_Surface* __drm_create_surface_from_prime_fd (GHANDLE video,
int prime_fd, size_t size, uint32_t drm_format, uint32_t pixels_off,

View File

@@ -63,6 +63,8 @@
#include <time.h>
#endif
#include <sys/select.h>
#ifndef HAVE_STRDUP
char* strdup (const char *string)
{

View File

@@ -1681,7 +1681,7 @@ static DrmSurfaceBuffer *drm_create_dumb_buffer(DrmVideoData* vdata,
surface_buffer->handle,
surface_buffer->width, surface_buffer->height,
surface_buffer->pitch,
surface_buffer->size, surface_buffer->offset);
(long unsigned int)surface_buffer->size, (long unsigned int)surface_buffer->offset);
/* prepare buffer for memory mapping */
memset(&mreq, 0, sizeof(mreq));
@@ -1810,7 +1810,7 @@ static DrmSurfaceBuffer *drm_create_dumb_buffer_from_prime_fd(DrmVideoData* vdat
return NULL;
}
_DBG_PRINTF("size got by calling lseek: %lu\n", size);
_DBG_PRINTF("size got by calling lseek: %lu\n", (long unsigned int)size);
}
ret = drmPrimeFDToHandle (vdata->dev_fd, prime_fd, &handle);

View File

@@ -3813,6 +3813,10 @@ HDC drmCreateDCFromNameEx (GHANDLE video, uint32_t name, uint32_t drm_format,
return (HDC)pmem_dc;
}
extern GAL_Surface* __drm_create_surface_from_handle (GHANDLE video, uint32_t handle,
unsigned long size, uint32_t drm_format, uint32_t pixels_off,
uint32_t width, uint32_t height, uint32_t pitch);
HDC drmCreateDCFromHandleEx (GHANDLE video, uint32_t handle, size_t size,
uint32_t drm_format, off_t offset,
uint32_t width, uint32_t height, uint32_t pitch)
@@ -3824,7 +3828,7 @@ HDC drmCreateDCFromHandleEx (GHANDLE video, uint32_t handle, size_t size,
return HDC_INVALID;
LOCK (&__mg_gdilock);
surface = __drm_create_surface_from_handle (video, handle, size,
surface = (GAL_Surface *)__drm_create_surface_from_handle (video, handle, size,
drm_format, offset, width, height, pitch);
UNLOCK (&__mg_gdilock);