Commit c0f75c65 authored by Zhigang Gong's avatar Zhigang Gong Committed by Eric Anholt

Fixed one typo bug when fixup a mask picture.

Signed-off-by: default avatarZhigang Gong <zhigang.gong@linux.intel.com>
parent 5c1f15fa
...@@ -403,9 +403,8 @@ glamor_init_composite_shaders(ScreenPtr screen) ...@@ -403,9 +403,8 @@ glamor_init_composite_shaders(ScreenPtr screen)
glamor_screen_private *glamor_priv; glamor_screen_private *glamor_priv;
glamor_gl_dispatch *dispatch; glamor_gl_dispatch *dispatch;
unsigned short *eb; unsigned short *eb;
float *vb; float *vb = NULL;
int eb_size; int eb_size;
int vb_size;
glamor_priv = glamor_get_screen_private(screen); glamor_priv = glamor_get_screen_private(screen);
dispatch = glamor_get_dispatch(glamor_priv); dispatch = glamor_get_dispatch(glamor_priv);
...@@ -542,7 +541,6 @@ glamor_set_composite_texture(ScreenPtr screen, int unit, ...@@ -542,7 +541,6 @@ glamor_set_composite_texture(ScreenPtr screen, int unit,
glamor_get_screen_private(screen); glamor_get_screen_private(screen);
glamor_gl_dispatch *dispatch; glamor_gl_dispatch *dispatch;
float wh[2]; float wh[2];
Bool has_repeat;
int repeat_type; int repeat_type;
dispatch = glamor_get_dispatch(glamor_priv); dispatch = glamor_get_dispatch(glamor_priv);
...@@ -1163,7 +1161,7 @@ glamor_composite_with_shader(CARD8 op, ...@@ -1163,7 +1161,7 @@ glamor_composite_with_shader(CARD8 op,
if (!glamor_fixup_pixmap_priv(screen, source_pixmap_priv)) if (!glamor_fixup_pixmap_priv(screen, source_pixmap_priv))
goto fail; goto fail;
} }
if (key.mask != SHADER_SOURCE_SOLID && key.mask != SHADER_MASK_SOLID if (key.mask != SHADER_MASK_NONE && key.mask != SHADER_MASK_SOLID
&& mask->transform && mask->transform
&& !pixman_transform_is_int_translate(mask->transform)) { && !pixman_transform_is_int_translate(mask->transform)) {
if (!glamor_fixup_pixmap_priv(screen, mask_pixmap_priv)) if (!glamor_fixup_pixmap_priv(screen, mask_pixmap_priv))
...@@ -1341,6 +1339,7 @@ done: ...@@ -1341,6 +1339,7 @@ done:
return ret; return ret;
} }
#ifdef GLAMOR_GRADIENT_SHADER
static GLint static GLint
_glamor_create_getcolor_fs_program(ScreenPtr screen, int stops_count, int use_array) _glamor_create_getcolor_fs_program(ScreenPtr screen, int stops_count, int use_array)
{ {
...@@ -1348,7 +1347,6 @@ _glamor_create_getcolor_fs_program(ScreenPtr screen, int stops_count, int use_ar ...@@ -1348,7 +1347,6 @@ _glamor_create_getcolor_fs_program(ScreenPtr screen, int stops_count, int use_ar
glamor_gl_dispatch *dispatch; glamor_gl_dispatch *dispatch;
char *gradient_fs = NULL; char *gradient_fs = NULL;
GLint gradient_prog = 0;
GLint fs_getcolor_prog; GLint fs_getcolor_prog;
const char *gradient_fs_getcolor = const char *gradient_fs_getcolor =
...@@ -2252,7 +2250,6 @@ _glamor_generate_radial_gradient_picture(ScreenPtr screen, ...@@ -2252,7 +2250,6 @@ _glamor_generate_radial_gradient_picture(ScreenPtr screen,
glamor_gl_dispatch *dispatch; glamor_gl_dispatch *dispatch;
PicturePtr dst_picture = NULL; PicturePtr dst_picture = NULL;
PixmapPtr pixmap = NULL; PixmapPtr pixmap = NULL;
glamor_pixmap_private *pixmap_priv;
GLint gradient_prog = 0; GLint gradient_prog = 0;
int error; int error;
float tex_vertices[8]; float tex_vertices[8];
...@@ -2581,7 +2578,6 @@ _glamor_generate_linear_gradient_picture(ScreenPtr screen, ...@@ -2581,7 +2578,6 @@ _glamor_generate_linear_gradient_picture(ScreenPtr screen,
int stops_count; int stops_count;
GLfloat *stop_colors = NULL; GLfloat *stop_colors = NULL;
GLfloat *n_stops = NULL; GLfloat *n_stops = NULL;
int i = 0;
int count = 0; int count = 0;
float slope; float slope;
GLfloat xscale, yscale; GLfloat xscale, yscale;
...@@ -2919,6 +2915,7 @@ GRADIENT_FAIL: ...@@ -2919,6 +2915,7 @@ GRADIENT_FAIL:
return NULL; return NULL;
} }
#undef LINEAR_DEFAULT_STOPS #undef LINEAR_DEFAULT_STOPS
#endif
static PicturePtr static PicturePtr
glamor_convert_gradient_picture(ScreenPtr screen, glamor_convert_gradient_picture(ScreenPtr screen,
...@@ -3009,17 +3006,16 @@ _glamor_composite(CARD8 op, ...@@ -3009,17 +3006,16 @@ _glamor_composite(CARD8 op,
Bool ret = TRUE; Bool ret = TRUE;
RegionRec region; RegionRec region;
BoxPtr box; BoxPtr box;
int nbox, i, ok; int nbox, i, ok = FALSE;
PixmapPtr sub_dest_pixmap = NULL; PixmapPtr sub_dest_pixmap = NULL;
PixmapPtr sub_source_pixmap = NULL; PixmapPtr sub_source_pixmap = NULL;
PixmapPtr sub_mask_pixmap = NULL; PixmapPtr sub_mask_pixmap = NULL;
int dest_x_off, dest_y_off, saved_dest_x, saved_dest_y; int dest_x_off, dest_y_off, saved_dest_x = 0, saved_dest_y = 0;
int source_x_off, source_y_off, saved_source_x, saved_source_y; int source_x_off, source_y_off, saved_source_x = 0, saved_source_y = 0;
int mask_x_off, mask_y_off, saved_mask_x, saved_mask_y; int mask_x_off, mask_y_off, saved_mask_x = 0, saved_mask_y = 0;
DrawablePtr saved_dest_drawable; DrawablePtr saved_dest_drawable = NULL;
DrawablePtr saved_source_drawable; DrawablePtr saved_source_drawable = NULL;
DrawablePtr saved_mask_drawable; DrawablePtr saved_mask_drawable = NULL;
x_temp_src = x_source; x_temp_src = x_source;
y_temp_src = y_source; y_temp_src = y_source;
......
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