From: Brian P. <bri...@tu...> - 2007-01-19 15:39:16
|
James, I'm checking in your patch, with some changes. I'm renaming dontClipToScreen to be clipToScreen. It's more natural to have variables named in the affirmative sense. I'm initializing the new field to true in the crDMXAllocBackendWindowInfo() function. You'll have to set the field to GL_FALSE in your code. -Brian James Supancic wrote: > 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 > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Chromium-dev mailing list > Chr...@li... > https://lists.sourceforge.net/lists/listinfo/chromium-dev > |