diff options
author | Jørgen Lind <jorgen.lind@theqtcompany.com> | 2015-07-29 14:58:54 +0200 |
---|---|---|
committer | Jørgen Lind <jorgen.lind@theqtcompany.com> | 2015-08-28 13:09:41 +0200 |
commit | a327ca8d8a1f6e0a44a3aa6bd4dac716911c434e (patch) | |
tree | ae4c432c495a7baee8f97737160836cbb2e38476 /src/hardwareintegration/compositor/wayland-egl | |
parent | 6c9c54587c6cd1059d5de652d06e248456832ab6 (diff) |
Move the texture ownership from the QWaylandSurface
to the respective QWaylandSurfaceView. For all GL applications this will have no
significant impact, but will cause a memory regression for shm surfaces
with multiple views.
This is done to simplify the creation and destruction of textures,
especially in multi-threaded environments.
Also the same patch removes the y_inverted property and replaces it with
a origin property. Its done in the same patch as a lot of the code was
overlapping.
Change-Id: I4bce50c614c9ac3ba0580e0560339476eac03433
Diffstat (limited to 'src/hardwareintegration/compositor/wayland-egl')
-rw-r--r-- | src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp | 8 | ||||
-rw-r--r-- | src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp index 0453a31b7..d22b2db04 100644 --- a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp +++ b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp @@ -190,7 +190,7 @@ void WaylandEglClientBufferIntegration::bindTextureToBuffer(struct ::wl_resource d->egl_destroy_image(d->egl_display, image); } -bool WaylandEglClientBufferIntegration::isYInverted(struct ::wl_resource *buffer) const +QWaylandSurface::Origin WaylandEglClientBufferIntegration::origin(struct ::wl_resource *buffer) const { #if defined(EGL_WAYLAND_Y_INVERTED_WL) Q_D(const WaylandEglClientBufferIntegration); @@ -203,11 +203,11 @@ bool WaylandEglClientBufferIntegration::isYInverted(struct ::wl_resource *buffer // value (not supported) should be treated the same as EGL_TRUE return value // and EGL_TRUE in value. if (ret == EGL_FALSE || isYInverted == EGL_TRUE) - return true; - return false; + return QWaylandSurface::OriginTopLeft; + return QWaylandSurface::OriginBottomLeft; #endif - return QtWayland::ClientBufferIntegration::isYInverted(buffer); + return QtWayland::ClientBufferIntegration::origin(buffer); } diff --git a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.h b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.h index 66b827caa..874d960f5 100644 --- a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.h +++ b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.h @@ -53,7 +53,7 @@ public: void initializeHardware(QtWayland::Display *waylandDisplay) Q_DECL_OVERRIDE; void bindTextureToBuffer(struct ::wl_resource *buffer) Q_DECL_OVERRIDE; - bool isYInverted(struct ::wl_resource *) const Q_DECL_OVERRIDE; + QWaylandSurface::Origin origin(struct ::wl_resource *) const Q_DECL_OVERRIDE; void *lockNativeBuffer(struct ::wl_resource *buffer) const Q_DECL_OVERRIDE; void unlockNativeBuffer(void *native_buffer) const Q_DECL_OVERRIDE; |