7#include <qpa/qplatformbackingstore.h>
8#include <qpa/qplatformintegration.h>
13#include <private/qguiapplication_p.h>
14#include <private/qwindow_p.h>
16#include <private/qhighdpiscaling_p.h>
34 return downscale ? std::ceil(windowDpr) : windowDpr;
45 return roundingFactor * guiFactor;
176 qWarning(
"QBackingStore::endPaint() called with active painter; did you forget to destroy it or call QPainter::end() on it?");
202 qWarning() <<
"QBackingStore::flush() called for "
203 <<
window <<
" which does not have a handle.";
207 Q_ASSERT(
window == topLevelWindow || topLevelWindow->isAncestorOf(
window, QWindow::ExcludeTransients));
258 if (
qFloor(nativeDx) != nativeDx ||
qFloor(nativeDy) != nativeDy)
297 const QRect imageRect(0, 0,
img.width(),
img.height());
304 "The sourceRect should already account for clipping, both pre and post scroll");
309 if (sourceRect.
top() < destRect.
top()) {
311 dest = mem + (destRect.
top() + sourceRect.
height() - 1) * lineskip + destRect.
left() *
depth;
312 lineskip = -lineskip;
315 dest = mem + destRect.
top() * lineskip + destRect.
left() *
depth;
318 const int w = sourceRect.
width();
320 const int bytes =
w *
depth;
325 ::memmove(dest,
src, bytes);
331 ::memcpy(dest,
src, bytes);
IOBluetoothDevice * device
qreal deviceIndependentToNativeFactor() const
qreal backingStoreDevicePixelRatio() const
QPlatformBackingStore * platformBackingStore
QBackingStorePrivate(QWindow *w)
QScopedPointer< QImage > highDpiBackingstore
The QBackingStore class provides a drawing area for QWindow.
QPlatformBackingStore * handle() const
Returns a pointer to the QPlatformBackingStore implementation.
QPaintDevice * paintDevice()
Returns the paint device for this surface.
QWindow * window() const
Returns a pointer to the top-level window associated with this surface.
QRegion staticContents() const
Returns a QRegion representing the area of the window that has static contents.
void beginPaint(const QRegion &)
Begins painting on the backing store surface in the given region.
void flush(const QRegion ®ion, QWindow *window=nullptr, const QPoint &offset=QPoint())
Flushes the given region from the specified window onto the screen.
void setStaticContents(const QRegion ®ion)
Set region as the static contents of this window.
void resize(const QSize &size)
Sets the size of the window surface to size.
QBackingStore(QWindow *window)
Constructs an empty surface for the given top-level window.
QSize size() const
Returns the current size of the window surface.
bool hasStaticContents() const
Returns a boolean indicating if this window has static contents or not.
bool scroll(const QRegion &area, int dx, int dy)
Scrolls the given area dx pixels to the right and dy downward; both dx and dy may be negative.
~QBackingStore()
Destroys this surface.
void endPaint()
Ends painting.
static QPlatformIntegration * platformIntegration()
static qreal factor(C *context)
QSize size() const
Returns the size of the image, i.e.
void setDevicePixelRatio(qreal scaleFactor)
Sets the device pixel ratio for the image.
qreal devicePixelRatio() const
Returns the device pixel ratio for the image.
\inmodule QtCore\reentrant
constexpr int x() const noexcept
Returns the x coordinate of this point.
constexpr int y() const noexcept
Returns the y coordinate of this point.
\inmodule QtCore\reentrant
constexpr bool isEmpty() const noexcept
Returns true if the rectangle is empty, otherwise returns false.
constexpr int height() const noexcept
Returns the height of the rectangle.
constexpr int bottom() const noexcept
Returns the y-coordinate of the rectangle's bottom edge.
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.
bool contains(const QRect &r, bool proper=false) const noexcept
This is an overloaded member function, provided for convenience. It differs from the above function o...
constexpr int left() const noexcept
Returns the x-coordinate of the rectangle's left edge.
constexpr int width() const noexcept
Returns the width 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.
QRect boundingRect() const noexcept
Returns the bounding rectangle of this region.
void translate(int dx, int dy)
Translates (moves) the region dx along the X axis and dy along the Y axis.
bool isEmpty() const
Returns true if the region is empty; otherwise returns false.
T * data() const noexcept
Returns the value of the pointer referenced by this object.
bool isNull() const noexcept
Returns true if this object refers to \nullptr.
void reset(T *other=nullptr) noexcept(noexcept(Cleanup::cleanup(std::declval< T * >())))
Deletes the existing object it is pointing to (if any), and sets its pointer to other.
qreal scale(qreal value, qreal scaleFactor, QPointF=QPointF(0, 0))
Combined button and popup list for selecting options.
void Q_GUI_EXPORT qt_scrollRectInImage(QImage &img, const QRect &rect, const QPoint &offset)
static int area(const QSize &s)
constexpr const T & qMax(const T &a, const T &b)
constexpr T qAbs(const T &t)
GLint GLenum GLsizei GLsizei GLsizei depth
GLfloat GLfloat GLfloat w
[0]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum GLuint GLintptr offset
GLfloat GLfloat GLfloat GLfloat h
GLsizei GLsizei GLchar * source
static QT_BEGIN_NAMESPACE qreal dpr(const QWindow *w)
#define Q_ASSERT_X(cond, x, msg)
Q_CORE_EXPORT int qEnvironmentVariableIntValue(const char *varName, bool *ok=nullptr) noexcept