xwayland: call miCreateScreenResources() directly
No need for complicated wrapping/unwrapping: it's always just miCreateResources() anyway - so we can call it directly. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
fbc1300cbc
commit
c839203c8c
|
@ -42,6 +42,8 @@
|
|||
#include "linux-dmabuf-unstable-v1-client-protocol.h"
|
||||
#include "linux-drm-syncobj-v1-client-protocol.h"
|
||||
|
||||
#include "mi/mi_priv.h"
|
||||
|
||||
#include "xwayland-dmabuf.h"
|
||||
#include "xwayland-glamor.h"
|
||||
#include "xwayland-glamor-gbm.h"
|
||||
|
@ -143,15 +145,9 @@ static Bool
|
|||
xwl_glamor_create_screen_resources(ScreenPtr screen)
|
||||
{
|
||||
struct xwl_screen *xwl_screen = xwl_screen_get(screen);
|
||||
int ret;
|
||||
|
||||
screen->CreateScreenResources = xwl_screen->CreateScreenResources;
|
||||
ret = (*screen->CreateScreenResources) (screen);
|
||||
xwl_screen->CreateScreenResources = screen->CreateScreenResources;
|
||||
screen->CreateScreenResources = xwl_glamor_create_screen_resources;
|
||||
|
||||
if (!ret)
|
||||
return ret;
|
||||
if (!miCreateScreenResources(screen))
|
||||
return FALSE;
|
||||
|
||||
if (xwl_screen->rootless) {
|
||||
screen->devPrivate =
|
||||
|
@ -256,7 +252,6 @@ xwl_glamor_init(struct xwl_screen *xwl_screen)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
xwl_screen->CreateScreenResources = screen->CreateScreenResources;
|
||||
screen->CreateScreenResources = xwl_glamor_create_screen_resources;
|
||||
|
||||
#ifdef XV
|
||||
|
|
|
@ -1125,7 +1125,6 @@ xwl_screen_init(ScreenPtr pScreen, int argc, char **argv)
|
|||
xwl_screen->present = xwl_present_init(pScreen);
|
||||
|
||||
if (!xwl_screen->glamor) {
|
||||
xwl_screen->CreateScreenResources = pScreen->CreateScreenResources;
|
||||
pScreen->CreateScreenResources = xwl_shm_create_screen_resources;
|
||||
pScreen->CreatePixmap = xwl_shm_create_pixmap;
|
||||
pScreen->DestroyPixmap = xwl_shm_destroy_pixmap;
|
||||
|
|
|
@ -69,7 +69,6 @@ struct xwl_screen {
|
|||
int hidpi;
|
||||
|
||||
ClipNotifyProcPtr ClipNotify;
|
||||
CreateScreenResourcesProcPtr CreateScreenResources;
|
||||
CloseScreenProcPtr CloseScreen;
|
||||
ConfigNotifyProcPtr ConfigNotify;
|
||||
RealizeWindowProcPtr RealizeWindow;
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "mi/mi_priv.h"
|
||||
#include "os/osdep.h"
|
||||
|
||||
#include "fb.h"
|
||||
|
@ -351,15 +352,9 @@ Bool
|
|||
xwl_shm_create_screen_resources(ScreenPtr screen)
|
||||
{
|
||||
struct xwl_screen *xwl_screen = xwl_screen_get(screen);
|
||||
int ret;
|
||||
|
||||
screen->CreateScreenResources = xwl_screen->CreateScreenResources;
|
||||
ret = (*screen->CreateScreenResources) (screen);
|
||||
xwl_screen->CreateScreenResources = screen->CreateScreenResources;
|
||||
screen->CreateScreenResources = xwl_shm_create_screen_resources;
|
||||
|
||||
if (!ret)
|
||||
return ret;
|
||||
if (!miCreateScreenResources(screen))
|
||||
return FALSE;
|
||||
|
||||
if (xwl_screen->rootless)
|
||||
screen->devPrivate =
|
||||
|
|
Loading…
Reference in New Issue