[Qt-embedded-interest] Display Driver Plugin Tweeking

Bryce Salmi Bryce.Salmi at zoran.com
Fri Jul 24 18:56:08 CEST 2009


Qt List,
   Well when I said that the frame buffer driver that gets around MMAP by directly writing to the screen memory was working, I only said it was working, not perfect :).  I have been trying to figure out a few problems with blit and solidfill along with some cursor problems.  At this time I do not have solidfill enabled and am just using blit until that is squared away and/or solidfill works better.

The issues include:

-the background not being updated when I move screens around or maximize minimize
-the cursor having a tail or not being erased as it moves
-the cursor being a 16x16 box that is either black or weird stripes (could be some sort of memory?)
-the curson moving off the screen to the right and able to go as far as two screens to the right while looping around and starting from the left
-the cursor pointer (where stuff it actually manipulated with the mouse button) is several pixels up and to the left of the top left corner of the 16x16 box.

I managed to get some screen shots of the frame buffer with the cat command and then convert them to PNG format with fbgrab for Linux.  The colors are messed up such as white is shown as pink and the black background shows as green on the actual display.  It is good for reference to see what I am talking about.  I have attached the three images to this email but if the list doesn't attached them I could probably host them on the internet too.  They are simply for reference to give a visual for what I am trying to describe.

Here is a piece of the code that is relevant to the printing with blit.


		// at this point the pointers bufferimage (image) and pscreen (framebuffer) should be pointing to

		// the top left of the region of the image and the part of

		// the screen that needs to be updated.

		
// r height and rwidth are region height and width that are passed to blit
                // the screen is 480 pixels wide so when 480 is added to the pointer it goes down one line
                // width is the width of the image that is passed to blit found with image.width();

		for(j = 0; j<= rheight; j++)

		{

		    for(k = 0; k <= rwidth; k++){

		        qimage = bufferimage+k;

			red = (((*(qimage))>>11) & 0x1F)*(255/31);

			green = (((*(qimage))>>5) & 0x3F)*(255/63);

			blue = (*(qimage) & 0x1F)*(255/31);

			RGBtoYCC(red, green, blue, Y, Cb, Cr);

			// what if k starts on the edge of something that was

			// previously 0 and now the next incremented pixel is 0?

			    if(k & 1)

			        *(pscreen+k) = ((Y<<8)|(Cb));				

			    else

				*(pscreen+k) = ((Y<<8)|(Cr));

			}

			pscreen += 480;

			bufferimage += width;

		}

		lseek(screenFd, 0, SEEK_SET);

                // screenFd is 480*240*2 large if it is not multiplied by 2
                // a segmentation fault occurs
		write(screenFd, screen, sizeof(screen)/2);


this is run each time for each region that is passed to blit.  a sample of that code is:

	QVector<QRect> rects = region.rects();


			

	for (i = 0; i < rects.size(); i++) {

		

		const QRect r = rects.at(i);

...

I hope this helps clarify some of the problems and lets you understand what I am trying to fix.  Thank you for taking the time to read this and any suggestions are more than appreciated!



Sincerely,

Bryce
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-embedded-interest/attachments/20090724/c8aa6452/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: screen.png
Type: image/png
Size: 3494 bytes
Desc: screen.png
Url : http://lists.qt.nokia.com/pipermail/qt-embedded-interest/attachments/20090724/c8aa6452/attachment.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: screen2.png
Type: image/png
Size: 37233 bytes
Desc: screen2.png
Url : http://lists.qt.nokia.com/pipermail/qt-embedded-interest/attachments/20090724/c8aa6452/attachment-0001.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: screen3.png
Type: image/png
Size: 6086 bytes
Desc: screen3.png
Url : http://lists.qt.nokia.com/pipermail/qt-embedded-interest/attachments/20090724/c8aa6452/attachment-0002.png 


More information about the Qt-embedded-interest mailing list