return d->surface->type();
}
+bool WaylandSurface::isYInverted() const
+{
+ Q_D(const WaylandSurface);
+ return d->surface->isYInverted();
+}
+
QRect WaylandSurface::geometry() const
{
Q_D(const WaylandSurface);
WaylandSurface(Wayland::Surface *surface);
Type type() const;
+ bool isYInverted() const;
void setGeometry(const QRect &geometry);
QRect geometry() const;
init(surface);
}
+bool WaylandSurfaceItem::isYInverted() const
+{
+ return m_surface->isYInverted();
+}
+
QSGTexture *WaylandSurfaceItem::texture() const
{
if (m_texture)
void setSurface(WaylandSurface *surface);
WaylandSurface *surface() const {return m_surface; }
+ Q_INVOKABLE bool isYInverted() const;
+
QSGTexture *texture() const;
const char *textureChangedSignal() const { return SIGNAL(textureChanged()); }
so there is no need to do makeCurrent in this function.
**/
virtual GLuint createTextureFromBuffer(struct wl_buffer *buffer) = 0;
+ virtual bool isYInverted(struct wl_buffer *) const { return false; }
virtual bool setDirectRenderSurface(WaylandSurface *) {return false;}
virtual bool postBuffer(struct wl_buffer *) {return false;}
return d->type();
}
+bool Surface::isYInverted() const
+{
+ Q_D(const Surface);
+ if (d->type() == WaylandSurface::Texture) {
+ return d->compositor->graphicsHWIntegration()->isYInverted(d->buffer());
+ }
+ return false;
+}
+
void Surface::damage(const QRect &rect)
{
Q_D(Surface);
~Surface();
WaylandSurface::Type type() const;
+ bool isYInverted() const;
uint id() const { return base()->resource.object.id; }
void attach(struct wl_buffer *buffer);