Commit d84d7102 authored by Eric Anholt's avatar Eric Anholt

glamor: Apply x-indent.sh.

Signed-off-by: Eric Anholt's avatarEric Anholt <eric@anholt.net>
Reviewed-by: default avatarZhigang Gong <zhigang.gong@linux.intel.com>
Reviewed-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
parent e8e9a54c
......@@ -55,8 +55,7 @@ PixmapPtr
glamor_get_drawable_pixmap(DrawablePtr drawable)
{
if (drawable->type == DRAWABLE_WINDOW)
return drawable->
pScreen->GetWindowPixmap((WindowPtr) drawable);
return drawable->pScreen->GetWindowPixmap((WindowPtr) drawable);
else
return (PixmapPtr) drawable;
}
......@@ -98,8 +97,7 @@ glamor_set_pixmap_texture(PixmapPtr pixmap, unsigned int tex)
gl_iformat_for_depth(pixmap->drawable.depth, &format);
fbo = glamor_create_fbo_from_tex(glamor_priv, pixmap->drawable.width,
pixmap->drawable.height,
format, tex, 0);
pixmap->drawable.height, format, tex, 0);
if (fbo == NULL) {
ErrorF("XXX fail to create fbo.\n");
......@@ -132,8 +130,7 @@ glamor_create_pixmap(ScreenPtr screen, int w, int h, int depth,
PixmapPtr pixmap;
glamor_pixmap_type_t type = GLAMOR_TEXTURE_ONLY;
glamor_pixmap_private *pixmap_priv;
glamor_screen_private *glamor_priv =
glamor_get_screen_private(screen);
glamor_screen_private *glamor_priv = glamor_get_screen_private(screen);
glamor_pixmap_fbo *fbo;
int pitch;
GLenum format;
......@@ -179,8 +176,7 @@ glamor_create_pixmap(ScreenPtr screen, int w, int h, int depth,
pixmap_priv->type = GLAMOR_TEXTURE_LARGE;
fbo = glamor_create_fbo_array(glamor_priv, w, h, format, usage,
glamor_priv->max_fbo_size,
glamor_priv->max_fbo_size,
pixmap_priv);
glamor_priv->max_fbo_size, pixmap_priv);
}
if (fbo == NULL) {
......@@ -210,7 +206,7 @@ Bool
glamor_destroy_pixmap(PixmapPtr pixmap)
{
glamor_screen_private
*glamor_priv = glamor_get_screen_private(pixmap->drawable.pScreen);
* glamor_priv = glamor_get_screen_private(pixmap->drawable.pScreen);
if (glamor_priv->dri3_enabled)
glamor_egl_destroy_textured_pixmap(pixmap);
else
......@@ -221,8 +217,7 @@ glamor_destroy_pixmap(PixmapPtr pixmap)
void
glamor_block_handler(ScreenPtr screen)
{
glamor_screen_private *glamor_priv =
glamor_get_screen_private(screen);
glamor_screen_private *glamor_priv = glamor_get_screen_private(screen);
glamor_gl_dispatch *dispatch;
dispatch = glamor_get_dispatch(glamor_priv);
......@@ -238,11 +233,11 @@ glamor_block_handler(ScreenPtr screen)
}
static void
_glamor_block_handler(void *data, OSTimePtr timeout,
void *last_select_mask)
_glamor_block_handler(void *data, OSTimePtr timeout, void *last_select_mask)
{
glamor_screen_private *glamor_priv = data;
glamor_gl_dispatch *dispatch = glamor_get_dispatch(glamor_priv);
dispatch->glFlush();
glamor_put_dispatch(glamor_priv);
}
......@@ -256,6 +251,7 @@ static void
glamor_set_debug_level(int *debug_level)
{
char *debug_level_string;
debug_level_string = getenv("GLAMOR_DEBUG");
if (debug_level_string
&& sscanf(debug_level_string, "%d", debug_level) == 1)
......@@ -285,11 +281,11 @@ glamor_init(ScreenPtr screen, unsigned int flags)
if (flags & GLAMOR_INVERTED_Y_AXIS) {
glamor_priv->yInverted = 1;
} else
}
else
glamor_priv->yInverted = 0;
if (!dixRegisterPrivateKey
(glamor_screen_private_key, PRIVATE_SCREEN, 0)) {
if (!dixRegisterPrivateKey(glamor_screen_private_key, PRIVATE_SCREEN, 0)) {
LogMessage(X_WARNING,
"glamor%d: Failed to allocate screen private\n",
screen->myNum);
......@@ -298,8 +294,7 @@ glamor_init(ScreenPtr screen, unsigned int flags)
glamor_set_screen_private(screen, glamor_priv);
if (!dixRegisterPrivateKey
(glamor_pixmap_private_key, PRIVATE_PIXMAP, 0)) {
if (!dixRegisterPrivateKey(glamor_pixmap_private_key, PRIVATE_PIXMAP, 0)) {
LogMessage(X_WARNING,
"glamor%d: Failed to allocate pixmap private\n",
screen->myNum);
......@@ -378,14 +373,12 @@ glamor_init(ScreenPtr screen, unsigned int flags)
glamor_priv->saved_procs.change_window_attributes =
screen->ChangeWindowAttributes;
screen->ChangeWindowAttributes =
glamor_change_window_attributes;
screen->ChangeWindowAttributes = glamor_change_window_attributes;
glamor_priv->saved_procs.copy_window = screen->CopyWindow;
screen->CopyWindow = glamor_copy_window;
glamor_priv->saved_procs.bitmap_to_region =
screen->BitmapToRegion;
glamor_priv->saved_procs.bitmap_to_region = screen->BitmapToRegion;
screen->BitmapToRegion = glamor_bitmap_to_region;
}
#ifdef RENDER
......@@ -393,11 +386,9 @@ glamor_init(ScreenPtr screen, unsigned int flags)
glamor_priv->saved_procs.composite = ps->Composite;
ps->Composite = glamor_composite;
glamor_priv->saved_procs.trapezoids = ps->Trapezoids;
ps->Trapezoids = glamor_trapezoids;
glamor_priv->saved_procs.triangles = ps->Triangles;
ps->Triangles = glamor_triangles;
......@@ -482,7 +473,7 @@ glamor_release_screen_priv(ScreenPtr screen)
}
_X_EXPORT void
glamor_set_pixmap_private(PixmapPtr pixmap, glamor_pixmap_private *priv)
glamor_set_pixmap_private(PixmapPtr pixmap, glamor_pixmap_private * priv)
{
glamor_pixmap_private *old_priv;
glamor_pixmap_fbo *fbo;
......@@ -491,7 +482,8 @@ glamor_set_pixmap_private(PixmapPtr pixmap, glamor_pixmap_private *priv)
if (priv) {
assert(old_priv == NULL);
} else {
}
else {
if (old_priv == NULL)
return;
fbo = glamor_pixmap_detach_fbo(old_priv);
......@@ -499,9 +491,7 @@ glamor_set_pixmap_private(PixmapPtr pixmap, glamor_pixmap_private *priv)
free(old_priv);
}
dixSetPrivate(&pixmap->devPrivates,
glamor_pixmap_private_key,
priv);
dixSetPrivate(&pixmap->devPrivates, glamor_pixmap_private_key, priv);
}
Bool
......@@ -510,6 +500,7 @@ glamor_close_screen(CLOSE_SCREEN_ARGS_DECL)
glamor_screen_private *glamor_priv;
PixmapPtr screen_pixmap;
int flags;
#ifdef RENDER
PictureScreenPtr ps = GetPictureScreenIfSet(screen);
#endif
......@@ -551,32 +542,31 @@ glamor_close_screen(CLOSE_SCREEN_ARGS_DECL)
return screen->CloseScreen(CLOSE_SCREEN_ARGS);
}
void
glamor_fini(ScreenPtr screen)
{
/* Do nothing currently. */
}
void glamor_enable_dri3(ScreenPtr screen)
void
glamor_enable_dri3(ScreenPtr screen)
{
glamor_screen_private *glamor_priv =
glamor_get_screen_private(screen);
glamor_screen_private *glamor_priv = glamor_get_screen_private(screen);
glamor_priv->dri3_enabled = TRUE;
}
Bool glamor_is_dri3_support_enabled(ScreenPtr screen)
Bool
glamor_is_dri3_support_enabled(ScreenPtr screen)
{
glamor_screen_private *glamor_priv =
glamor_get_screen_private(screen);
glamor_screen_private *glamor_priv = glamor_get_screen_private(screen);
return glamor_priv->dri3_enabled;
}
int
glamor_dri3_fd_from_pixmap (ScreenPtr screen,
PixmapPtr pixmap,
CARD16 *stride,
CARD32 *size)
glamor_dri3_fd_from_pixmap(ScreenPtr screen,
PixmapPtr pixmap, CARD16 *stride, CARD32 *size)
{
glamor_pixmap_private *pixmap_priv;
glamor_screen_private *glamor_priv =
......@@ -585,24 +575,22 @@ glamor_dri3_fd_from_pixmap (ScreenPtr screen,
pixmap_priv = glamor_get_pixmap_private(pixmap);
if (pixmap_priv == NULL || !glamor_priv->dri3_enabled)
return -1;
switch (pixmap_priv->type)
{
switch (pixmap_priv->type) {
case GLAMOR_TEXTURE_DRM:
case GLAMOR_TEXTURE_ONLY:
glamor_pixmap_ensure_fbo(pixmap, GL_RGBA, 0);
return glamor_egl_dri3_fd_name_from_tex(screen,
pixmap,
pixmap_priv->base.fbo->tex,
FALSE,
stride,
size);
default: break;
FALSE, stride, size);
default:
break;
}
return -1;
}
int
glamor_dri3_name_from_pixmap (PixmapPtr pixmap)
glamor_dri3_name_from_pixmap(PixmapPtr pixmap)
{
glamor_pixmap_private *pixmap_priv;
glamor_screen_private *glamor_priv =
......@@ -611,18 +599,16 @@ glamor_dri3_name_from_pixmap (PixmapPtr pixmap)
pixmap_priv = glamor_get_pixmap_private(pixmap);
if (pixmap_priv == NULL || !glamor_priv->dri3_enabled)
return -1;
switch (pixmap_priv->type)
{
switch (pixmap_priv->type) {
case GLAMOR_TEXTURE_DRM:
case GLAMOR_TEXTURE_ONLY:
glamor_pixmap_ensure_fbo(pixmap, GL_RGBA, 0);
return glamor_egl_dri3_fd_name_from_tex(pixmap->drawable.pScreen,
pixmap,
pixmap_priv->base.fbo->tex,
TRUE,
NULL,
NULL);
default: break;
TRUE, NULL, NULL);
default:
break;
}
return -1;
}
This diff is collapsed.
......@@ -31,11 +31,10 @@
static Bool
_glamor_add_traps(PicturePtr pPicture,
INT16 x_off,
INT16 y_off, int ntrap, xTrap * traps,
Bool fallback)
INT16 y_off, int ntrap, xTrap * traps, Bool fallback)
{
if (!fallback
&& ( !pPicture->pDrawable
&& (!pPicture->pDrawable
|| glamor_ddx_fallback_check_pixmap(pPicture->pDrawable)))
return FALSE;
......@@ -49,17 +48,14 @@ _glamor_add_traps(PicturePtr pPicture,
void
glamor_add_traps(PicturePtr pPicture,
INT16 x_off,
INT16 y_off, int ntrap, xTrap * traps)
INT16 x_off, INT16 y_off, int ntrap, xTrap * traps)
{
_glamor_add_traps(pPicture, x_off, y_off, ntrap, traps, TRUE);
}
Bool
glamor_add_traps_nf(PicturePtr pPicture,
INT16 x_off,
INT16 y_off, int ntrap, xTrap * traps)
INT16 x_off, INT16 y_off, int ntrap, xTrap * traps)
{
return _glamor_add_traps(pPicture, x_off, y_off, ntrap, traps, FALSE);
}
......@@ -36,20 +36,21 @@
* compositeRects acceleration implementation
*/
static int16_t bound(int16_t a, uint16_t b)
static int16_t
bound(int16_t a, uint16_t b)
{
int v = (int)a + (int)b;
int v = (int) a + (int) b;
if (v > MAXSHORT)
return MAXSHORT;
return v;
}
static Bool
_pixman_region_init_clipped_rectangles(pixman_region16_t *region,
_pixman_region_init_clipped_rectangles(pixman_region16_t * region,
unsigned int num_rects,
xRectangle *rects,
int tx, int ty,
BoxPtr extents)
int tx, int ty, BoxPtr extents)
{
pixman_box16_t stack_boxes[64], *boxes = stack_boxes;
pixman_bool_t ret;
......@@ -92,18 +93,15 @@ _pixman_region_init_clipped_rectangles(pixman_region16_t *region,
DEBUGF("%s: nrects=%d, region=(%d, %d), (%d, %d) x %d\n",
__FUNCTION__, num_rects,
region->extents.x1, region->extents.y1,
region->extents.x2, region->extents.y2,
j);
region->extents.x2, region->extents.y2, j);
return ret;
}
void
glamor_composite_rectangles(CARD8 op,
PicturePtr dst,
xRenderColor *color,
int num_rects,
xRectangle *rects)
xRenderColor * color,
int num_rects, xRectangle *rects)
{
PixmapPtr pixmap;
struct glamor_pixmap_private *priv;
......@@ -120,8 +118,7 @@ glamor_composite_rectangles(CARD8 op,
(color->red >> 8 << 16) |
(color->green >> 8 << 8) |
(color->blue >> 8 << 0),
num_rects,
rects[0].x, rects[0].y, rects[0].width, rects[0].height);
num_rects, rects[0].x, rects[0].y, rects[0].width, rects[0].height);
if (!num_rects)
return;
......@@ -131,7 +128,7 @@ glamor_composite_rectangles(CARD8 op,
return;
}
if ((color->red|color->green|color->blue|color->alpha) <= 0x00ff) {
if ((color->red | color->green | color->blue | color->alpha) <= 0x00ff) {
switch (op) {
case PictOpOver:
case PictOpOutReverse:
......@@ -164,7 +161,8 @@ glamor_composite_rectangles(CARD8 op,
op = PictOpOverReverse;
break;
}
} else if (color->alpha >= 0xff00) {
}
else if (color->alpha >= 0xff00) {
switch (op) {
case PictOpOver:
op = PictOpSrc;
......@@ -235,10 +233,10 @@ glamor_composite_rectangles(CARD8 op,
RegionExtents(&region)->x1, RegionExtents(&region)->y1,
RegionExtents(&region)->x2, RegionExtents(&region)->y2);
boxes = pixman_region_rectangles(&region, &num_boxes);
if (op == PictOpSrc || op == PictOpClear) {
CARD32 pixel;
if (op == PictOpClear)
pixel = 0;
else
......@@ -246,7 +244,8 @@ glamor_composite_rectangles(CARD8 op,
glamor_solid_boxes(pixmap, boxes, num_boxes, pixel);
goto done;
} else {
}
else {
if (likely(priv->type != GLAMOR_TEXTURE_LARGE)) {
int error;
......@@ -256,14 +255,13 @@ glamor_composite_rectangles(CARD8 op,
if (glamor_composite_clipped_region(op, source,
NULL, dst,
NULL, NULL, priv,
&region,
0,0,0,0,0,0))
&region, 0, 0, 0, 0, 0, 0))
goto done;
}
}
fallback:
fallback:
miCompositeRects(op, dst, color, num_rects, rects);
done:
done:
/* XXX xserver-1.8: CompositeRects is not tracked by Damage, so we must
* manually append the damaged regions ourselves.
*/
......
This diff is collapsed.
......@@ -33,8 +33,7 @@ _glamor_copy_plane(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
int srcx, int srcy, int w, int h, int dstx, int dsty,
unsigned long bitPlane, RegionPtr *pRegion, Bool fallback)
{
if (!fallback
&& glamor_ddx_fallback_check_gc(pGC)
if (!fallback && glamor_ddx_fallback_check_gc(pGC)
&& glamor_ddx_fallback_check_pixmap(pSrc)
&& glamor_ddx_fallback_check_pixmap(pDst))
goto fail;
......@@ -57,6 +56,7 @@ glamor_copy_plane(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
unsigned long bitPlane)
{
RegionPtr ret;
_glamor_copy_plane(pSrc, pDst, pGC, srcx, srcy, w, h,
dstx, dsty, bitPlane, &ret, TRUE);
return ret;
......
......@@ -29,8 +29,7 @@
*/
void
glamor_copy_window(WindowPtr win, DDXPointRec old_origin,
RegionPtr src_region)
glamor_copy_window(WindowPtr win, DDXPointRec old_origin, RegionPtr src_region)
{
RegionRec dst_region;
int dx, dy;
......@@ -51,8 +50,7 @@ glamor_copy_window(WindowPtr win, DDXPointRec old_origin,
#endif
miCopyRegion(&pixmap->drawable, &pixmap->drawable,
NULL, &dst_region, dx, dy, glamor_copy_n_to_n, 0,
NULL);
NULL, &dst_region, dx, dy, glamor_copy_n_to_n, 0, NULL);
REGION_UNINIT(win->drawable.pScreen, &dst_region);
}
This diff is collapsed.
......@@ -29,7 +29,6 @@
#ifndef __GLAMOR_DEBUG_H__
#define __GLAMOR_DEBUG_H__
#define GLAMOR_DELAYED_STRING_MAX 64
#define GLAMOR_DEBUG_NONE 0
......@@ -51,9 +50,6 @@ AbortServer(void)
exit(1); \
} while(0)
#define __debug_output_message(_format_, _prefix_, ...) \
LogMessageVerb(X_NONE, 0, \
"%32s:\t" _format_ , \
......@@ -69,7 +65,6 @@ AbortServer(void)
##__VA_ARGS__); \
} while(0)
#define glamor_fallback(_format_,...) \
do { \
if (glamor_debug_level >= GLAMOR_DEBUG_FALLBACK) \
......@@ -77,8 +72,6 @@ AbortServer(void)
"Glamor fallback", \
##__VA_ARGS__);} while(0)
#define glamor_delayed_fallback(_screen_, _format_,...) \
do { \
if (glamor_debug_level >= GLAMOR_DEBUG_FALLBACK) { \
......@@ -90,7 +83,6 @@ AbortServer(void)
"glamor delayed fallback: \t%s " _format_ , \
__FUNCTION__, ##__VA_ARGS__); } } while(0)
#define glamor_clear_delayed_fallbacks(_screen_) \
do { \
if (glamor_debug_level >= GLAMOR_DEBUG_FALLBACK) { \
......@@ -112,5 +104,4 @@ AbortServer(void)
#define DEBUGRegionPrint(x) do {} while (0)
//#define DEBUGRegionPrint RegionPrint
#endif
This diff is collapsed.
This diff is collapsed.
......@@ -49,8 +49,7 @@ glamor_fill(DrawablePtr drawable,
if (!glamor_solid(dst_pixmap,
x + off_x,
y + off_y,
width, height, gc->alu, gc->planemask,
gc->fgPixel))
width, height, gc->alu, gc->planemask, gc->fgPixel))
goto fail;
break;
case FillStippled:
......@@ -64,8 +63,7 @@ glamor_fill(DrawablePtr drawable,
gc->alu,
gc->planemask,
gc->fgPixel,
gc->bgPixel, gc->patOrg.x,
gc->patOrg.y))
gc->bgPixel, gc->patOrg.x, gc->patOrg.y))
goto fail;
break;
case FillTiled:
......@@ -142,8 +140,7 @@ glamor_init_solid_shader(ScreenPtr screen)
glamor_gl_dispatch *dispatch;
const char *solid_vs =
"attribute vec4 v_position;"
"void main()\n" "{\n" " gl_Position = v_position;\n"
"}\n";
"void main()\n" "{\n" " gl_Position = v_position;\n" "}\n";
const char *solid_fs =
GLAMOR_DEFAULT_PRECISION "uniform vec4 color;\n"
"void main()\n" "{\n" " gl_FragColor = color;\n" "}\n";
......@@ -153,8 +150,7 @@ glamor_init_solid_shader(ScreenPtr screen)
dispatch = glamor_get_dispatch(glamor_priv);
glamor_priv->solid_prog = dispatch->glCreateProgram();
vs_prog = glamor_compile_glsl_prog(dispatch, GL_VERTEX_SHADER, solid_vs);
fs_prog = glamor_compile_glsl_prog(dispatch, GL_FRAGMENT_SHADER,
solid_fs);
fs_prog = glamor_compile_glsl_prog(dispatch, GL_FRAGMENT_SHADER, solid_fs);
dispatch->glAttachShader(glamor_priv->solid_prog, vs_prog);
dispatch->glAttachShader(glamor_priv->solid_prog, fs_prog);
......@@ -163,8 +159,7 @@ glamor_init_solid_shader(ScreenPtr screen)
glamor_link_glsl_prog(dispatch, glamor_priv->solid_prog);
glamor_priv->solid_color_uniform_location =
dispatch->glGetUniformLocation(glamor_priv->solid_prog,
"color");
dispatch->glGetUniformLocation(glamor_priv->solid_prog, "color");
glamor_put_dispatch(glamor_priv);
}
......@@ -184,10 +179,8 @@ static void
_glamor_solid_boxes(PixmapPtr pixmap, BoxPtr box, int nbox, float *color)
{
ScreenPtr screen = pixmap->drawable.pScreen;
glamor_screen_private *glamor_priv =
glamor_get_screen_private(screen);
glamor_pixmap_private *pixmap_priv =
glamor_get_pixmap_private(pixmap);
glamor_screen_private *glamor_priv = glamor_get_screen_private(screen);
glamor_pixmap_private *pixmap_priv = glamor_get_pixmap_private(pixmap);
glamor_gl_dispatch *dispatch;
GLfloat xscale, yscale;
float vertices[32];
......@@ -199,24 +192,24 @@ _glamor_solid_boxes(PixmapPtr pixmap, BoxPtr box, int nbox, float *color)
dispatch = glamor_get_dispatch(glamor_priv);
dispatch->glUseProgram(glamor_priv->solid_prog);
dispatch->glUniform4fv(glamor_priv->solid_color_uniform_location,
1, color);
dispatch->glUniform4fv(glamor_priv->solid_color_uniform_location, 1, color);
pixmap_priv_get_dest_scale(pixmap_priv, &xscale, &yscale);
if (unlikely(nbox*4*2 > ARRAY_SIZE(vertices))) {
if (unlikely(nbox * 4 * 2 > ARRAY_SIZE(vertices))) {
int allocated_box;
if (nbox * 6 > GLAMOR_COMPOSITE_VBO_VERT_CNT) {
allocated_box = GLAMOR_COMPOSITE_VBO_VERT_CNT / 6;
} else
}
else
allocated_box = nbox;
pvertices = malloc(allocated_box * 4 * 2 * sizeof(float));
if (pvertices)
valid_nbox = allocated_box;
else {
pvertices = vertices;
valid_nbox = ARRAY_SIZE(vertices) / (4*2);
valid_nbox = ARRAY_SIZE(vertices) / (4 * 2);
}
}
......@@ -224,13 +217,13 @@ _glamor_solid_boxes(PixmapPtr pixmap, BoxPtr box, int nbox, float *color)
dispatch->glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, glamor_priv->ebo);
dispatch->glVertexAttribPointer(GLAMOR_VERTEX_POS, 2, GL_FLOAT,
GL_FALSE, 2 * sizeof(float),
pvertices);
GL_FALSE, 2 * sizeof(float), pvertices);
dispatch->glEnableVertexAttribArray(GLAMOR_VERTEX_POS);
while(nbox) {
while (nbox) {
int box_cnt, i;
float *valid_vertices;
valid_vertices = pvertices;
box_cnt = nbox > valid_nbox ? valid_nbox : nbox;
for (i = 0; i < box_cnt; i++) {
......@@ -239,7 +232,7 @@ _glamor_solid_boxes(PixmapPtr pixmap, BoxPtr box, int nbox, float *color)
box[i].x2, box[i].y2,
glamor_priv->yInverted,
valid_vertices);
valid_vertices += 4*2;
valid_vertices += 4 * 2;
}
if (box_cnt == 1)
dispatch->glDrawArrays(GL_TRIANGLE_FAN, 0, box_cnt * 4);
......@@ -248,14 +241,10 @@ _glamor_solid_boxes(PixmapPtr pixmap, BoxPtr box, int nbox, float *color)
dispatch->glDrawRangeElements(GL_TRIANGLES,
0,
box_cnt * 4,
box_cnt * 6,
GL_UNSIGNED_SHORT,
NULL);
box_cnt * 6, GL_UNSIGNED_SHORT, NULL);
#else
dispatch->glDrawElements(GL_TRIANGLES,
box_cnt * 6,
GL_UNSIGNED_SHORT,
NULL);
box_cnt * 6, GL_UNSIGNED_SHORT, NULL);
#endif
nbox -= box_cnt;
box += box_cnt;
......@@ -273,8 +262,7 @@ _glamor_solid_boxes(PixmapPtr pixmap, BoxPtr box, int nbox, float *color)
Bool
glamor_solid_boxes(PixmapPtr pixmap,
BoxPtr box, int nbox,
unsigned long fg_pixel)
BoxPtr box, int nbox, unsigned long fg_pixel)
{
glamor_pixmap_private *pixmap_priv;
GLfloat color[4];
......@@ -287,8 +275,7 @@ glamor_solid_boxes(PixmapPtr pixmap,
glamor_get_rgba_from_pixel(fg_pixel,
&color[0],
&color[1],
&color[2],
&color[3], format_for_pixmap(pixmap));
&color[2], &color[3], format_for_pixmap(pixmap));
if (pixmap_priv->type == GLAMOR_TEXTURE_LARGE) {
RegionRec region;
......@@ -297,11 +284,13 @@ glamor_solid_boxes(PixmapPtr pixmap,
int i;
RegionInitBoxes(&region, box, nbox);
clipped_regions = glamor_compute_clipped_regions(pixmap_priv, &region, &n_region, 0, 0, 0);
for(i = 0; i < n_region; i++)
{
clipped_regions =
glamor_compute_clipped_regions(pixmap_priv, &region, &n_region, 0,
0, 0);
for (i = 0; i < n_region; i++) {
BoxPtr inner_box;
int inner_nbox;
SET_PIXMAP_FBO_CURRENT(pixmap_priv, clipped_regions[i].block_idx);
inner_box = RegionRects(clipped_regions[i].region);
......@@ -311,7 +300,8 @@ glamor_solid_boxes(PixmapPtr pixmap,
}
free(clipped_regions);
RegionUninit(&region);
} else
}
else
_glamor_solid_boxes(pixmap, box, nbox, color);
return TRUE;
......@@ -319,12 +309,10 @@ glamor_solid_boxes(PixmapPtr pixmap,
Bool
glamor_solid(PixmapPtr pixmap, int x, int y, int width, int height,
unsigned char alu, unsigned long planemask,
unsigned long fg_pixel)
unsigned char alu, unsigned long planemask, unsigned long fg_pixel)
<