I attached it. I actually based the changes on the xf4vnc cvs
repository, when it started supporting RENDER. I won't claim to
understand all of the changes :)

Note that the patch isn't complete yet, aside from the crashing part :)

I looked for the things that need changing by looking at the diffs, like
for instance:

http://cvs.sourceforge.net/viewcvs.py/xf4vnc/xc/programs/Xserver/hw/vnc/draw.c?r1=1.3&r2=1.5

In general, take a look at the cvs logs for the files under

http://cvs.sourceforge.net/viewcvs.py/xf4vnc/xc/programs/Xserver/hw/vnc/

Wout.

   Save the whales.  Collect the whole set.

Today at 11:43, Tim Waugh wrote:

> On Wed, Feb 18, 2004 at 12:32:33PM +0100, Wout Mertens wrote:
>
> > RealVNC 4.0beta doesn't have RENDER because they use the wrong
> > virtual frame buffer library (cfb). They need to rewrite some code
> > in order to use the correct one (fb). I asked them a few times, they
> > don't want to.
>
> Because it's too much effort for little gain, or some other reason?
>
> > I already took a stab at porting RealVNC to the prober framebuffer
> > library, and actually got it to compile without referencing the old
> > library, but it crashed on startup and I gave it up for now ;-)
>
> Did you keep what you had, by any chance?
>
> Tim.
> */
diff -ru /local/wmertens/vnc-4.0b4-unixsrc/xc/programs/Xserver/vnc/XserverDesktop.cc 
vnc-4.0b4-unixsrc/xc/programs/Xserver/vnc/XserverDesktop.cc
--- /local/wmertens/vnc-4.0b4-unixsrc/xc/programs/Xserver/vnc/XserverDesktop.cc Thu 
Sep  4 15:04:40 2003
+++ vnc-4.0b4-unixsrc/xc/programs/Xserver/vnc/XserverDesktop.cc Tue Jan 27 00:15:52 
2004
@@ -380,6 +380,7 @@
 {
   int nrects = REGION_NUM_RECTS(reg);
 
+  /*
   fprintf(stderr,"Region num rects %2d extents %3d,%3d %3dx%3d\n",nrects,
           (REGION_EXTENTS(pScreen,reg))->x1,
           (REGION_EXTENTS(pScreen,reg))->y1,
@@ -392,7 +393,7 @@
             REGION_RECTS(reg)[i].y1,
             REGION_RECTS(reg)[i].x2-REGION_RECTS(reg)[i].x1,
             REGION_RECTS(reg)[i].y2-REGION_RECTS(reg)[i].y1);
-  }
+  }*/
 }
 
 CARD32 XserverDesktop::deferredUpdateTimerCallback(OsTimerPtr timer,
diff -ru /local/wmertens/vnc-4.0b4-unixsrc/xc/programs/Xserver/vnc/Xvnc/Imakefile 
vnc-4.0b4-unixsrc/xc/programs/Xserver/vnc/Xvnc/Imakefile
--- /local/wmertens/vnc-4.0b4-unixsrc/xc/programs/Xserver/vnc/Xvnc/Imakefile    Mon 
Aug 11 21:05:08 2003
+++ vnc-4.0b4-unixsrc/xc/programs/Xserver/vnc/Xvnc/Imakefile    Tue Jan 27 00:53:32 
2004
@@ -32,7 +32,7 @@
 OBJSA =        xvnc.o stubs.o $(OBJS1) miinitext.o $(OBJS2)
 
 INCLUDES = -I. -I.. -I$(XBUILDINCDIR) -I$(FONTINCSRC) \
-          -I../../cfb -I../../mfb -I../../mi -I../../include -I../../os  \
+          -I../../fb -I../../mfb -I../../mi -I../../include -I../../os  \
            -I$(EXTINCSRC) -I$(XINCLUDESRC)  -I$(SERVERSRC)/render $(VNCINCLUDE)
 
 DEFINES = $(OS_DEFINES) $(SHMDEF) $(MMAPDEF) \
diff -ru /local/wmertens/vnc-4.0b4-unixsrc/xc/programs/Xserver/vnc/Xvnc/xvnc.cc 
vnc-4.0b4-unixsrc/xc/programs/Xserver/vnc/Xvnc/xvnc.cc
--- /local/wmertens/vnc-4.0b4-unixsrc/xc/programs/Xserver/vnc/Xvnc/xvnc.cc      Thu 
Sep  4 15:04:41 2003
+++ vnc-4.0b4-unixsrc/xc/programs/Xserver/vnc/Xvnc/xvnc.cc      Tue Jan 27 02:31:47 
2004
@@ -68,7 +68,8 @@
 #include "scrnintstr.h"
 #include "servermd.h"
 #define PSZ 8
-#include "cfb.h"
+#include "fb.h"
+#include "mfb.h"
 #include "mi.h"
 #include "mibstore.h"
 #include "colormapst.h"
@@ -92,16 +93,6 @@
 #undef public
 #undef xor
 #undef and
-  extern Bool cfb16ScreenInit(ScreenPtr, pointer, int, int, int, int, int);
-  extern Bool cfb32ScreenInit(ScreenPtr, pointer, int, int, int, int, int);
-  extern Bool cfb16CreateGC(GCPtr);
-  extern Bool cfb32CreateGC(GCPtr);
-  extern void cfb16GetSpans(DrawablePtr, int, DDXPointPtr, int*, int, char*);
-  extern void cfb32GetSpans(DrawablePtr, int, DDXPointPtr, int*, int, char*);
-  extern void cfb16GetImage(DrawablePtr, int, int, int, int, unsigned int,
-                            unsigned long, char*);
-  extern void cfb32GetImage(DrawablePtr, int, int, int, int, unsigned int,
-                            unsigned long, char*);
 }
 
 #define XVNCVERSION "4.0b4"
@@ -505,9 +496,9 @@
   switch (vfbBitsPerPixel(pGC->depth))
   {
   case 1:  return mfbCreateGC (pGC);
-  case 8:  return cfbCreateGC (pGC);
-  case 16: return cfb16CreateGC (pGC);
-  case 32: return cfb32CreateGC (pGC);
+  case 8:
+  case 16:
+  case 32: return fbCreateGC (pGC);
   default: return FALSE;
   }
 }
@@ -525,13 +516,9 @@
     mfbGetSpans(pDrawable, wMax, ppt, pwidth, nspans, pdstStart);
     break;
   case 8:
-    cfbGetSpans(pDrawable, wMax, ppt, pwidth, nspans, pdstStart);
-    break;
   case 16:
-    cfb16GetSpans(pDrawable, wMax, ppt, pwidth, nspans, pdstStart);
-    break;
   case 32:
-    cfb32GetSpans(pDrawable, wMax, ppt, pwidth, nspans, pdstStart);
+    fbGetSpans(pDrawable, wMax, ppt, pwidth, nspans, pdstStart);
     break;
   }
   return;
@@ -548,13 +535,9 @@
     mfbGetImage(pDrawable, sx, sy, w, h, format, planeMask, pdstLine);
     break;
   case 8:
-    cfbGetImage(pDrawable, sx, sy, w, h, format, planeMask, pdstLine);
-    break;
   case 16:
-    cfb16GetImage(pDrawable, sx, sy, w, h, format, planeMask, pdstLine);
-    break;
   case 32:
-    cfb32GetImage(pDrawable, sx, sy, w, h, format, planeMask, pdstLine);
+    fbGetImage(pDrawable, sx, sy, w, h, format, planeMask, pdstLine);
     break;
   }
 }
@@ -831,19 +814,19 @@
   {
   case 1:
     ret = mfbScreenInit(pScreen, pbits, pvfb->width, pvfb->height,
-                        dpi, dpi, pvfb->paddedWidth);
+                        dpi, dpi, pvfb->paddedWidthInBytes * 8);
     break;
   case 8:
-    ret = cfbScreenInit(pScreen, pbits, pvfb->width, pvfb->height,
-                        dpi, dpi, pvfb->paddedWidth);
+    ret = fbScreenInit(pScreen, pbits, pvfb->width, pvfb->height,
+                        dpi, dpi, pvfb->paddedWidthInBytes,8);
     break;
   case 16:
-    ret = cfb16ScreenInit(pScreen, pbits, pvfb->width, pvfb->height,
-                          dpi, dpi, pvfb->paddedWidth);
+    ret = fbScreenInit(pScreen, pbits, pvfb->width, pvfb->height,
+                          dpi, dpi, pvfb->paddedWidthInBytes/2,16);
     break;
   case 32:
-    ret = cfb32ScreenInit(pScreen, pbits, pvfb->width, pvfb->height,
-                          dpi, dpi, pvfb->paddedWidth);
+    ret = fbScreenInit(pScreen, pbits, pvfb->width, pvfb->height,
+                          dpi, dpi, pvfb->paddedWidthInBytes/4,32);
     break;
   default:
     return FALSE;
@@ -905,7 +888,7 @@
   }
   else
   {
-    ret = cfbCreateDefColormap(pScreen);
+    ret = fbCreateDefColormap(pScreen);
   }
 
   miSetZeroLineBias(pScreen, pvfb->lineBias);
_______________________________________________
VNC-List mailing list
[EMAIL PROTECTED]
To remove yourself from the list visit:
http://www.realvnc.com/mailman/listinfo/vnc-list

Reply via email to