[cogl/wip/rib/frame-synchronization: 193/206] pedantic style fixes
- From: Robert Bragg <rbragg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl/wip/rib/frame-synchronization: 193/206] pedantic style fixes
- Date: Wed, 23 Jan 2013 17:25:30 +0000 (UTC)
commit 98d2be959c02ef911fdfe038590c226dc8681a1b
Author: Robert Bragg <robert linux intel com>
Date: Mon Dec 3 23:23:37 2012 +0000
pedantic style fixes
TODO: squash back into owen's patch
cogl/cogl-xlib-renderer.c | 42 ++++++++++++++++++++++++++--------------
cogl/winsys/cogl-winsys-glx.c | 10 ++++++--
2 files changed, 34 insertions(+), 18 deletions(-)
---
diff --git a/cogl/cogl-xlib-renderer.c b/cogl/cogl-xlib-renderer.c
index e234a42..833440c 100644
--- a/cogl/cogl-xlib-renderer.c
+++ b/cogl/cogl-xlib-renderer.c
@@ -202,12 +202,18 @@ compare_outputs (CoglOutput *a,
#define CSO(X) COGL_SUBPIXEL_ORDER_ ## X
static CoglSubpixelOrder subpixel_map[6][6] = {
- { CSO(UNKNOWN), CSO(NONE), CSO(HORIZONTAL_RGB), CSO(HORIZONTAL_BGR), CSO(VERTICAL_RGB), CSO(VERTICAL_BGR) }, /* 0 */
- { CSO(UNKNOWN), CSO(NONE), CSO(VERTICAL_RGB), CSO(VERTICAL_BGR), CSO(HORIZONTAL_BGR), CSO(HORIZONTAL_RGB) }, /* 90 */
- { CSO(UNKNOWN), CSO(NONE), CSO(HORIZONTAL_BGR), CSO(HORIZONTAL_RGB), CSO(VERTICAL_BGR), CSO(VERTICAL_RGB) }, /* 180 */
- { CSO(UNKNOWN), CSO(NONE), CSO(VERTICAL_BGR), CSO(VERTICAL_RGB), CSO(HORIZONTAL_RGB), CSO(HORIZONTAL_BGR) }, /* 270 */
- { CSO(UNKNOWN), CSO(NONE), CSO(HORIZONTAL_BGR), CSO(HORIZONTAL_RGB), CSO(VERTICAL_RGB), CSO(VERTICAL_BGR) }, /* Reflect_X */
- { CSO(UNKNOWN), CSO(NONE), CSO(HORIZONTAL_RGB), CSO(HORIZONTAL_BGR), CSO(VERTICAL_BGR), CSO(VERTICAL_RGB) }, /* Reflect_Y */
+ { CSO(UNKNOWN), CSO(NONE), CSO(HORIZONTAL_RGB), CSO(HORIZONTAL_BGR),
+ CSO(VERTICAL_RGB), CSO(VERTICAL_BGR) }, /* 0 */
+ { CSO(UNKNOWN), CSO(NONE), CSO(VERTICAL_RGB), CSO(VERTICAL_BGR),
+ CSO(HORIZONTAL_BGR), CSO(HORIZONTAL_RGB) }, /* 90 */
+ { CSO(UNKNOWN), CSO(NONE), CSO(HORIZONTAL_BGR), CSO(HORIZONTAL_RGB),
+ CSO(VERTICAL_BGR), CSO(VERTICAL_RGB) }, /* 180 */
+ { CSO(UNKNOWN), CSO(NONE), CSO(VERTICAL_BGR), CSO(VERTICAL_RGB),
+ CSO(HORIZONTAL_RGB), CSO(HORIZONTAL_BGR) }, /* 270 */
+ { CSO(UNKNOWN), CSO(NONE), CSO(HORIZONTAL_BGR), CSO(HORIZONTAL_RGB),
+ CSO(VERTICAL_RGB), CSO(VERTICAL_BGR) }, /* Reflect_X */
+ { CSO(UNKNOWN), CSO(NONE), CSO(HORIZONTAL_RGB), CSO(HORIZONTAL_BGR),
+ CSO(VERTICAL_BGR), CSO(VERTICAL_RGB) }, /* Reflect_Y */
};
#undef CSO
@@ -240,7 +246,8 @@ update_outputs (CoglRenderer *renderer,
float refresh_rate = 0;
int j;
- crtc_info = XRRGetCrtcInfo (xlib_renderer->xdpy, resources, resources->crtcs[i]);
+ crtc_info = XRRGetCrtcInfo (xlib_renderer->xdpy,
+ resources, resources->crtcs[i]);
if (crtc_info == NULL)
{
error = TRUE;
@@ -254,7 +261,8 @@ update_outputs (CoglRenderer *renderer,
{
if (resources->modes[j].id == crtc_info->mode)
refresh_rate = (resources->modes[j].dotClock /
- ((float)resources->modes[j].hTotal * resources->modes[j].vTotal));
+ ((float)resources->modes[j].hTotal *
+ resources->modes[j].vTotal));
}
output_info = XRRGetOutputInfo (xlib_renderer->xdpy,
@@ -354,9 +362,11 @@ update_outputs (CoglRenderer *renderer,
if (!_cogl_output_values_equal (output_l, output_m))
{
- xlib_renderer->outputs = g_list_remove_link (xlib_renderer->outputs, m);
- xlib_renderer->outputs = g_list_insert_before (xlib_renderer->outputs ,
- m_next, output_l);
+ xlib_renderer->outputs =
+ g_list_remove_link (xlib_renderer->outputs, m);
+ xlib_renderer->outputs =
+ g_list_insert_before (xlib_renderer->outputs,
+ m_next, output_l);
cogl_object_ref (output_l);
changed = TRUE;
@@ -367,8 +377,8 @@ update_outputs (CoglRenderer *renderer,
}
else if (cmp < 0)
{
- xlib_renderer->outputs = g_list_insert_before (xlib_renderer->outputs ,
- m, output_l);
+ xlib_renderer->outputs =
+ g_list_insert_before (xlib_renderer->outputs, m, output_l);
cogl_object_ref (output_l);
changed = TRUE;
l = l->next;
@@ -376,7 +386,8 @@ update_outputs (CoglRenderer *renderer,
else
{
GList *m_next = m->next;
- xlib_renderer->outputs = g_list_remove_link (xlib_renderer->outputs, m);
+ xlib_renderer->outputs =
+ g_list_remove_link (xlib_renderer->outputs, m);
changed = TRUE;
m = m_next;
}
@@ -424,7 +435,8 @@ update_outputs (CoglRenderer *renderer,
}
COGL_NOTE (WINSYS,
- " %10s: +%d+%dx%dx%d mm=%dx%d dpi=%.1fx%.1f subpixel_order=%s refresh_rate=%.3f",
+ " %10s: +%d+%dx%dx%d mm=%dx%d dpi=%.1fx%.1f "
+ "subpixel_order=%s refresh_rate=%.3f",
output->name,
output->x, output->y, output->width, output->height,
output->mm_width, output->mm_height,
diff --git a/cogl/winsys/cogl-winsys-glx.c b/cogl/winsys/cogl-winsys-glx.c
index 079cf3b..15a5919 100644
--- a/cogl/winsys/cogl-winsys-glx.c
+++ b/cogl/winsys/cogl-winsys-glx.c
@@ -333,7 +333,8 @@ update_output (CoglOnscreen *onscreen)
width = cogl_framebuffer_get_width (framebuffer);
height = cogl_framebuffer_get_height (framebuffer);
output = _cogl_xlib_renderer_output_for_rectangle (display->renderer,
- xlib_onscreen->x, xlib_onscreen->y,
+ xlib_onscreen->x,
+ xlib_onscreen->y,
width, height);
if (xlib_onscreen->output != output)
{
@@ -351,7 +352,8 @@ static void
notify_resize (CoglContext *context,
XConfigureEvent *configure_event)
{
- CoglOnscreen *onscreen = find_onscreen_for_xid (context, configure_event->window);
+ CoglOnscreen *onscreen = find_onscreen_for_xid (context,
+ configure_event->window);
CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (onscreen);
CoglDisplay *display = context->display;
CoglGLXDisplay *glx_display = display->winsys;
@@ -364,7 +366,9 @@ notify_resize (CoglContext *context,
glx_onscreen = onscreen->winsys;
xlib_onscreen = onscreen->winsys;
- _cogl_framebuffer_winsys_update_size (framebuffer, configure_event->width, configure_event->height);
+ _cogl_framebuffer_winsys_update_size (framebuffer,
+ configure_event->width,
+ configure_event->height);
/* We only want to notify that a resize happened when the
application calls cogl_context_dispatch so instead of immediately
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]