[cairo-xlib-screen] Increase number of GC depths.

Add support for depths 12 and 30, and a separate unknown.
This commit is contained in:
Chris Wilson 2007-05-12 09:43:30 +01:00
parent 70611846de
commit 6a43c02723
2 changed files with 9 additions and 7 deletions

View file

@ -76,7 +76,7 @@ struct _cairo_xlib_screen_info {
cairo_font_options_t font_options;
GC gc[6];
GC gc[9];
unsigned int gc_needs_clip_reset;
};

View file

@ -364,12 +364,14 @@ static int
depth_to_index (int depth)
{
switch(depth){
case 1: return 0;
case 8: return 1;
case 15: return 2;
case 16: return 3;
case 24: return 4;
case 32: return 5;
case 1: return 1;
case 8: return 2;
case 12: return 3;
case 15: return 4;
case 16: return 5;
case 24: return 6;
case 30: return 7;
case 32: return 8;
}
return 0;
}