Adding an Accelerated Graphics Driver to Qt for Embedded Linux
|
| Acceleration Without a Memory Buffer |
|---|
| By default the QRasterPaintEngine draws into a memory buffer (this can be local memory, shared memory or graphics memory mapped into application memory). In some cases you might want to avoid using a memory buffer directly, e.g if you want to use an accelerated graphic controller to handle all the buffer manipulation. This can be implemented by reimplementing the QCustomRasterPaintDevice::memory() function to return 0 (meaning no buffer available). Then, whenever a color or image buffer normally would be written into paint engine buffer, the paint engine will call the QRasterPaintEngine::drawColorSpans() and QRasterPaintEngine::drawBufferSpan() functions instead. Note that the default implementations of these functions only calls qFatal() with an error message; reimplement the functions and let them do the appropriate communication with the accelerated graphics controller. |
Derive from the QWSWindowSurface class and reimplement its paintDevice() function. Make this function return a pointer to your custom raster paint device.
Finally, reimplement QScreen's createSurface() function and make this function able to create an instance of your QWSWindowSurface subclass.
| Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt 4.4 | |
| Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
| Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! | ||
Copyright © 2000-2012 - www.developpez.com