Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qdirectfbblitter.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5#ifndef QDIRECTFBBLITTER_H
6#define QDIRECTFBBLITTER_H
7
9
10#include <private/qblittable_p.h>
11
12#include <directfb.h>
13
15
17{
18public:
19 QDirectFbBlitter(const QSize &size, IDirectFBSurface *surface);
20 QDirectFbBlitter(const QSize &size, bool alpha);
21 virtual ~QDirectFbBlitter();
22
23 void fillRect(const QRectF &rect, const QColor &color) override;
24 void drawPixmap(const QRectF &rect, const QPixmap &pixmap, const QRectF &subrect) override;
25 void alphaFillRect(const QRectF &rect, const QColor &color, QPainter::CompositionMode cmode) override;
26 void drawPixmapOpacity(const QRectF &rect,
27 const QPixmap &pixmap,
28 const QRectF &subrect,
29 QPainter::CompositionMode cmode,
30 qreal opacity) override;
31 bool drawCachedGlyphs(const QPaintEngineState *state,
32 QFontEngine::GlyphFormat glyphFormat,
33 int numGlyphs,
34 const glyph_t *glyphs,
35 const QFixedPoint *positions,
36 QFontEngine *fontEngine) override;
37
39
42 static DFBSurfacePixelFormat selectPixmapFormat(bool withAlpha);
43
44protected:
45 QImage *doLock() override;
46 void doUnlock() override;
47
50
52
53private:
54 void drawDebugRect(const QRect &rect, const QColor &color);
55
56 bool m_premult;
57 bool m_debugPaint;
58};
59
61{
62public:
63 QBlittable *createBlittable(const QSize &size, bool alpha) const override;
64
66
67 bool fromFile(const QString &filename, const char *format,
68 Qt::ImageConversionFlags flags) override;
69
70private:
71 bool fromDataBufferDescription(const DFBDataBufferDescription &);
72};
73
74inline QBlittable *QDirectFbBlitterPlatformPixmap::createBlittable(const QSize& size, bool alpha) const
75{
76 return new QDirectFbBlitter(size, alpha);
77}
78
80{
81 return static_cast<QDirectFbBlitter*>(blittable());
82}
83
85{
86 return m_surface.data();
87}
88
90{
91public:
92 QDirectFbTextureGlyphCache(QFontEngine::GlyphFormat format, const QTransform &matrix)
94 {}
95
96 void resizeTextureData(int width, int height) override;
97
99
100private:
101 QDirectFBPointer<IDirectFBSurface> m_surface;
102};
103
104QT_END_NAMESPACE
105
106#endif // QDIRECTFBBLITTER_H
QPaintDevice * paintDevice() override
Implement this function to return the appropriate paint device.
void resize(const QSize &size, const QRegion &staticContents) override
QDirectFbBackingStore(QWindow *window)
QImage toImage() const override
Implemented in subclasses to return the content of the backingstore as a QImage.
void flush(QWindow *window, const QRegion &region, const QPoint &offset) override
Flushes the given region from the specified window.
bool scroll(const QRegion &area, int dx, int dy) override
Scrolls the given area dx pixels to the right and dy downward; both dx and dy may be negative.
QBlittable * createBlittable(const QSize &size, bool alpha) const override
bool fromFile(const QString &filename, const char *format, Qt::ImageConversionFlags flags) override
QDirectFbBlitter * dfbBlitter() const
static DFBSurfacePixelFormat selectPixmapFormat(bool withAlpha)
bool drawCachedGlyphs(const QPaintEngineState *state, QFontEngine::GlyphFormat glyphFormat, int numGlyphs, const glyph_t *glyphs, const QFixedPoint *positions, QFontEngine *fontEngine) override
IDirectFBSurface * dfbSurface() const
void alphaFillRect(const QRectF &rect, const QColor &color, QPainter::CompositionMode cmode) override
QDirectFbBlitter(const QSize &size, bool alpha)
QDirectFbBlitter(const QSize &size, IDirectFBSurface *surface)
static DFBSurfacePixelFormat pixmapFormat()
QImage * doLock() override
QDirectFBPointer< IDirectFBSurface > m_surface
void drawPixmapOpacity(const QRectF &rect, const QPixmap &pixmap, const QRectF &subrect, QPainter::CompositionMode cmode, qreal opacity) override
static DFBSurfacePixelFormat alphaPixmapFormat()
void doUnlock() override
void fillRect(const QRectF &rect, const QColor &color) override
void drawPixmap(const QRectF &rect, const QPixmap &pixmap, const QRectF &subrect) override
void resizeTextureData(int width, int height) override
QDirectFbTextureGlyphCache(QFontEngine::GlyphFormat format, const QTransform &matrix)
IDirectFBSurface * sourceSurface()
\inmodule QtGui
Definition qwindow.h:63
static void scrollSurface(IDirectFBSurface *surface, const QRect &r, int dx, int dy)