We are currently experiencing downtime impacting viewing & cloning the Mesa repo, and some GitLab pages returning 503. Please see #freedesktop on IRC for more updates.

Commit d900f553 authored by He Junyan's avatar He Junyan Committed by Eric Anholt

Extract the gradient related code out.

 1. Extract the logic of gradient from the glamor_render.c
 to the file glamor_gradient.c.
 2. Modify the logic of gradient pixmap gl draw. Use the
 logic like composite before, but the gradient always just
 have one rect to render, so no need to set the VB and EB,
 replace it with just call glDrawArrays. 3.Kill all the
 warning in glamor_render.c

Reviewed-by: Zhigang Gong<zhigang.gong@linux.intel.com>
Signed-off-by: He Junyan's avatarJunyan He <junyan.he@linux.intel.com>
Signed-off-by: default avatarZhigang Gong <zhigang.gong@linux.intel.com>
parent 81692804
......@@ -33,6 +33,7 @@ libglamor_la_SOURCES = \
glamor_putimage.c \
glamor_setspans.c \
glamor_render.c \
glamor_gradient.c \
glamor_tile.c \
glamor_triangles.c\
glamor_addtraps.c\
......
This diff is collapsed.
......@@ -577,8 +577,19 @@ Bool glamor_tile(PixmapPtr pixmap, PixmapPtr tile,
void glamor_init_tile_shader(ScreenPtr screen);
void glamor_fini_tile_shader(ScreenPtr screen);
/* glamor_gradient.c */
void glamor_init_gradient_shader(ScreenPtr screen);
void glamor_fini_gradient_shader(ScreenPtr screen);
PicturePtr glamor_generate_linear_gradient_picture(ScreenPtr screen,
PicturePtr src_picture,
int x_source, int y_source,
int width, int height,
PictFormatShort format);
PicturePtr glamor_generate_radial_gradient_picture(ScreenPtr screen,
PicturePtr src_picture,
int x_source, int y_source,
int width, int height,
PictFormatShort format);
/* glamor_triangles.c */
void
......@@ -744,7 +755,7 @@ glamor_poly_line(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt,
#define GLAMOR_PIXMAP_DYNAMIC_UPLOAD
#ifndef GLAMOR_GLES2
//#define GLAMOR_GRADIENT_SHADER
#define GLAMOR_GRADIENT_SHADER
#endif
#endif /* GLAMOR_PRIV_H */
This diff is collapsed.
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