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: Junyan He <junyan.he@linux.intel.com> Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
This commit is contained in:
parent
8169280464
commit
d900f553c2
|
@ -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\
|
||||
|
|
1633
glamor/glamor_gradient.c
Normal file
1633
glamor/glamor_gradient.c
Normal file
File diff suppressed because it is too large
Load Diff
|
@ -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 */
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user