Mercurial > mplayer.hg
comparison libvo/vo_x11.c @ 21584:3ddf91e141a3
Use XCreateImage instead of XGetImage, this is not only more correct and
similar to the SHM case, it also eliminates the massive startup delay over
ssh (at least when you have a tiny upstream).
author | reimar |
---|---|
date | Tue, 12 Dec 2006 18:43:10 +0000 |
parents | 27aa9329d4f7 |
children | e54f539c9b5d |
comparison
equal
deleted
inserted
replaced
21583:f746c28a324c | 21584:3ddf91e141a3 |
---|---|
227 } else | 227 } else |
228 { | 228 { |
229 shmemerror: | 229 shmemerror: |
230 Shmem_Flag = 0; | 230 Shmem_Flag = 0; |
231 #endif | 231 #endif |
232 myximage = XGetImage(mDisplay, vo_window, 0, 0, | 232 myximage = XCreateImage(mDisplay, vinfo.visual, depth, ZPixmap, |
233 image_width, image_height, AllPlanes, | 233 0, NULL, image_width, image_height, 8, 0); |
234 ZPixmap); | 234 myximage->data = malloc(myximage->bytes_per_line * image_height); |
235 memset(myximage->data, 0, myximage->bytes_per_line * image_height); | |
235 ImageData = myximage->data; | 236 ImageData = myximage->data; |
236 #ifdef HAVE_SHM | 237 #ifdef HAVE_SHM |
237 } | 238 } |
238 #endif | 239 #endif |
239 } | 240 } |
250 #endif | 251 #endif |
251 { | 252 { |
252 XDestroyImage(myximage); | 253 XDestroyImage(myximage); |
253 } | 254 } |
254 myximage = NULL; | 255 myximage = NULL; |
256 ImageData = NULL; | |
255 } | 257 } |
256 | 258 |
257 #ifdef WORDS_BIGENDIAN | 259 #ifdef WORDS_BIGENDIAN |
258 #define BO_NATIVE MSBFirst | 260 #define BO_NATIVE MSBFirst |
259 #define BO_NONNATIVE LSBFirst | 261 #define BO_NONNATIVE LSBFirst |