4#ifndef QBACKINGSTORE_COCOA_H
5#define QBACKINGSTORE_COCOA_H
7#include <QtGui/private/qrasterbackingstore_p.h>
9#include <private/qcore_mac_p.h>
11#include <QScopedPointer>
14#include <unordered_map>
43 qreal sourceDevicePixelRatio,
47 bool translucentBackground)
override;
53 void observeBackingPropertiesChanges();
56 QSize m_requestedSize;
66 qreal devicePixelRatio()
const {
return m_devicePixelRatio; }
67 bool isDirty()
const {
return !dirtyRegion.
isEmpty(); }
71 qreal m_devicePixelRatio;
75 void updateDirtyStates(
const QRegion &paintedRegion);
77 void ensureBackBuffer();
78 bool recreateBackBufferIfNeeded();
79 void finalizeBackBuffer();
83 void backingPropertiesChanged();
86 std::list<std::unique_ptr<GraphicsBuffer>> m_buffers;
89 std::unordered_map<QWindow*, std::unique_ptr<QCALayerBackingStore>> m_subWindowBackingstores;
90 void windowDestroyed(
QObject *
object);
91 bool m_clearSurfaceOnPaint =
true;
QPaintDevice * paintDevice() override
Implement this function to return the appropriate paint device.
QImage toImage() const override
Implemented in subclasses to return the content of the backingstore as a QImage.
bool scroll(const QRegion ®ion, int dx, int dy) override
Scrolls the given area dx pixels to the right and dy downward; both dx and dy may be negative.
void endPaint() override
This function is called after painting onto the surface has ended.
void flush(QWindow *, const QRegion &, const QPoint &) override
Flushes the given region from the specified window.
void beginPaint(const QRegion ®ion) override
This function is called before painting onto the surface begins, with the region in which the paintin...
QPlatformGraphicsBuffer * graphicsBuffer() const override
Accessor for a backingstores graphics buffer abstraction.
bool eventFilter(QObject *watched, QEvent *event) override
Filters events if this object has been installed as an event filter for the watched object.
FlushResult rhiFlush(QWindow *window, qreal sourceDevicePixelRatio, const QRegion ®ion, const QPoint &offset, QPlatformTextureList *textures, bool translucentBackground) override
Flushes the given region from the specified window, and compositing it with the specified textures li...
void resize(const QSize &size, const QRegion &staticContents) override
QCFType< CGColorSpaceRef > colorSpace() const
\inmodule QtCore\reentrant
The QRegion class specifies a clip region for a painter.
bool isEmpty() const
Returns true if the region is empty; otherwise returns false.
Combined button and popup list for selecting options.
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLuint const GLuint GLuint const GLuint * textures
GLenum GLuint GLintptr offset
GLint GLsizei GLsizei GLenum format