[EFL][WK2][AC] USE_GRAPHICS_SURFACE should be enabled only if Xcomposite and Xrender...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Dec 2012 09:12:00 +0000 (09:12 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Dec 2012 09:12:00 +0000 (09:12 +0000)
https://bugs.webkit.org/show_bug.cgi?id=103710.

Patch by Kondapally Kalyan <kalyan.kondapally@intel.com> 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):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136487 268f45cc-cd09-0410-ab3c-d52691b4dbfc

ChangeLog
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/opengl/GLPlatformSurface.cpp
Source/WebCore/platform/graphics/surfaces/glx/GLXSurface.cpp
Source/WebCore/platform/graphics/surfaces/glx/GLXSurface.h
Source/cmake/OptionsEfl.cmake

index 1a201d0..15a10d9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2012-12-04  Kondapally Kalyan  <kalyan.kondapally@intel.com>
+
+        [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  <pierre.rossi@digia.com>
 
         [Qt] another stab at fixing the windows build 
index a4cb755..dd585aa 100644 (file)
@@ -1,3 +1,22 @@
+2012-12-04  Kondapally Kalyan  <kalyan.kondapally@intel.com>
+
+        [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  <michael@68k.org>
 
         [JSC] Generate visitChildren() for uncustomized EventTarget interfaces
index 8944dc0..decb167 100644 (file)
@@ -50,7 +50,7 @@ PassOwnPtr<GLPlatformSurface> GLPlatformSurface::createOffscreenSurface()
 
 PassOwnPtr<GLPlatformSurface> GLPlatformSurface::createTransportSurface()
 {
-#if HAVE(GLX)
+#if HAVE(GLX) && USE(GRAPHICS_SURFACE)
     OwnPtr<GLPlatformSurface> surface = adoptPtr(new GLXTransportSurface());
 
     if (surface->handle())
index 38f2c0b..ccaf78a 100644 (file)
@@ -70,6 +70,7 @@ bool GLXSurface::isXRenderExtensionSupported()
     return m_sharedResources->isXRenderExtensionSupported();
 }
 
+#if USE(GRAPHICS_SURFACE)
 GLXTransportSurface::GLXTransportSurface()
     : GLXSurface()
 {
@@ -154,6 +155,7 @@ void GLXTransportSurface::freeResources()
     XDestroyWindow(display, m_drawable);
     m_drawable = 0;
 }
+#endif
 
 GLXPBuffer::GLXPBuffer()
     : GLXSurface()
index dd71397..eb027ef 100644 (file)
 #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 @@ public:
             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 @@ public:
                     break;
                 }
             } else if (m_VisualInfo->depth == 32) {
+#else
+            if (m_VisualInfo->depth == 32) {
+#endif
                 selectedConfig = temp[i];
                 found = true;
             }
@@ -170,10 +174,10 @@ public:
                 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 @@ private:
     RefPtr<SharedX11Resources> m_sharedResources;
 };
 
+#if USE(GRAPHICS_SURFACE)
 class GLXTransportSurface : public GLXSurface {
     WTF_MAKE_NONCOPYABLE(GLXTransportSurface);
 
@@ -266,6 +271,7 @@ private:
     void initialize();
     void freeResources();
 };
+#endif
 
 class GLXPBuffer : public GLXSurface {
     WTF_MAKE_NONCOPYABLE(GLXPBuffer);
index e7fd55a..3eb8eab 100644 (file)
@@ -163,6 +163,9 @@ IF (ENABLE_WEBGL OR WTF_USE_TILED_BACKING_STORE)
 
     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 @@ IF (WTF_USE_TILED_BACKING_STORE)
 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)