Default to non-inverted Y in xcomposite EGL integration.
authorSamuel Rødal <samuel.rodal@nokia.com>
Fri, 3 Jun 2011 13:09:32 +0000 (15:09 +0200)
committerSamuel Rødal <samuel.rodal@nokia.com>
Fri, 3 Jun 2011 13:11:05 +0000 (15:11 +0200)
src/qt-compositor/hardware_integration/xcomposite_egl/xcompositeeglintegration.cpp
src/qt-compositor/hardware_integration/xcomposite_egl/xcompositeeglintegration.h

index 720cec6..0321e07 100644 (file)
@@ -89,6 +89,9 @@ GLuint XCompositeEglIntegration::createTextureFromBuffer(wl_buffer *buffer)
     if (surface == EGL_NO_SURFACE) {
         qDebug() << "Failed to create eglsurface" << pixmap << compositorBuffer->window();
     }
+
+    compositorBuffer->setInvertedY(false);
+
     GLuint textureId;
     glGenTextures(1,&textureId);
     glBindTexture(GL_TEXTURE_2D, textureId);
@@ -100,5 +103,10 @@ GLuint XCompositeEglIntegration::createTextureFromBuffer(wl_buffer *buffer)
     //    eglDestroySurface(mEglDisplay,surface);
 
     return textureId;
+}
 
+bool XCompositeEglIntegration::isYInverted(wl_buffer *buffer) const
+{
+    XCompositeBuffer *compositorBuffer = Wayland::wayland_cast<XCompositeBuffer *>(buffer);
+    return compositorBuffer->isYInverted();
 }
index 9274626..9cf08a7 100644 (file)
@@ -15,6 +15,7 @@ public:
     void initializeHardware(Wayland::Display *waylandDisplay);
 
     GLuint createTextureFromBuffer(struct wl_buffer *buffer);
+    bool isYInverted(wl_buffer *) const;
 
 private:
     Display *mDisplay;