Title: [138311] trunk/Source/WebCore
Revision
138311
Author
[email protected]
Date
2012-12-20 15:51:39 -0800 (Thu, 20 Dec 2012)

Log Message

Unreviewed, rolling out r138265.
http://trac.webkit.org/changeset/138265
https://bugs.webkit.org/show_bug.cgi?id=105586

Accidentally committed extra code that is not reviewed and
shouldn't go with this commit. (Requested by ostap on
#webkit).

Patch by Sheriff Bot <[email protected]> on 2012-12-20

* platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp:
(WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
(WebCore::GraphicsSurfacePrivate::createPixmap):
(GraphicsSurfacePrivate):
(WebCore::GraphicsSurface::platformSwapBuffers):
* platform/graphics/texmap/TextureMapperBackingStore.cpp:
(WebCore::TextureMapperSurfaceBackingStore::swapBuffersIfNeeded):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (138310 => 138311)


--- trunk/Source/WebCore/ChangeLog	2012-12-20 23:37:41 UTC (rev 138310)
+++ trunk/Source/WebCore/ChangeLog	2012-12-20 23:51:39 UTC (rev 138311)
@@ -1,3 +1,21 @@
+2012-12-20  Sheriff Bot  <[email protected]>
+
+        Unreviewed, rolling out r138265.
+        http://trac.webkit.org/changeset/138265
+        https://bugs.webkit.org/show_bug.cgi?id=105586
+
+        Accidentally committed extra code that is not reviewed and
+        shouldn't go with this commit. (Requested by ostap on
+        #webkit).
+
+        * platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp:
+        (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
+        (WebCore::GraphicsSurfacePrivate::createPixmap):
+        (GraphicsSurfacePrivate):
+        (WebCore::GraphicsSurface::platformSwapBuffers):
+        * platform/graphics/texmap/TextureMapperBackingStore.cpp:
+        (WebCore::TextureMapperSurfaceBackingStore::swapBuffersIfNeeded):
+
 2012-12-20  Ryosuke Niwa  <[email protected]>
 
         REGRESSION(r133820?): SimplifyMarkupTest API test asserts

Modified: trunk/Source/WebCore/platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp (138310 => 138311)


--- trunk/Source/WebCore/platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp	2012-12-20 23:37:41 UTC (rev 138310)
+++ trunk/Source/WebCore/platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp	2012-12-20 23:51:39 UTC (rev 138311)
@@ -168,8 +168,18 @@
         GLXFBConfig* fbConfigs = glXChooseFBConfig(m_display, DefaultScreen(m_display), attributes, &numReturned);
 
         // Make sure that we choose a configuration that supports an alpha mask.
-        m_fbConfig = findFBConfigWithAlpha(fbConfigs, numReturned);
+        for (int i = 0; i < numReturned; ++i) {
+            XVisualInfo* visualInfo = glXGetVisualFromFBConfig(m_display, fbConfigs[i]);
+            if (!visualInfo)
+                continue;
 
+            XRenderPictFormat* format = XRenderFindVisualFormat(m_display, visualInfo->visual);
+            if (format && format->direct.alphaMask > 0) {
+                m_fbConfig = fbConfigs[i];
+                break;
+            }
+        }
+
         XFree(fbConfigs);
 
         // Create a GLX context for OpenGL rendering
@@ -245,11 +255,8 @@
         int numberOfConfigs;
         GLXFBConfig* configs = glXChooseFBConfig(m_display, XDefaultScreen(m_display), glxSpec, &numberOfConfigs);
 
-        // If origin window has alpha then try to find config with alpha.
-        GLXFBConfig& config = m_hasAlpha ? findFBConfigWithAlpha(configs, numberOfConfigs) : configs[0];
-
         m_xPixmap = XCompositeNameWindowPixmap(m_display, winId);
-        m_glxPixmap = glXCreatePixmap(m_display, config, m_xPixmap, glxAttributes);
+        m_glxPixmap = glXCreatePixmap(m_display, *configs, m_xPixmap, glxAttributes);
 
         uint inverted = 0;
         glXQueryDrawable(m_display, m_glxPixmap, GLX_Y_INVERTED_EXT, &inverted);
@@ -347,26 +354,7 @@
         return m_size;
     }
 
-    bool isReceiver() const { return m_isReceiver; }
 private:
-    GLXFBConfig& findFBConfigWithAlpha(GLXFBConfig* fbConfigs, int numberOfConfigs)
-    {
-        for (int i = 0; i < numberOfConfigs; ++i) {
-            XVisualInfo* visualInfo = glXGetVisualFromFBConfig(m_display, fbConfigs[i]);
-            if (!visualInfo)
-                continue;
-
-            XRenderPictFormat* format = XRenderFindVisualFormat(m_display, visualInfo->visual);
-            if (format && format->direct.alphaMask > 0) {
-                return fbConfigs[i];
-                break;
-            }
-        }
-
-        // Return 1st config as a fallback.
-        return fbConfigs[0];
-    }
-
     OffScreenRootWindow m_offScreenWindow;
     IntSize m_size;
     Display* m_display;
@@ -449,14 +437,6 @@
 
 uint32_t GraphicsSurface::platformSwapBuffers()
 {
-    if (m_private->isReceiver()) {
-        glBindTexture(GL_TEXTURE_2D, platformGetTextureID());
-        // Release previous lock and rebind texture to surface to get frame update.
-        pGlXReleaseTexImageEXT(m_private->display(), m_private->glxPixmap(), GLX_FRONT_EXT);
-        pGlXBindTexImageEXT(m_private->display(), m_private->glxPixmap(), GLX_FRONT_EXT, 0);
-        return 0;
-    }
-
     m_private->swapBuffers();
     return 0;
 }

Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperBackingStore.cpp (138310 => 138311)


--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperBackingStore.cpp	2012-12-20 23:37:41 UTC (rev 138310)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperBackingStore.cpp	2012-12-20 23:51:39 UTC (rev 138311)
@@ -39,9 +39,9 @@
     m_graphicsSurface = surface;
 }
 
-void TextureMapperSurfaceBackingStore::swapBuffersIfNeeded(uint32_t)
+void TextureMapperSurfaceBackingStore::swapBuffersIfNeeded(uint32_t frontBuffer)
 {
-    if (m_graphicsSurface)
+    if (m_graphicsSurface && m_graphicsSurface->frontBuffer() != frontBuffer)
         m_graphicsSurface->swapBuffers();
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to