|
From: James S. <arr...@gm...> - 2006-11-21 21:57:37
|
I would propose the following patch for Chromium's DMX module. I use
the following change for my dmxdireect SPU. Basically, if before
calling crDMXGetBackendWindowInfo I set the dontclipToScreen data
member to true in the CRDMXBackendWindowInfo (sense Chromium appears
to zero CRDMXBackendWindowInfo during allocation, it is set to false
by default).
Then, when crDMXGetBackendWindowInfo is called, it doesn't clip the
child window to the screen.
I chose this method because it appears to cause the least disruption
to existing code (Chromium was written in C, and I don't think C likes
function overloading etc.).
Index: include/cr_dmx.h
===================================================================
RCS file: /cvsroot/chromium/cr/include/cr_dmx.h,v
retrieving revision 1.1
diff -r1.1 cr_dmx.h
15a16
> int dontclipToScreen;
Index: dmx/dmx.c
===================================================================
RCS file: /cvsroot/chromium/cr/dmx/dmx.c,v
retrieving revision 1.2
diff -r1.2 dmx.c
158,165c158,176
< subwinX = backend->visrect.x1;
< subwinY = backend->visrect.y1;
< subwinW = backend->visrect.x2 - backend->visrect.x1;
< subwinH = backend->visrect.y2 - backend->visrect.y1;
< if (subwinW <= 0)
< subwinW = 1;
< if (subwinH <= 0)
< subwinH = 1;
---
> if(!backend->dontclipToScreen)
> {
> subwinX = backend->visrect.x1;
> subwinY = backend->visrect.y1;
> subwinW = backend->visrect.x2 - backend->visrect.x1;
> subwinH = backend->visrect.y2 - backend->visrect.y1;
> if (subwinW <= 0)
> subwinW = 1;
> if (subwinH <= 0)
> subwinH = 1;
> }
> else
> {
> /*Used by dmxdirect */
> subwinX = 0;
> subwinY = 0;
> subwinW = dmxWinInfo[i].pos.width;
> subwinH = dmxWinInfo[i].pos.height;
> }
Thank you for your time,
James Steven Supancic III
|