Title: [136487] trunk
Revision
136487
Author
[email protected]
Date
2012-12-04 01:12:00 -0800 (Tue, 04 Dec 2012)

Log Message

[EFL][WK2][AC] USE_GRAPHICS_SURFACE should be enabled only if Xcomposite and Xrender extensions are found.
https://bugs.webkit.org/show_bug.cgi?id=103710.

Patch by Kondapally Kalyan <[email protected]> on 2012-12-04
Reviewed by Kenneth Rohde Christiansen.

When using GLX back-end we are dependent on GLX support, Xcomposite and Xrender extensions.
In this case, GraphicsSurface usage depends on Xcomposite and Xrender extensions.
USE_GRAPHICS_SURFACE should be enabled only if Xcomposite and Xrender extensions are found.

.:

* Source/cmake/OptionsEfl.cmake:

Source/WebCore:

* platform/graphics/opengl/GLPlatformSurface.cpp:
(WebCore::GLPlatformSurface::createTransportSurface):
* platform/graphics/surfaces/glx/GLXSurface.cpp:
(WebCore):
* platform/graphics/surfaces/glx/GLXSurface.h:
(WebCore::SharedX11Resources::createConfig):
(SharedX11Resources):

Modified Paths

Diff

Modified: trunk/ChangeLog (136486 => 136487)


--- trunk/ChangeLog	2012-12-04 08:52:36 UTC (rev 136486)
+++ trunk/ChangeLog	2012-12-04 09:12:00 UTC (rev 136487)
@@ -1,3 +1,16 @@
+2012-12-04  Kondapally Kalyan  <[email protected]>
+
+        [EFL][WK2][AC] USE_GRAPHICS_SURFACE should be enabled only if Xcomposite and Xrender extensions are found.
+        https://bugs.webkit.org/show_bug.cgi?id=103710.
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        When using GLX back-end we are dependent on GLX support, Xcomposite and Xrender extensions.
+        In this case, GraphicsSurface usage depends on Xcomposite and Xrender extensions. 
+        USE_GRAPHICS_SURFACE should be enabled only if Xcomposite and Xrender extensions are found.
+
+        * Source/cmake/OptionsEfl.cmake:
+
 2012-12-03  Pierre Rossi  <[email protected]>
 
         [Qt] another stab at fixing the windows build 

Modified: trunk/Source/WebCore/ChangeLog (136486 => 136487)


--- trunk/Source/WebCore/ChangeLog	2012-12-04 08:52:36 UTC (rev 136486)
+++ trunk/Source/WebCore/ChangeLog	2012-12-04 09:12:00 UTC (rev 136487)
@@ -1,3 +1,22 @@
+2012-12-04  Kondapally Kalyan  <[email protected]>
+
+        [EFL][WK2][AC] USE_GRAPHICS_SURFACE should be enabled only if Xcomposite and Xrender extensions are found.
+        https://bugs.webkit.org/show_bug.cgi?id=103710.
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        When using GLX back-end we are dependent on GLX support, Xcomposite and Xrender extensions.
+        In this case, GraphicsSurface usage depends on Xcomposite and Xrender extensions. 
+        USE_GRAPHICS_SURFACE should be enabled only if Xcomposite and Xrender extensions are found.
+
+        * platform/graphics/opengl/GLPlatformSurface.cpp:
+        (WebCore::GLPlatformSurface::createTransportSurface):
+        * platform/graphics/surfaces/glx/GLXSurface.cpp:
+        (WebCore):
+        * platform/graphics/surfaces/glx/GLXSurface.h:
+        (WebCore::SharedX11Resources::createConfig):
+        (SharedX11Resources):
+
 2012-12-04  Michael Pruett  <[email protected]>
 
         [JSC] Generate visitChildren() for uncustomized EventTarget interfaces

Modified: trunk/Source/WebCore/platform/graphics/opengl/GLPlatformSurface.cpp (136486 => 136487)


--- trunk/Source/WebCore/platform/graphics/opengl/GLPlatformSurface.cpp	2012-12-04 08:52:36 UTC (rev 136486)
+++ trunk/Source/WebCore/platform/graphics/opengl/GLPlatformSurface.cpp	2012-12-04 09:12:00 UTC (rev 136487)
@@ -50,7 +50,7 @@
 
 PassOwnPtr<GLPlatformSurface> GLPlatformSurface::createTransportSurface()
 {
-#if HAVE(GLX)
+#if HAVE(GLX) && USE(GRAPHICS_SURFACE)
     OwnPtr<GLPlatformSurface> surface = adoptPtr(new GLXTransportSurface());
 
     if (surface->handle())

Modified: trunk/Source/WebCore/platform/graphics/surfaces/glx/GLXSurface.cpp (136486 => 136487)


--- trunk/Source/WebCore/platform/graphics/surfaces/glx/GLXSurface.cpp	2012-12-04 08:52:36 UTC (rev 136486)
+++ trunk/Source/WebCore/platform/graphics/surfaces/glx/GLXSurface.cpp	2012-12-04 09:12:00 UTC (rev 136487)
@@ -70,6 +70,7 @@
     return m_sharedResources->isXRenderExtensionSupported();
 }
 
+#if USE(GRAPHICS_SURFACE)
 GLXTransportSurface::GLXTransportSurface()
     : GLXSurface()
 {
@@ -154,6 +155,7 @@
     XDestroyWindow(display, m_drawable);
     m_drawable = 0;
 }
+#endif
 
 GLXPBuffer::GLXPBuffer()
     : GLXSurface()

Modified: trunk/Source/WebCore/platform/graphics/surfaces/glx/GLXSurface.h (136486 => 136487)


--- trunk/Source/WebCore/platform/graphics/surfaces/glx/GLXSurface.h	2012-12-04 08:52:36 UTC (rev 136486)
+++ trunk/Source/WebCore/platform/graphics/surfaces/glx/GLXSurface.h	2012-12-04 09:12:00 UTC (rev 136487)
@@ -29,9 +29,10 @@
 #if USE(ACCELERATED_COMPOSITING) && HAVE(GLX)
 
 #include "GLPlatformSurface.h"
-
+#if USE(GRAPHICS_SURFACE)
 #include <X11/extensions/Xcomposite.h>
 #include <X11/extensions/Xrender.h>
+#endif
 #include <wtf/Noncopyable.h>
 
 namespace WebCore {
@@ -105,7 +106,7 @@
             m_VisualInfo = glXGetVisualFromFBConfig(display(), temp[i]);
             if (!m_VisualInfo)
                 continue;
-
+#if USE(GRAPHICS_SURFACE)
             if (m_supportsXRenderExtension) {
                 XRenderPictFormat* format = XRenderFindVisualFormat(display(), m_VisualInfo->visual);
                 if (format && format->direct.alphaMask > 0) {
@@ -114,6 +115,9 @@
                     break;
                 }
             } else if (m_VisualInfo->depth == 32) {
+#else
+            if (m_VisualInfo->depth == 32) {
+#endif
                 selectedConfig = temp[i];
                 found = true;
             }
@@ -170,10 +174,10 @@
                 GLX_DOUBLEBUFFER,  True,
                 None
             };
-
+#if USE(GRAPHICS_SURFACE)
             int eventBasep, errorBasep;
             m_supportsXRenderExtension = XRenderQueryExtension(display(), &eventBasep, &errorBasep);
-
+#endif
             m_surfaceContextfbConfig = createConfig(attributes);
         }
 
@@ -251,6 +255,7 @@
     RefPtr<SharedX11Resources> m_sharedResources;
 };
 
+#if USE(GRAPHICS_SURFACE)
 class GLXTransportSurface : public GLXSurface {
     WTF_MAKE_NONCOPYABLE(GLXTransportSurface);
 
@@ -266,6 +271,7 @@
     void initialize();
     void freeResources();
 };
+#endif
 
 class GLXPBuffer : public GLXSurface {
     WTF_MAKE_NONCOPYABLE(GLXPBuffer);

Modified: trunk/Source/cmake/OptionsEfl.cmake (136486 => 136487)


--- trunk/Source/cmake/OptionsEfl.cmake	2012-12-04 08:52:36 UTC (rev 136486)
+++ trunk/Source/cmake/OptionsEfl.cmake	2012-12-04 09:12:00 UTC (rev 136487)
@@ -163,6 +163,9 @@
 
     IF (OPENGLX_FOUND)
         ADD_DEFINITIONS(-DHAVE_GLX)
+        IF (X11_Xcomposite_FOUND AND X11_Xrender_FOUND)
+           SET(USE_GRAPHICS_SURFACE 1)
+        ENDIF()
     ENDIF()
 ENDIF ()
 
@@ -190,8 +193,10 @@
 ENDIF()
 
 IF (ENABLE_WEBGL)
-  SET (ENABLE_WEBGL 1)
-  ADD_DEFINITIONS(-DWTF_USE_GRAPHICS_SURFACE=1)
+    SET(ENABLE_WEBGL 1)
+    IF (USE_GRAPHICS_SURFACE)
+        ADD_DEFINITIONS(-DWTF_USE_GRAPHICS_SURFACE=1)
+    ENDIF()
 ENDIF()
 
 IF (ENABLE_SPELLCHECK)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to