9#include <QtGui/QPainter>
10#include <QtCore/QCoreApplication>
11#include <qpa/qwindowsysteminterface.h>
13#include <QtCore/QDebug>
14#include <QtCore/QElapsedTimer>
19 : mUpdatePending(
false),
22 mFormat(
QImage::Format_RGB16),
51 if (!mPendingBackingStores.
isEmpty()) {
53 for (
int i = 0;
i < mPendingBackingStores.
size(); ++
i) {
58 window->setBackingStore(bs);
107 return fbw->window();
115 if (fbw->geometry().contains(
p,
false) && fbw->window()->isVisible())
116 return fbw->window();
172 return touchedRegion;
179 rect =
rect.intersected(screenRect);
186 for (
int layerIndex =
mWindowStack.
size() - 1; layerIndex != -1; layerIndex--) {
190 const QRect windowRect =
mWindowStack[layerIndex]->geometry().translated(-screenOffset);
191 const QRect windowIntersect =
rect.translated(-windowRect.
left(), -windowRect.
top());
194 backingStore->
lock();
208 return touchedRegion;
227#include "moc_qfbscreen_p.cpp"
static void postEvent(QObject *receiver, QEvent *event, int priority=Qt::NormalEventPriority)
virtual bool isOnScreen() const
virtual QRect lastPainted() const
virtual QRect drawCursor(QPainter &painter)
virtual bool isDirty() const
QFbWindow * windowForId(WId wid) const
virtual int windowCount() const
virtual Flags flags() const
QRect geometry() const override
Reimplement in subclass to return the pixel geometry of the screen.
QList< QFbWindow * > mWindowStack
virtual void topWindowChanged(QWindow *)
QWindow * topLevelAt(const QPoint &p) const override
Return the given top level window for a given position.
bool event(QEvent *event) override
This virtual function receives events to an object and should return true if the event e was recogniz...
virtual bool initialize()
virtual void lower(QFbWindow *window)
QWindow * topWindow() const
void initializeCompositor()
void setGeometry(const QRect &rect)
virtual void raise(QFbWindow *window)
virtual QRegion doRedraw()
void setPhysicalSize(const QSize &size)
virtual void setDirty(const QRect &rect)
virtual void removeWindow(QFbWindow *window)
virtual void addWindow(QFbWindow *window)
bool hasAlphaChannel() const
Returns true if the image has a format that respects the alpha channel, otherwise returns false.
qsizetype size() const noexcept
bool isEmpty() const noexcept
void removeAt(qsizetype i)
bool removeOne(const AT &t)
const_reference at(qsizetype i) const noexcept
void move(qsizetype from, qsizetype to)
void prepend(rvalue_ref t)
virtual bool event(QEvent *event)
This virtual function receives events to an object and should return true if the event e was recogniz...
The QPainter class performs low-level painting on widgets and other paint devices.
void setCompositionMode(CompositionMode mode)
Sets the composition mode to the given mode.
void drawImage(const QRectF &targetRect, const QImage &image, const QRectF &sourceRect, Qt::ImageConversionFlags flags=Qt::AutoColor)
Draws the rectangular portion source of the given image into the target rectangle in the paint device...
@ CompositionMode_SourceOver
void fillRect(const QRectF &, const QBrush &)
Fills the given rectangle with the brush specified.
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
constexpr QPoint topLeft() const noexcept
Returns the position of the rectangle's top-left corner.
constexpr int top() const noexcept
Returns the y-coordinate of the rectangle's top edge.
constexpr int left() const noexcept
Returns the x-coordinate of the rectangle's left edge.
constexpr QSize size() const noexcept
Returns the size of the rectangle.
constexpr QRect translated(int dx, int dy) const noexcept
Returns a copy of the rectangle that is translated dx along the x axis and dy along the y axis,...
The QRegion class specifies a clip region for a painter.
bool intersects(const QRegion &r) const
bool isEmpty() const
Returns true if the region is empty; otherwise returns false.
static void handleScreenGeometryChange(QScreen *screen, const QRect &newGeometry, const QRect &newAvailableGeometry)
static void handleWindowActivated(QWindow *window, Qt::FocusReason r=Qt::OtherFocusReason)
Combined button and popup list for selecting options.
GLfloat GLfloat GLfloat w
[0]
GLenum GLuint GLintptr GLsizeiptr size
[1]
qsizetype indexOf(const AT &t, qsizetype from=0) const noexcept