mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
Use correct texture format for pixmap textures and FBO's
RGBA data in X pixmaps and in FBOs is already premultiplied; use the right format when creating cogl textures. http://bugzilla.openedhand.com/show_bug.cgi?id=1406 Signed-off-by: Robert Bragg <robert@linux.intel.com>
This commit is contained in:
parent
f90017ab4e
commit
4dcd5f6134
@ -296,7 +296,7 @@ clutter_texture_realize (ClutterActor *actor)
|
||||
tex = cogl_texture_new_with_size (priv->width,
|
||||
priv->height,
|
||||
flags,
|
||||
COGL_PIXEL_FORMAT_RGBA_8888);
|
||||
COGL_PIXEL_FORMAT_RGBA_8888_PRE);
|
||||
|
||||
cogl_material_set_layer (priv->material, 0, tex);
|
||||
|
||||
@ -2243,7 +2243,7 @@ on_fbo_source_size_change (GObject *object,
|
||||
tex = cogl_texture_new_with_size (MAX (priv->width, 1),
|
||||
MAX (priv->height, 1),
|
||||
flags,
|
||||
COGL_PIXEL_FORMAT_RGBA_8888);
|
||||
COGL_PIXEL_FORMAT_RGBA_8888_PRE);
|
||||
|
||||
cogl_material_set_layer (priv->material, 0, tex);
|
||||
|
||||
|
@ -359,14 +359,16 @@ create_cogl_texture (ClutterTexture *texture,
|
||||
handle = cogl_texture_new_from_foreign (tex, CGL_TEXTURE_RECTANGLE_ARB,
|
||||
width, height,
|
||||
0, 0,
|
||||
cogl_format | COGL_BGR_BIT);
|
||||
cogl_format | COGL_BGR_BIT |
|
||||
COGL_PREMULT_BIT);
|
||||
}
|
||||
else
|
||||
{
|
||||
handle
|
||||
= cogl_texture_new_with_size (width, height,
|
||||
COGL_TEXTURE_NO_SLICING,
|
||||
cogl_format | COGL_BGR_BIT);
|
||||
cogl_format | COGL_BGR_BIT |
|
||||
COGL_PREMULT_BIT);
|
||||
|
||||
using_rectangle = FALSE;
|
||||
}
|
||||
|
@ -871,7 +871,8 @@ clutter_x11_texture_pixmap_update_area_real (ClutterX11TexturePixmap *texture,
|
||||
width, height,
|
||||
bytes_per_line,
|
||||
4,
|
||||
CLUTTER_TEXTURE_RGB_FLAG_BGR,
|
||||
CLUTTER_TEXTURE_RGB_FLAG_BGR |
|
||||
CLUTTER_TEXTURE_RGB_FLAG_PREMULT,
|
||||
&error);
|
||||
else
|
||||
clutter_texture_set_from_rgb_data (CLUTTER_TEXTURE (texture),
|
||||
@ -880,7 +881,8 @@ clutter_x11_texture_pixmap_update_area_real (ClutterX11TexturePixmap *texture,
|
||||
width, height,
|
||||
bytes_per_line,
|
||||
4,
|
||||
CLUTTER_TEXTURE_RGB_FLAG_BGR,
|
||||
CLUTTER_TEXTURE_RGB_FLAG_BGR |
|
||||
CLUTTER_TEXTURE_RGB_FLAG_PREMULT,
|
||||
&error);
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user