Commit ae38bd7c authored by Zhigang Gong's avatar Zhigang Gong
Browse files

glamor: Change glamor_egl_init API.

Slightly change the API glamor_egl_init,
as this initialization is to initialize the display not
the screen, we should call it in xxx_preinit rather
than xxxScreenInit(). we change the input parameter as
below, as in preInit, the screen may not be allocated
at all. And in glamor_egl_init, it will not call
glamor_init. Driver should call glamor_init at
screen_init stage.
Signed-off-by: default avatarZhigang Gong <>
parent d4f4d127
......@@ -29,6 +29,7 @@
#define GLAMOR_H
#include "scrnintstr.h"
#include "xf86str.h"
#include "pixmapstr.h"
#include "windowstr.h"
#include "gcstruct.h"
......@@ -49,7 +50,7 @@ extern _X_EXPORT Bool glamor_init(ScreenPtr screen, unsigned int flags);
extern _X_EXPORT void glamor_fini(ScreenPtr screen);
extern _X_EXPORT void glamor_set_screen_pixmap_texture(ScreenPtr screen, int w, int h, unsigned int tex);
extern _X_EXPORT Bool glamor_egl_init(ScreenPtr screen, int fd);
extern _X_EXPORT Bool glamor_egl_init(ScrnInfoPtr scrn, int fd);
extern _X_EXPORT Bool glamor_create_egl_screen_image(ScreenPtr screen, int handle, int stride);
extern _X_EXPORT Bool glamor_close_egl_screen(ScreenPtr screen);
extern _X_EXPORT void glamor_free_egl_screen(int scrnIndex, int flags);
......@@ -195,9 +195,8 @@ glamor_egl_has_extension(struct glamor_screen_private *glamor, char *extension)
Bool glamor_egl_init(ScreenPtr screen, int fd)
Bool glamor_egl_init(ScrnInfoPtr scrn, int fd)
ScrnInfoPtr scrn = xf86Screens[screen->myNum];
struct glamor_screen_private *glamor;
const char *version;
EGLint config_attribs[] = {
......@@ -275,11 +274,6 @@ Bool glamor_egl_init(ScreenPtr screen, int fd)
return FALSE;
if (!glamor_init(screen, GLAMOR_INVERTED_Y_AXIS)) {
xf86DrvMsg(scrn->scrnIndex, X_ERROR,
"Failed to initialize glamor\n");
return FALSE;
return TRUE;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment