vnc.c (fe4cf57da7a85fa65488448acdc22a65096e832a) | vnc.c (4c65fed8bdf96780735dbdb92a8bd0d6b6526cc3) |
---|---|
1/* 2 * QEMU VNC display driver 3 * 4 * Copyright (C) 2006 Anthony Liguori <anthony@codemonkey.ws> 5 * Copyright (C) 2006 Fabrice Bellard 6 * Copyright (C) 2009 Red Hat, Inc 7 * 8 * Permission is hereby granted, free of charge, to any person obtaining a copy --- 2184 unchanged lines hidden (view full) --- 2193 case 16: 2194 case 32: 2195 break; 2196 default: 2197 vnc_client_error(vs); 2198 return; 2199 } 2200 | 1/* 2 * QEMU VNC display driver 3 * 4 * Copyright (C) 2006 Anthony Liguori <anthony@codemonkey.ws> 5 * Copyright (C) 2006 Fabrice Bellard 6 * Copyright (C) 2009 Red Hat, Inc 7 * 8 * Permission is hereby granted, free of charge, to any person obtaining a copy --- 2184 unchanged lines hidden (view full) --- 2193 case 16: 2194 case 32: 2195 break; 2196 default: 2197 vnc_client_error(vs); 2198 return; 2199 } 2200 |
2201 vs->client_pf.rmax = red_max; | 2201 vs->client_pf.rmax = red_max ? red_max : 0xFF; |
2202 vs->client_pf.rbits = hweight_long(red_max); 2203 vs->client_pf.rshift = red_shift; 2204 vs->client_pf.rmask = red_max << red_shift; | 2202 vs->client_pf.rbits = hweight_long(red_max); 2203 vs->client_pf.rshift = red_shift; 2204 vs->client_pf.rmask = red_max << red_shift; |
2205 vs->client_pf.gmax = green_max; | 2205 vs->client_pf.gmax = green_max ? green_max : 0xFF; |
2206 vs->client_pf.gbits = hweight_long(green_max); 2207 vs->client_pf.gshift = green_shift; 2208 vs->client_pf.gmask = green_max << green_shift; | 2206 vs->client_pf.gbits = hweight_long(green_max); 2207 vs->client_pf.gshift = green_shift; 2208 vs->client_pf.gmask = green_max << green_shift; |
2209 vs->client_pf.bmax = blue_max; | 2209 vs->client_pf.bmax = blue_max ? blue_max : 0xFF; |
2210 vs->client_pf.bbits = hweight_long(blue_max); 2211 vs->client_pf.bshift = blue_shift; 2212 vs->client_pf.bmask = blue_max << blue_shift; 2213 vs->client_pf.bits_per_pixel = bits_per_pixel; 2214 vs->client_pf.bytes_per_pixel = bits_per_pixel / 8; 2215 vs->client_pf.depth = bits_per_pixel == 32 ? 24 : bits_per_pixel; 2216 vs->client_be = big_endian_flag; 2217 --- 1723 unchanged lines hidden --- | 2210 vs->client_pf.bbits = hweight_long(blue_max); 2211 vs->client_pf.bshift = blue_shift; 2212 vs->client_pf.bmask = blue_max << blue_shift; 2213 vs->client_pf.bits_per_pixel = bits_per_pixel; 2214 vs->client_pf.bytes_per_pixel = bits_per_pixel / 8; 2215 vs->client_pf.depth = bits_per_pixel == 32 ? 24 : bits_per_pixel; 2216 vs->client_be = big_endian_flag; 2217 --- 1723 unchanged lines hidden --- |