xf86AddInputHandler

2003-07-30 Thread Mathieu Lacage
hi,

I have spent some time recently to dive into XFree86 source code: I am
looking into learning more how it works to understand better X
performance in my application.

One of the things I don't really get is what xf86AddInputHandler is
supposed to be used for. Despite reading a lot of code and grepping
multiple times, I found only very few locations using
xf86AddInputHandler and I could not figure out what it is used for. I'd
be most grateful for any kind of hint :)

Mathieu
-- 
Mathieu Lacage <[EMAIL PROTECTED]>


___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: arc rasterization

2003-07-30 Thread Mathieu Lacage
Hi Craig,

Here is some bibliography in the field of curve rasterization:
http://le-hacker.org/hacks/drafts/curve/

I also did put together some papers on automatic layout:
http://le-hacker.org/hacks/pagination/

Mathieu

Le mar 29/07/2003 à 18:00, Craig Groeschel a écrit :
> I am hoping someone can help out with citations.
> 
> Long ago, there were some arc xtests which always failed.  I
> remember reading/hearing that some folks at Digital proved that
> 128-bit math was required for these tests to pass.  Then I
> recall hearing that the code had been fixed and all the arc
> tests now pass.
> 
> I'd appreciate it if anyone could point me to any published
> papers, articles, mail messages, source code, or rendering
> specs.
> 
> 
> I am also casting about for research topics and would
> appreciate any suggestions, especially in the area of high
> performance numerical algorithms e.g. rasterization, rendering,
> raytracing, radiosity.  Are there any open problems in glyph
> rasterization, or is that all so eighties and nineties and
> called Metafont, PostScript, etc.?
> 
> Thank you for reading.
> 
> =
-- 
Mathieu Lacage <[EMAIL PROTECTED]>


___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: xf86AddInputHandler

2003-07-30 Thread Mathieu Lacage
Le mer 30/07/2003 à 16:36, Egbert Eich a écrit :

>  > One of the things I don't really get is what xf86AddInputHandler is
>  > supposed to be used for. Despite reading a lot of code and grepping
>  > multiple times, I found only very few locations using
>  > xf86AddInputHandler and I could not figure out what it is used for. I'd
>  > be most grateful for any kind of hint :)
>  > 
> 
> Please take a look at:
> 
> http://xfree86.linuxwiki.org/xf86_2a_2a_20Functions

Thanks for the pointer. This documentation is indeed useful but I had
already figured what the function does by myself. I am more interested
in what it is expected to be used for: who will call this function ? You
could probably rephrase this to: "what is an Input Handler?".

[EMAIL PROTECTED] Xserver]$ grep -r xf86AddInputHandler *
hw/xfree86/common/xf86.h:pointer xf86AddInputHandler(int fd, InputHandlerProc proc, 
pointer data);
hw/xfree86/common/xf86Events.c:xf86AddInputHandler(int fd, InputHandlerProc proc, 
pointer data)
hw/xfree86/drivers/glint/pm2_video.c:   xf86AddInputHandler(xvipc_fd, 
Permedia2ReadInput, NULL);
hw/xfree86/loader/xf86sym.c:   SYMFUNC(xf86AddInputHandler)
hw/xfree86/os-support/bsd/bsd_apm.c:APMihPtr = xf86AddInputHandler(fd, 
xf86HandlePMEvents, NULL);
hw/xfree86/os-support/bsd/bsd_kqueue_apm.c:APMihPtr = xf86AddInputHandler(kq, 
xf86HandlePMEvents, NULL);
hw/xfree86/os-support/linux/lnx_apm.c:  APMihPtr = 
xf86AddInputHandler(fd,xf86HandlePMEvents,NULL);
[EMAIL PROTECTED] Xserver]$


grep does not show any meaningful use of the function: I'd expect way
more people to be interested in adding a fd to the list of fds to watch
for in select. Is there another way to do this ?

Obviously, I missed something rather fundamental about this code because
I feel like I am going nowhere.

regards,
Mathieu
-- 
Mathieu Lacage <[EMAIL PROTECTED]>


___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: XFree86 over Firewire !

2003-07-31 Thread Mathieu Lacage
Hi Dwipal,

Le jeu 31/07/2003 à 00:07, Dwipal Desai a écrit :

> that are very low. I want to use X directly over firewire so that stream 
> of around 300 MB/s can be obtained.

If I wanted to do this, I'd hack a firewire transport layer for X in
xc/lib/Xtrans/

Mathieu
-- 
Mathieu Lacage <[EMAIL PROTECTED]>


___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


rough code paths draft doc

2003-07-31 Thread Mathieu Lacage
hi,

I eventually got over my previous AddInputHandler puzzling and kept on
reading code until I finished the included rough outline of "useful"
code paths in the XServer.

I am planning to turn this into a real documentation but real life
matters make it unreasonable for me to finish this before the end of
august. As such, I thought some people might find it useful as-is.

Mathieu
-- 
Mathieu Lacage <[EMAIL PROTECTED]>

main:
-

xc/programs/Xserver/dix/main.c:main
  hw/xfree86/common/xf86Init.c:InitOutput
  hw/xfree86/common/xf86Init.c:InitInput
  Xserver/dix/dispatch.c:Dispatch
hw/xfree86/common/xf86Events.c:ProcessInputEvents
Xserver/os/WaitFor.c:WaitForSomething
ReadRequestFromClient
result = (* client->requestVector[MAJOROP])(client) which ends in one of the 
functions stored in dix/tables.c
 dix/dispatch.c:ProcPolyPoint
include/dix.h:VALIDATE_DRAWABLE_AND_GC
  ValidateGC
pGC->funcs->ValidateGC
  XAAValidateGC
(*pGC->ops->PolyPoint)(pDraw, pGC, stuff->coordMode, npoint,(xPoint *) 
&stuff[1]);
  


InitOutput:
---

  hw/xfree86/common/xf86config.c:xf86HandleConfig
hw/xfree86/common/xf86Config.c:configLayout
  hw/xfree86/common/xf86Config.c:configInput
hw/xfree86/common/xf86Config.c:configInputKbd
  set xf86Info.kbdEvents to one of xf86KbdEvents, xf86XqueEvents or 
xf86WSKbdEvents.
  driver->PreInit
driver/neomagic/neo_driver.c:NEOPreInit
  driver/neomagic/neo_2070.c:Neo2070AccelInit
xaa/xaaInit.c:XAAInit
  xaa/xaaInitAccel.c:XAAInitAccel (finish intialization of gc->ops)
  Xserver/dix/dixutils.c:RegisterBlockAndWakeupHandlers (NoopDDA, xf86Wakeup)


InitInput:
--

foreach input driver specified in config file
  driver->PreInit which ends in
hw/xfree86/input/mouse.c:MousePreInit
hw/xfree86/common/xf86helper.c:xf86AllocateInput
  pInfo->read_input = MouseReadInput
  pMse->PostEvent = MousePostEvent
foreach input driver registered with xf86AllocateInput
  xf86Xinput.c:xf86ActivateDevice
dix/device.c:AddInputDevice
  _AddInputDevice
 dev->deviceProc = deviceProc;
xf86XinputFinalizeInit
one of RegisterPointerDevice or RegisterKeyboardDevice
   device->public.processInputProc = ProcessKeyboardEvent;
   device->public.realInputProc = ProcessKeyboardEvent;
   device->ActivateGrab = ActivateKeyboardGrab;
   device->DeactivateGrab = DeactivateKeyboardGrab;
if (no XInput support)
  :mieqInit (register core keyboard and pointer)
else
  hw/xfree86/common/xf86XInput.c:xf86eqInit (register core keyboard and pointer)
xf86EventQueue.pKbd = pKbd;
xf86EventQueue.pPtr = pPtr;


ProcessInputEvents:
---

  if (no XInput support)
Xserver/mi/mieq.c:mieqProcessInputEvents
  else
Xserver/hw/xfree86/common/xf86Xinput.c:xf86eqProcessInputEvents
  if (key pressed)
(*xf86EventQueue.pKbd->processInputProc)
   Xserver/dix/events.c:ProcessKeyboardEvent
 DeliverGrabbedEvent or DeliverDeviceEvent
  else if (mouse event)
(*(inputInfo.pointer->public.processInputProc)) 
   Xserver/dix/events.c:ProcessPointerEvent 
 DeliverGrabbedEvent or DeliverDeviceEvent
   DeliverEventsToWindow
 TryClientEvents
   WriteEventsToClient
 Xserver/os/io.c:WriteToClient
   ReplyCallback --> used by other pieces of code interested 
in the reply going out
   if (not enough data)
 bufferize
   else
 FlushClient
   xc/lib/xtrans/Xtrans.h:_XSERVTransWritev
  xc/lib/xtrans/Xtrans.c:ciptr->transptr->Writev which 
ends in
xc/lib/xtrans/Xtranslcl.c:TRANS(LocalWritev) 
(local case)
xc/lib/xtrans/Xtranssock.c:TRANS(SocketWritev) 
(networked case)


WaitForSomething:
-

  while (1) {
Xserver/dix/dixutils.c:ProcessWorkQueue
Xserver/dix/dixutils.c:BlockHandler (invoke each function in the BlockHandler 
list with the waittime as param)
   hw/xfree86/common/xf86Events.c:xf86Wakeup
   if (events) {
 xf86Info.kbdEvents which ends in
   hw/xfree86/common/xf86Events.c:xf86PostKbdEvent (convert hardware 
keycode into X keycode)
 ENQUEUE
   EqEnqueue
   __EqEnqueue
 xc/programs/Xserver/hw/xfree86/common/xf86Xinput.c:xf86eqEnqueue 
(insert event in 
   xf86EventQueue.eve