From f0922c9bafce6a565af020851012dd3cbb609888 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Fri, 6 Jul 2012 05:40:57 +0530 Subject: linuxfb: Rework screen code Move the screen code from integration. The design philosophy is that QFbScreen takes care of generic framebuffer composition. QLinuxFbScreen is just an linux framebuffer adaptation layer. Change-Id: I8456c13826f06621037dd77fe0d0bd8873806c96 Reviewed-by: Thomas Senyk Reviewed-by: Girish Ramakrishnan --- .../platforms/linuxfb/qlinuxfbintegration.h | 54 ++-------------------- 1 file changed, 5 insertions(+), 49 deletions(-) (limited to 'src/plugins/platforms/linuxfb/qlinuxfbintegration.h') diff --git a/src/plugins/platforms/linuxfb/qlinuxfbintegration.h b/src/plugins/platforms/linuxfb/qlinuxfbintegration.h index 430375dbb6..7c67431fdb 100644 --- a/src/plugins/platforms/linuxfb/qlinuxfbintegration.h +++ b/src/plugins/platforms/linuxfb/qlinuxfbintegration.h @@ -44,21 +44,16 @@ #include -#include - QT_BEGIN_NAMESPACE class QLinuxFbIntegrationPrivate; -struct fb_cmap; -struct fb_var_screeninfo; -struct fb_fix_screeninfo; class QAbstractEventDispatcher; class QLinuxFbScreen; class QLinuxFbIntegration : public QPlatformIntegration { public: - QLinuxFbIntegration(); + QLinuxFbIntegration(const QStringList ¶mList); ~QLinuxFbIntegration(); bool hasCapability(QPlatformIntegration::Capability cap) const; @@ -67,52 +62,13 @@ public: QPlatformWindow *createPlatformWindow(QWindow *window) const; QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const; QAbstractEventDispatcher *guiThreadEventDispatcher() const; - - QList screens() const { return mScreens; } - + QList screens() const; QPlatformFontDatabase *fontDatabase() const; private: - QLinuxFbScreen *mPrimaryScreen; - QList mScreens; - QLinuxFbIntegrationPrivate *d_ptr; - - enum PixelType { NormalPixel, BGRPixel }; - - QRgb screenclut[256]; - int screencols; - - uchar * data; - - QImage::Format screenFormat; - int w; - int lstep; - int h; - int d; - PixelType pixeltype; - bool grayscale; - - int dw; - int dh; - - int size; // Screen size - int mapsize; // Total mapped memory - - int displayId; - - int physWidth; - int physHeight; - - bool canaccel; - int dataoffset; - int cacheStart; - - bool connect(const QString &displaySpec); - bool initDevice(); - void setPixelFormat(struct fb_var_screeninfo); - void createPalette(fb_cmap &cmap, fb_var_screeninfo &vinfo, fb_fix_screeninfo &finfo); - void blank(bool on); - QPlatformFontDatabase *fontDb; + QLinuxFbScreen *m_primaryScreen; + QPlatformFontDatabase *m_fontDb; + QAbstractEventDispatcher *m_eventDispatcher; }; QT_END_NAMESPACE -- cgit v1.2.3