mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-04-22 15:10:49 +02:00
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
4 changed files with 1653 additions and 1581 deletions
|
|
@ -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…
Add table
Reference in a new issue