| Differences between
and this patch
- Source/WebCore/ChangeLog +23 lines
Lines 1-3 Source/WebCore/ChangeLog_sec1
1
2013-03-03  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 Laszlo Gombos.
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-03-01  Kentaro Hara  <haraken@chromium.org>
24
2013-03-01  Kentaro Hara  <haraken@chromium.org>
2
25
3
        [V8] HTMLDocument.all should have [Replaceable]
26
        [V8] HTMLDocument.all should have [Replaceable]
- 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 -18 / +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 241-262 void X11Helper::createOffScreenWindow(uint32_t* handleId, const EGLint id, bool Source/WebCore/platform/graphics/surfaces/glx/X11Helper.cpp_sec2
241
    if (matchingVisuals) {
241
    if (matchingVisuals) {
242
        for (int i = 0; i< matchingCount; i++) {
242
        for (int i = 0; i< matchingCount; i++) {
243
            XVisualInfo* temp = &matchingVisuals[i];
243
            XVisualInfo* temp = &matchingVisuals[i];
244
245
            if (isXRenderExtensionSupported()) {
246
                XRenderPictFormat* format = XRenderFindVisualFormat(nativeDisplay(), temp->visual);
247
248
                if (format) {
249
                    if (supportsAlpha) {
250
                        if (temp->depth == 32 && format->direct.alphaMask > 0)
251
                            foundVisual = temp;
252
                    } else if (!format->direct.alphaMask)
253
                        foundVisual = temp;
254
                }
255
256
                if (foundVisual)
257
                    break;
258
            }
259
260
            int matchingdepth = supportsAlpha ? 32 : 24;
244
            int matchingdepth = supportsAlpha ? 32 : 24;
261
245
262
            if (temp->depth == matchingdepth) {
246
            if (temp->depth == matchingdepth) {
Lines 295-301 bool X11Helper::isXRenderExtensionSupported() Source/WebCore/platform/graphics/surfaces/glx/X11Helper.cpp_sec3
295
279
296
    if (!queryDone) {
280
    if (!queryDone) {
297
        queryDone = true;
281
        queryDone = true;
298
#if USE(GRAPHICS_SURFACE)
282
#if USE(GRAPHICS_SURFACE) && USE(GLX)
299
        Display* display = nativeDisplay();
283
        Display* display = nativeDisplay();
300
284
301
        if (display) {
285
        if (display) {
Lines 322-324 Window X11Helper::offscreenRootWindow() Source/WebCore/platform/graphics/surfaces/glx/X11Helper.cpp_sec4
322
}
306
}
323
307
324
}
308
}
309
- 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