Magellan Linux

Annotation of /trunk/vnc/patches/vnc-use-fb-2.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 670 - (hide annotations) (download)
Sun Aug 10 22:25:17 2008 UTC (15 years, 9 months ago) by niro
File size: 2535 byte(s)
-updated

1 niro 670 diff -up vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc.use-fb vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc
2     --- vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc.use-fb 2006-05-12 18:50:32.000000000 +0200
3     +++ vnc-4_1_2-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc 2008-07-16 13:28:27.000000000 +0200
4     @@ -48,8 +48,12 @@ extern "C" {
5     #include "X11/Xos.h"
6     #include "scrnintstr.h"
7     #include "servermd.h"
8     +#ifdef VNC_USE_FB
9     +#include "fb.h"
10     +#else
11     #define PSZ 8
12     #include "cfb.h"
13     +#endif
14     #include "mi.h"
15     #include "mibstore.h"
16     #include "colormapst.h"
17     @@ -73,6 +77,7 @@ extern "C" {
18     #undef public
19     #undef xor
20     #undef and
21     +#ifndef VNC_USE_FB
22     extern Bool cfb16ScreenInit(ScreenPtr, pointer, int, int, int, int, int);
23     extern Bool cfb32ScreenInit(ScreenPtr, pointer, int, int, int, int, int);
24     extern Bool cfb16CreateGC(GCPtr);
25     @@ -83,6 +88,7 @@ extern "C" {
26     unsigned long, char*);
27     extern void cfb32GetImage(DrawablePtr, int, int, int, int, unsigned int,
28     unsigned long, char*);
29     +#endif
30     }
31    
32     #define XVNCVERSION "Free Edition 4.1.2"
33     @@ -482,7 +488,7 @@ CARD32 GetTimeInMillis()
34     }
35     #endif
36    
37     -
38     +#ifndef VNC_USE_FB
39     static Bool vfbMultiDepthCreateGC(GCPtr pGC)
40     {
41     switch (vfbBitsPerPixel(pGC->depth))
42     @@ -541,6 +547,7 @@ vfbMultiDepthGetImage(DrawablePtr pDrawa
43     break;
44     }
45     }
46     +#endif
47    
48     static ColormapPtr InstalledMaps[MAXSCREENS];
49    
50     @@ -811,6 +818,11 @@ static Bool vfbScreenInit(int index, Scr
51     defaultColorVisualClass
52     = (pvfb->bitsPerPixel > 8) ? TrueColor : PseudoColor;
53    
54     +#ifdef VNC_USE_FB
55     + if (!fbScreenInit(pScreen, pbits, pvfb->width, pvfb->height,
56     + dpi, dpi, pvfb->paddedWidth, pvfb->bitsPerPixel))
57     + return FALSE;
58     +#else
59     switch (pvfb->bitsPerPixel)
60     {
61     case 1:
62     @@ -838,6 +850,7 @@ static Bool vfbScreenInit(int index, Scr
63     pScreen->CreateGC = vfbMultiDepthCreateGC;
64     pScreen->GetImage = vfbMultiDepthGetImage;
65     pScreen->GetSpans = vfbMultiDepthGetSpans;
66     +#endif
67    
68     pScreen->InstallColormap = vfbInstallColormap;
69     pScreen->UninstallColormap = vfbUninstallColormap;
70     @@ -883,6 +896,9 @@ static Bool vfbScreenInit(int index, Scr
71     }
72     }
73    
74     +#ifdef VNC_USE_FB
75     + ret = fbCreateDefColormap(pScreen);
76     +#else
77     if (pvfb->bitsPerPixel == 1)
78     {
79     ret = mfbCreateDefColormap(pScreen);
80     @@ -891,6 +907,7 @@ static Bool vfbScreenInit(int index, Scr
81     {
82     ret = cfbCreateDefColormap(pScreen);
83     }
84     +#endif
85    
86     miSetZeroLineBias(pScreen, pvfb->lineBias);
87