| Differences between
and this patch
- Source/WebCore/ChangeLog +23 lines
Lines 1-3 Source/WebCore/ChangeLog_sec1
1
2013-02-28  Kondapally Kalyan  <kalyan.kondapally@intel.com>
2
3
        [EFL][WebGL] Add proper checks to enable GraphicsSurface usage on EGL without XCompositeWindow.
4
        https://bugs.webkit.org/show_bug.cgi?id=108034
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        Covered by existing WebGL tests.
9
10
        Currently, we set GRAPHICS_SURFACE to true if support for XCompositeWindow
11
        is identified during compile time. This is ok, when using GLX. We might not
12
        have support for XCompositeWindow when using EGL and GLES2.0. This patch
13
        makes changes so that GRAPHICS_SURFACE is always enabled with EGL and adds
14
        GLX guard to the parts of code dependent on XCompositeWindow support.
15
16
        * platform/graphics/opengl/GLPlatformSurface.cpp:
17
        * platform/graphics/surfaces/glx/GLXConfigSelector.h:
18
        (WebCore::GLXConfigSelector::findMatchingConfig):
19
        * platform/graphics/surfaces/glx/X11Helper.cpp:
20
        (WebCore::X11Helper::createOffScreenWindow):
21
        (WebCore::X11Helper::isXRenderExtensionSupported):
22
        * platform/graphics/surfaces/glx/X11Helper.h:
23
1
2013-02-28  Conrad Shultz  <conrad_shultz@apple.com>
24
2013-02-28  Conrad Shultz  <conrad_shultz@apple.com>
2
25
3
        Need API to control page underlay color
26
        Need API to control page underlay color
- Source/WebCore/platform/graphics/opengl/GLPlatformSurface.cpp -1 / +1 lines
Lines 28-34 Source/WebCore/platform/graphics/opengl/GLPlatformSurface.cpp_sec1
28
28
29
#if USE(ACCELERATED_COMPOSITING)
29
#if USE(ACCELERATED_COMPOSITING)
30
30
31
#if HAVE(GLX)
31
#if USE(GLX)
32
#include "GLXSurface.h"
32
#include "GLXSurface.h"
33
#endif
33
#endif
34
34
- Source/WebCore/platform/graphics/surfaces/glx/GLXConfigSelector.h -1 / +2 lines
Lines 151-157 private: Source/WebCore/platform/graphics/surfaces/glx/GLXConfigSelector.h_sec1
151
            if (!scopedVisualInfo.get())
151
            if (!scopedVisualInfo.get())
152
                continue;
152
                continue;
153
153
154
#if USE(GRAPHICS_SURFACE)
154
#if USE(GRAPHICS_SURFACE) && USE(GLX)
155
            if (X11Helper::isXRenderExtensionSupported()) {
155
            if (X11Helper::isXRenderExtensionSupported()) {
156
                XRenderPictFormat* format = XRenderFindVisualFormat(X11Helper::nativeDisplay(), scopedVisualInfo->visual);
156
                XRenderPictFormat* format = XRenderFindVisualFormat(X11Helper::nativeDisplay(), scopedVisualInfo->visual);
157
157
Lines 208-210 private: Source/WebCore/platform/graphics/surfaces/glx/GLXConfigSelector.h_sec2
208
#endif
208
#endif
209
209
210
#endif
210
#endif
211
- Source/WebCore/platform/graphics/surfaces/glx/X11Helper.cpp -2 / +3 lines
Lines 183-189 void X11Helper::destroyPixmap(const uint32_t pixmapId) Source/WebCore/platform/graphics/surfaces/glx/X11Helper.cpp_sec1
183
183
184
void X11Helper::createOffScreenWindow(uint32_t* handleId, const XVisualInfo& visInfo, const IntSize& size)
184
void X11Helper::createOffScreenWindow(uint32_t* handleId, const XVisualInfo& visInfo, const IntSize& size)
185
{
185
{
186
#if USE(GRAPHICS_SURFACE)
186
#if USE(GRAPHICS_SURFACE) && USE(GLX)
187
    Display* display = nativeDisplay();
187
    Display* display = nativeDisplay();
188
    if (!display)
188
    if (!display)
189
        return;
189
        return;
Lines 295-301 bool X11Helper::isXRenderExtensionSupported() Source/WebCore/platform/graphics/surfaces/glx/X11Helper.cpp_sec2
295
295
296
    if (!queryDone) {
296
    if (!queryDone) {
297
        queryDone = true;
297
        queryDone = true;
298
#if USE(GRAPHICS_SURFACE)
298
#if USE(GRAPHICS_SURFACE) && USE(GLX)
299
        Display* display = nativeDisplay();
299
        Display* display = nativeDisplay();
300
300
301
        if (display) {
301
        if (display) {
Lines 322-324 Window X11Helper::offscreenRootWindow() Source/WebCore/platform/graphics/surfaces/glx/X11Helper.cpp_sec3
322
}
322
}
323
323
324
}
324
}
325
- Source/WebCore/platform/graphics/surfaces/glx/X11Helper.h -4 / +5 lines
Lines 29-45 Source/WebCore/platform/graphics/surfaces/glx/X11Helper.h_sec1
29
#include "IntRect.h"
29
#include "IntRect.h"
30
#include "OwnPtrX11.h"
30
#include "OwnPtrX11.h"
31
31
32
#if USE(GRAPHICS_SURFACE)
33
34
#if USE(EGL)
32
#if USE(EGL)
35
#include <opengl/GLDefs.h>
33
#include <opengl/GLDefs.h>
36
#endif
34
#endif
37
35
36
#if USE(GRAPHICS_SURFACE) && USE(GLX)
38
#include <X11/extensions/Xcomposite.h>
37
#include <X11/extensions/Xcomposite.h>
39
#include <X11/extensions/Xrender.h>
38
#include <X11/extensions/Xrender.h>
40
#endif
39
#else
41
42
#include <X11/Xlib.h>
40
#include <X11/Xlib.h>
41
#include <X11/Xutil.h>
42
#endif
43
43
44
namespace WebCore {
44
namespace WebCore {
45
45
Lines 73-75 private: Source/WebCore/platform/graphics/surfaces/glx/X11Helper.h_sec2
73
}
73
}
74
74
75
#endif
75
#endif
76
- Source/cmake/OptionsEfl.cmake -4 / +8 lines
Lines 186-191 if (ENABLE_WEBGL OR WTF_USE_TILED_BACKING_STORE) Source/cmake/OptionsEfl.cmake_sec1
186
186
187
    if (EGL_FOUND)
187
    if (EGL_FOUND)
188
        set(WTF_USE_EGL 1)
188
        set(WTF_USE_EGL 1)
189
        set(USE_GRAPHICS_SURFACE 1)
189
        add_definitions(-DWTF_USE_EGL=1)
190
        add_definitions(-DWTF_USE_EGL=1)
190
        option(ENABLE_GLES2 ON)
191
        option(ENABLE_GLES2 ON)
191
192
Lines 199-209 if (ENABLE_WEBGL OR WTF_USE_TILED_BACKING_STORE) Source/cmake/OptionsEfl.cmake_sec2
199
        endif ()
200
        endif ()
200
     elseif (OPENGLX_FOUND)
201
     elseif (OPENGLX_FOUND)
201
         add_definitions(-DWTF_USE_GLX=1)
202
         add_definitions(-DWTF_USE_GLX=1)
202
    endif ()
203
203
204
     if ((OPENGLX_FOUND OR EGL_FOUND) AND X11_Xcomposite_FOUND AND X11_Xrender_FOUND)
204
         if (X11_Xcomposite_FOUND AND X11_Xrender_FOUND)
205
         set(USE_GRAPHICS_SURFACE 1)
205
             set(USE_GRAPHICS_SURFACE 1)
206
     endif ()
206
         elseif (ENABLE_WEBGL)
207
             # FIXME: Add support for NOT X11_Xcomposite for GLX
208
             message(FATAL_ERROR "To use WebGL with GLX support requires X11_Xcomposite.")
209
         endif ()
210
    endif ()
207
endif ()
211
endif ()
208
212
209
if (ENABLE_INSPECTOR)
213
if (ENABLE_INSPECTOR)

Return to Bug 108034