gradient: Don't need fixup flag when creating pixmap.
Gradient can use a larger texture/fbo directly, don't need an eaxct size texture. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
This commit is contained in:
parent
8a85071edb
commit
67cf3838e4
|
@ -2011,7 +2011,7 @@ _glamor_gradient_convert_trans_matrix(PictTransform *from, float to[3][3],
|
||||||
static int
|
static int
|
||||||
_glamor_gradient_set_pixmap_destination(ScreenPtr screen,
|
_glamor_gradient_set_pixmap_destination(ScreenPtr screen,
|
||||||
glamor_screen_private *glamor_priv,
|
glamor_screen_private *glamor_priv,
|
||||||
PicturePtr dst_picure,
|
PicturePtr dst_picture,
|
||||||
GLfloat *xscale, GLfloat *yscale,
|
GLfloat *xscale, GLfloat *yscale,
|
||||||
int x_source, int y_source,
|
int x_source, int y_source,
|
||||||
float vertices[8],
|
float vertices[8],
|
||||||
|
@ -2021,7 +2021,7 @@ _glamor_gradient_set_pixmap_destination(ScreenPtr screen,
|
||||||
glamor_pixmap_private *pixmap_priv;
|
glamor_pixmap_private *pixmap_priv;
|
||||||
PixmapPtr pixmap = NULL;
|
PixmapPtr pixmap = NULL;
|
||||||
|
|
||||||
pixmap = glamor_get_drawable_pixmap(dst_picure->pDrawable);
|
pixmap = glamor_get_drawable_pixmap(dst_picture->pDrawable);
|
||||||
pixmap_priv = glamor_get_pixmap_private(pixmap);
|
pixmap_priv = glamor_get_pixmap_private(pixmap);
|
||||||
|
|
||||||
if (!GLAMOR_PIXMAP_PRIV_HAS_FBO(pixmap_priv)) { /* should always have here. */
|
if (!GLAMOR_PIXMAP_PRIV_HAS_FBO(pixmap_priv)) { /* should always have here. */
|
||||||
|
@ -2039,24 +2039,24 @@ _glamor_gradient_set_pixmap_destination(ScreenPtr screen,
|
||||||
DEBUGF("xscale = %f, yscale = %f,"
|
DEBUGF("xscale = %f, yscale = %f,"
|
||||||
" x_source = %d, y_source = %d, width = %d, height = %d\n",
|
" x_source = %d, y_source = %d, width = %d, height = %d\n",
|
||||||
*xscale, *yscale, x_source, y_source,
|
*xscale, *yscale, x_source, y_source,
|
||||||
pixmap_priv->fbo->width, pixmap_priv->fbo->height);
|
dst_picture->pDrawable->width, dst_picture->pDrawable->height);
|
||||||
|
|
||||||
glamor_set_normalize_vcoords(*xscale, *yscale,
|
glamor_set_normalize_vcoords(*xscale, *yscale,
|
||||||
0, 0,
|
0, 0,
|
||||||
(INT16)(pixmap_priv->fbo->width),
|
(INT16)(dst_picture->pDrawable->width),
|
||||||
(INT16)(pixmap_priv->fbo->height),
|
(INT16)(dst_picture->pDrawable->height),
|
||||||
glamor_priv->yInverted, vertices);
|
glamor_priv->yInverted, vertices);
|
||||||
|
|
||||||
if (tex_normalize) {
|
if (tex_normalize) {
|
||||||
glamor_set_normalize_tcoords(*xscale, *yscale,
|
glamor_set_normalize_tcoords(*xscale, *yscale,
|
||||||
0, 0,
|
0, 0,
|
||||||
(INT16)(pixmap_priv->fbo->width),
|
(INT16)(dst_picture->pDrawable->width),
|
||||||
(INT16)(pixmap_priv->fbo->height),
|
(INT16)(dst_picture->pDrawable->height),
|
||||||
glamor_priv->yInverted, tex_vertices);
|
glamor_priv->yInverted, tex_vertices);
|
||||||
} else {
|
} else {
|
||||||
glamor_set_tcoords(0, 0,
|
glamor_set_tcoords(0, 0,
|
||||||
(INT16)(pixmap_priv->fbo->width),
|
(INT16)(dst_picture->pDrawable->width),
|
||||||
(INT16)(pixmap_priv->fbo->height),
|
(INT16)(dst_picture->pDrawable->height),
|
||||||
glamor_priv->yInverted, tex_vertices);
|
glamor_priv->yInverted, tex_vertices);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2224,7 +2224,7 @@ _glamor_generate_radial_gradient_picture(ScreenPtr screen,
|
||||||
pixmap = glamor_create_pixmap(screen,
|
pixmap = glamor_create_pixmap(screen,
|
||||||
width, height,
|
width, height,
|
||||||
PIXMAN_FORMAT_DEPTH(format),
|
PIXMAN_FORMAT_DEPTH(format),
|
||||||
GLAMOR_CREATE_PIXMAP_FIXUP);
|
0);
|
||||||
if (!pixmap)
|
if (!pixmap)
|
||||||
goto GRADIENT_FAIL;
|
goto GRADIENT_FAIL;
|
||||||
|
|
||||||
|
@ -2548,7 +2548,7 @@ _glamor_generate_linear_gradient_picture(ScreenPtr screen,
|
||||||
pixmap = glamor_create_pixmap(screen,
|
pixmap = glamor_create_pixmap(screen,
|
||||||
width, height,
|
width, height,
|
||||||
PIXMAN_FORMAT_DEPTH(format),
|
PIXMAN_FORMAT_DEPTH(format),
|
||||||
GLAMOR_CREATE_PIXMAP_FIXUP);
|
0);
|
||||||
|
|
||||||
if (!pixmap)
|
if (!pixmap)
|
||||||
goto GRADIENT_FAIL;
|
goto GRADIENT_FAIL;
|
||||||
|
|
Loading…
Reference in New Issue