mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
* clutter/cogl/gl/cogl-texture.c (cogl_texture_rectangle): Fixed
the test for whether to use hardware tiling. Previously it assumed that texture coordinates are in increasing order but this is not the case since bug 1057 was fixed. The texture coordinates are now sorted later. It also allowed negative coordinates which doesn't make sense if the texture has waste.
This commit is contained in:
parent
0ea346bcf7
commit
ce189e7d77
@ -1,3 +1,12 @@
|
||||
2008-11-26 Neil Roberts <neil@linux.intel.com>
|
||||
|
||||
* clutter/cogl/gl/cogl-texture.c (cogl_texture_rectangle): Fixed
|
||||
the test for whether to use hardware tiling. Previously it assumed
|
||||
that texture coordinates are in increasing order but this is not
|
||||
the case since bug 1057 was fixed. The texture coordinates are now
|
||||
sorted later. It also allowed negative coordinates which doesn't
|
||||
make sense if the texture has waste.
|
||||
|
||||
2008-11-25 Emmanuele Bassi <ebassi@linux.intel.com>
|
||||
|
||||
* configure.ac: Remove stray dependency on gdk-pixbuf-xlib; we
|
||||
|
@ -2194,27 +2194,18 @@ cogl_texture_rectangle (CoglHandle handle,
|
||||
if (tx1 == tx2 || ty1 == ty2)
|
||||
return;
|
||||
|
||||
/* Pick tiling mode according to hw support */
|
||||
if (cogl_features_available (COGL_FEATURE_TEXTURE_NPOT)
|
||||
&& tex->slice_gl_handles->len == 1)
|
||||
{
|
||||
_cogl_texture_quad_hw (tex, x1,y1, x2,y2, tx1,ty1, tx2,ty2);
|
||||
}
|
||||
/* If there is only one GL texture and either the texture is NPOT
|
||||
(no waste) or all of the coordinates are in the range [0,1] then
|
||||
we can use hardware tiling */
|
||||
if (tex->slice_gl_handles->len == 1
|
||||
&& (cogl_features_available (COGL_FEATURE_TEXTURE_NPOT)
|
||||
|| (tx1 >= 0 && tx1 <= COGL_FIXED_1
|
||||
&& tx2 >= 0 && tx2 <= COGL_FIXED_1
|
||||
&& ty1 >= 0 && ty1 <= COGL_FIXED_1
|
||||
&& ty2 >= 0 && ty2 <= COGL_FIXED_1)))
|
||||
_cogl_texture_quad_hw (tex, x1,y1, x2,y2, tx1,ty1, tx2,ty2);
|
||||
else
|
||||
{
|
||||
if (tex->slice_gl_handles->len == 1
|
||||
&& tx1 >= -COGL_FIXED_1
|
||||
&& tx2 <= COGL_FIXED_1
|
||||
&& ty1 >= -COGL_FIXED_1
|
||||
&& ty2 <= COGL_FIXED_1)
|
||||
{
|
||||
_cogl_texture_quad_hw (tex, x1,y1, x2,y2, tx1,ty1, tx2,ty2);
|
||||
}
|
||||
else
|
||||
{
|
||||
_cogl_texture_quad_sw (tex, x1,y1, x2,y2, tx1,ty1, tx2,ty2);
|
||||
}
|
||||
}
|
||||
_cogl_texture_quad_sw (tex, x1,y1, x2,y2, tx1,ty1, tx2,ty2);
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user