summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/directfb/qdirectfbblitter.h
blob: 2a39912f4d7040345384bd8fce02663003349f44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef QDIRECTFBBLITTER_H
#define QDIRECTFBBLITTER_H

#include "qdirectfbconvenience.h"

#include <private/qblittable_p.h>

#include <directfb.h>

class QDirectFbBlitter : public QBlittable
{
public:
    QDirectFbBlitter(const QSize &size, IDirectFBSurface *surface = 0);
    virtual ~QDirectFbBlitter();

    virtual void fillRect(const QRectF &rect, const QColor &color);
    virtual void drawPixmap(const QRectF &rect, const QPixmap &pixmap, const QRectF &subrect);

protected:
    virtual QImage *doLock();
    virtual void doUnlock();

    IDirectFBSurface *m_surface;
    QImage m_image;

    friend class QDirectFbConvenience;
};

class QDirectFbBlitterPixmapData : public QBlittablePixmapData
{
public:
    QBlittable *createBlittable(const QSize &size) const { return new QDirectFbBlitter(size); }
};

#endif // QDIRECTFBBLITTER_H