WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
patchv2
reviewfixes.patch (text/plain), 15.79 KB, created by
Kalyan
on 2012-12-19 14:56:19 PST
(
hide
)
Description:
patchv2
Filename:
MIME Type:
Creator:
Kalyan
Created:
2012-12-19 14:56:19 PST
Size:
15.79 KB
patch
obsolete
>diff --git ChangeLog ChangeLog >index 0e6a93e..814adb5 100644 >--- ChangeLog >+++ ChangeLog >@@ -1,3 +1,15 @@ >+2012-12-19 Kondapally Kalyan <kalyan.kondapally@intel.com> >+ >+ [EFL][WebGL][Wk2] Replace HAVE(GLX) checks with USE(GLX) >+ https://bugs.webkit.org/show_bug.cgi?id=105431 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ This patch changes the check Have(GLX) to Use(GLX). >+ This would enable us to choose our preferred GL backend during build time. >+ >+ * Source/cmake/OptionsEfl.cmake: >+ > 2012-12-18 Ming Xie <mxie@rim.com> > > [BlackBerry] Add -fno-exceptions to CXX_FLAGS >diff --git Source/WebCore/ChangeLog Source/WebCore/ChangeLog >index 4fafe78..3679a69 100644 >--- Source/WebCore/ChangeLog >+++ Source/WebCore/ChangeLog >@@ -1,3 +1,52 @@ >+2012-12-19 Kondapally Kalyan <kalyan.kondapally@intel.com> >+ >+ [EFL][WebGL][Wk2] Replace HAVE(GLX) checks with USE(GLX) >+ https://bugs.webkit.org/show_bug.cgi?id=105431 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ This patch changes the check Have(GLX) to Use(GLX). >+ This would enable us to choose our preferred GL backend during build time. >+ >+ * platform/graphics/opengl/GLDefs.h: >+ (WebCore): >+ * platform/graphics/opengl/GLPlatformContext.cpp: >+ (WebCore::GLPlatformContext::createContext): >+ (WebCore::GLPlatformContext::createOffScreenContext): >+ (WebCore::GLPlatformContext::createCurrentContextWrapper): >+ * platform/graphics/opengl/GLPlatformSurface.cpp: >+ (WebCore::GLPlatformSurface::createOffscreenSurface): >+ (WebCore::GLPlatformSurface::createTransportSurface): >+ (WebCore::GLPlatformSurface::GLPlatformSurface): >+ (WebCore::GLPlatformSurface::handle): >+ (WebCore): >+ (WebCore::GLPlatformSurface::drawable): >+ * platform/graphics/opengl/GLPlatformSurface.h: >+ (GLPlatformSurface): >+ * platform/graphics/surfaces/glx/GLXContext.cpp: >+ * platform/graphics/surfaces/glx/GLXContext.h: >+ * platform/graphics/surfaces/glx/GLXSurface.cpp: >+ (WebCore::GLXTransportSurface::GLXTransportSurface): >+ (WebCore::GLXTransportSurface::destroy): >+ (WebCore::GLXPBuffer::initialize): >+ (WebCore::GLXPBuffer::freeResources): >+ * platform/graphics/surfaces/glx/GLXSurface.h: >+ * platform/graphics/surfaces/glx/GLXWindowResources.h: >+ * platform/graphics/surfaces/glx/X11WindowResources.cpp: >+ (WebCore::X11OffScreenWindow::X11OffScreenWindow): >+ (WebCore::X11OffScreenWindow::setGeometry): >+ (WebCore::X11OffScreenWindow::createOffscreenWindow): >+ (WebCore::X11OffScreenWindow::destroyWindow): >+ * platform/graphics/surfaces/glx/X11WindowResources.h: >+ (WebCore): >+ (DummySharedResources): >+ (WebCore::DummySharedResources::create): >+ (WebCore::DummySharedResources::nativeDisplay): >+ (WebCore::DummySharedResources::pBufferContextConfig): >+ (WebCore::DummySharedResources::surfaceContextConfig): >+ (WebCore::DummySharedResources::DummySharedResources): >+ (WebCore::DummySharedResources::~DummySharedResources): >+ > 2012-12-19 Vsevolod Vlasov <vsevik@chromium.org> > > Web Inspector: Support removing several tabs from TabbedEditorContainer/TabbedPane at once. >diff --git Source/WebCore/platform/graphics/opengl/GLDefs.h Source/WebCore/platform/graphics/opengl/GLDefs.h >index df5bcdd..2dfb4c9 100644 >--- Source/WebCore/platform/graphics/opengl/GLDefs.h >+++ Source/WebCore/platform/graphics/opengl/GLDefs.h >@@ -38,22 +38,24 @@ > #include <GL/glext.h> > #endif > >-#if HAVE(GLX) >+#if USE(GLX) > #include <GL/glx.h> > #endif > > namespace WebCore { > >-#if HAVE(GLX) >+typedef uint32_t PlatformBufferHandle; >+ >+#if USE(GLX) > typedef GLXContext PlatformContext; > typedef Display* PlatformDisplay; > typedef GLXFBConfig PlatformSurfaceConfig; >-typedef GLXDrawable PlatformSurface; >+typedef GLXDrawable PlatformDrawable; > #else > typedef void* PlatformContext; > typedef void* PlatformDisplay; > typedef void* PlatformSurfaceConfig; >-typedef void* PlatformSurface; >+typedef void* PlatformDrawable; > #endif > > } >diff --git Source/WebCore/platform/graphics/opengl/GLPlatformContext.cpp Source/WebCore/platform/graphics/opengl/GLPlatformContext.cpp >index 24c8444..7621e2e 100644 >--- Source/WebCore/platform/graphics/opengl/GLPlatformContext.cpp >+++ Source/WebCore/platform/graphics/opengl/GLPlatformContext.cpp >@@ -28,7 +28,7 @@ > > #if USE(ACCELERATED_COMPOSITING) > >-#if HAVE(GLX) >+#if USE(GLX) > #include "GLXContext.h" > #endif > >@@ -45,7 +45,7 @@ PassOwnPtr<GLPlatformContext> GLPlatformContext::createContext(GraphicsContext3D > return nullptr; > > if (!glGetGraphicsResetStatusARB) { >-#if HAVE(GLX) >+#if USE(GLX) > glGetGraphicsResetStatusARB = reinterpret_cast<PFNGLGETGRAPHICSRESETSTATUSARBPROC>(glXGetProcAddressARB(reinterpret_cast<const GLubyte*>("glGetGraphicsResetStatusARB"))); > #endif > } >@@ -69,7 +69,7 @@ PassOwnPtr<GLPlatformContext> GLPlatformContext::createContext(GraphicsContext3D > > PassOwnPtr<GLPlatformContext> GLPlatformContext::createOffScreenContext() > { >-#if HAVE(GLX) >+#if USE(GLX) > OwnPtr<GLPlatformContext> glxContext = adoptPtr(new GLXOffScreenContext()); > return glxContext.release(); > #endif >@@ -79,7 +79,7 @@ PassOwnPtr<GLPlatformContext> GLPlatformContext::createOffScreenContext() > > PassOwnPtr<GLPlatformContext> GLPlatformContext::createCurrentContextWrapper() > { >-#if HAVE(GLX) >+#if USE(GLX) > OwnPtr<GLPlatformContext> glxContext = adoptPtr(new GLXCurrentContextWrapper()); > return glxContext.release(); > #endif >diff --git Source/WebCore/platform/graphics/opengl/GLPlatformSurface.cpp Source/WebCore/platform/graphics/opengl/GLPlatformSurface.cpp >index 160ca3f..8391e47 100644 >--- Source/WebCore/platform/graphics/opengl/GLPlatformSurface.cpp >+++ Source/WebCore/platform/graphics/opengl/GLPlatformSurface.cpp >@@ -38,10 +38,10 @@ namespace WebCore { > > PassOwnPtr<GLPlatformSurface> GLPlatformSurface::createOffscreenSurface() > { >-#if HAVE(GLX) >+#if USE(GLX) > OwnPtr<GLPlatformSurface> surface = adoptPtr(new GLXPBuffer()); > >- if (surface->handle()) >+ if (surface->handle() && surface->drawable()) > return surface.release(); > #endif > >@@ -50,7 +50,7 @@ PassOwnPtr<GLPlatformSurface> GLPlatformSurface::createOffscreenSurface() > > PassOwnPtr<GLPlatformSurface> GLPlatformSurface::createTransportSurface() > { >-#if HAVE(GLX) && USE(GRAPHICS_SURFACE) >+#if USE(GLX) && USE(GRAPHICS_SURFACE) > OwnPtr<GLPlatformSurface> surface = adoptPtr(new GLXTransportSurface()); > > if (surface->handle()) >@@ -65,6 +65,7 @@ GLPlatformSurface::GLPlatformSurface() > , m_fboId(0) > , m_sharedDisplay(0) > , m_drawable(0) >+ , m_bufferHandle(0) > { > } > >@@ -72,7 +73,12 @@ GLPlatformSurface::~GLPlatformSurface() > { > } > >-PlatformSurface GLPlatformSurface::handle() const >+PlatformBufferHandle GLPlatformSurface::handle() const >+{ >+ return m_bufferHandle; >+} >+ >+PlatformDrawable GLPlatformSurface::drawable() const > { > return m_drawable; > } >diff --git Source/WebCore/platform/graphics/opengl/GLPlatformSurface.h Source/WebCore/platform/graphics/opengl/GLPlatformSurface.h >index 463a6b2..e8db425 100644 >--- Source/WebCore/platform/graphics/opengl/GLPlatformSurface.h >+++ Source/WebCore/platform/graphics/opengl/GLPlatformSurface.h >@@ -52,8 +52,10 @@ public: > > const IntRect& geometry() const; > >- // Get the underlying platform specific surface handle. >- PlatformSurface handle() const; >+ // Get the underlying platform specific buffer handle. >+ PlatformBufferHandle handle() const; >+ >+ PlatformDrawable drawable() const; > > PlatformDisplay sharedDisplay() const; > >@@ -78,7 +80,8 @@ protected: > IntRect m_rect; > GLuint m_fboId; > PlatformDisplay m_sharedDisplay; >- PlatformSurface m_drawable; >+ PlatformDrawable m_drawable; >+ PlatformBufferHandle m_bufferHandle; > }; > > } >diff --git Source/WebCore/platform/graphics/surfaces/glx/GLXContext.cpp Source/WebCore/platform/graphics/surfaces/glx/GLXContext.cpp >index 295f06c..9956cb1 100644 >--- Source/WebCore/platform/graphics/surfaces/glx/GLXContext.cpp >+++ Source/WebCore/platform/graphics/surfaces/glx/GLXContext.cpp >@@ -26,7 +26,7 @@ > #include "config.h" > #include "GLXContext.h" > >-#if USE(ACCELERATED_COMPOSITING) && HAVE(GLX) >+#if USE(ACCELERATED_COMPOSITING) && USE(GLX) > > namespace WebCore { > >diff --git Source/WebCore/platform/graphics/surfaces/glx/GLXContext.h Source/WebCore/platform/graphics/surfaces/glx/GLXContext.h >index 7cff8d5..43a52dc 100644 >--- Source/WebCore/platform/graphics/surfaces/glx/GLXContext.h >+++ Source/WebCore/platform/graphics/surfaces/glx/GLXContext.h >@@ -26,7 +26,7 @@ > #ifndef GLXContext_h > #define GLXContext_h > >-#if USE(ACCELERATED_COMPOSITING) && HAVE(GLX) >+#if USE(ACCELERATED_COMPOSITING) && USE(GLX) > > #include "GLPlatformContext.h" > >diff --git Source/WebCore/platform/graphics/surfaces/glx/GLXSurface.cpp Source/WebCore/platform/graphics/surfaces/glx/GLXSurface.cpp >index 3bc3206..96a0ab9 100644 >--- Source/WebCore/platform/graphics/surfaces/glx/GLXSurface.cpp >+++ Source/WebCore/platform/graphics/surfaces/glx/GLXSurface.cpp >@@ -26,7 +26,7 @@ > #include "config.h" > #include "GLXSurface.h" > >-#if USE(ACCELERATED_COMPOSITING) && HAVE(GLX) >+#if USE(ACCELERATED_COMPOSITING) && USE(GLX) > > namespace WebCore { > >@@ -37,6 +37,7 @@ GLXTransportSurface::GLXTransportSurface() > : X11OffScreenWindow() > { > createOffscreenWindow(); >+ m_drawable = m_bufferHandle; > } > > GLXTransportSurface::~GLXTransportSurface() >@@ -66,6 +67,7 @@ void GLXTransportSurface::swapBuffers() > void GLXTransportSurface::destroy() > { > destroyWindow(); >+ m_bufferHandle = 0; > } > > #endif >@@ -88,6 +90,7 @@ void GLXPBuffer::initialize() > return; > > m_drawable = glXCreatePbuffer(display, config, pbufferAttributes); >+ m_bufferHandle = m_drawable; > } > > PlatformSurfaceConfig GLXPBuffer::configuration() >@@ -112,6 +115,7 @@ void GLXPBuffer::freeResources() > > glXDestroyPbuffer(display, m_drawable); > m_drawable = 0; >+ m_bufferHandle = 0; > } > > void GLXPBuffer::setGeometry(const IntRect& newRect) >diff --git Source/WebCore/platform/graphics/surfaces/glx/GLXSurface.h Source/WebCore/platform/graphics/surfaces/glx/GLXSurface.h >index cf01a45..4e87685 100644 >--- Source/WebCore/platform/graphics/surfaces/glx/GLXSurface.h >+++ Source/WebCore/platform/graphics/surfaces/glx/GLXSurface.h >@@ -26,7 +26,7 @@ > #ifndef GLXSurface_h > #define GLXSurface_h > >-#if USE(ACCELERATED_COMPOSITING) && HAVE(GLX) >+#if USE(ACCELERATED_COMPOSITING) && USE(GLX) > > #include "GLXWindowResources.h" > >diff --git Source/WebCore/platform/graphics/surfaces/glx/GLXWindowResources.h Source/WebCore/platform/graphics/surfaces/glx/GLXWindowResources.h >index b8054f2bc..c173557 100644 >--- Source/WebCore/platform/graphics/surfaces/glx/GLXWindowResources.h >+++ Source/WebCore/platform/graphics/surfaces/glx/GLXWindowResources.h >@@ -28,7 +28,7 @@ > > #include "X11WindowResources.h" > >-#if USE(ACCELERATED_COMPOSITING) && HAVE(GLX) >+#if USE(ACCELERATED_COMPOSITING) && USE(GLX) > > namespace WebCore { > >diff --git Source/WebCore/platform/graphics/surfaces/glx/X11WindowResources.cpp Source/WebCore/platform/graphics/surfaces/glx/X11WindowResources.cpp >index 755a488..60293e7 100644 >--- Source/WebCore/platform/graphics/surfaces/glx/X11WindowResources.cpp >+++ Source/WebCore/platform/graphics/surfaces/glx/X11WindowResources.cpp >@@ -36,8 +36,13 @@ PlatformSharedResources* SharedX11Resources::m_staticSharedResource = 0; > > X11OffScreenWindow::X11OffScreenWindow() > : GLPlatformSurface() >+ , m_sharedResources(0) > { > m_sharedResources = PlatformSharedResources::create(); >+ >+ if (!m_sharedResources) >+ return; >+ > m_sharedDisplay = m_sharedResources->nativeDisplay(); > } > >@@ -48,16 +53,19 @@ X11OffScreenWindow::~X11OffScreenWindow() > void X11OffScreenWindow::setGeometry(const IntRect& newRect) > { > GLPlatformSurface::setGeometry(newRect); >- XResizeWindow(m_sharedResources->x11Display(), m_drawable, newRect.width(), newRect.height()); >+ XResizeWindow(m_sharedResources->x11Display(), m_bufferHandle, newRect.width(), newRect.height()); > } > > void X11OffScreenWindow::createOffscreenWindow() > { >+ if (!m_sharedResources) >+ return; >+ > Display* display = m_sharedResources->x11Display(); > if (!display) > return; > >- GLXFBConfig config = m_sharedResources->surfaceContextConfig(); >+ PlatformSurfaceConfig config = m_sharedResources->surfaceContextConfig(); > > if (!config) { > LOG_ERROR("Failed to retrieve a valid configiration."); >@@ -80,33 +88,33 @@ void X11OffScreenWindow::createOffscreenWindow() > attribute.background_pixel = WhitePixel(display, 0); > attribute.border_pixel = BlackPixel(display, 0); > attribute.colormap = cmap; >- m_drawable = XCreateWindow(display, xWindow, 0, 0, 1, 1, 0, visInfo->depth, InputOutput, visInfo->visual, CWBackPixel | CWBorderPixel | CWColormap, &attribute); >+ m_bufferHandle = XCreateWindow(display, xWindow, 0, 0, 1, 1, 0, visInfo->depth, InputOutput, visInfo->visual, CWBackPixel | CWBorderPixel | CWColormap, &attribute); > >- if (!m_drawable) { >+ if (!m_bufferHandle) { > LOG_ERROR("Failed to create offscreen window"); > return; > } > >- XSetWindowBackgroundPixmap(display, m_drawable, 0); >- XCompositeRedirectWindow(display, m_drawable, CompositeRedirectManual); >+ XSetWindowBackgroundPixmap(display, m_bufferHandle, 0); >+ XCompositeRedirectWindow(display, m_bufferHandle, CompositeRedirectManual); > > if (m_sharedResources->isXRenderExtensionSupported()) >- XMapWindow(display, m_drawable); >+ XMapWindow(display, m_bufferHandle); > > } > > void X11OffScreenWindow::destroyWindow() > { >- if (!m_drawable) >+ if (!m_bufferHandle) > return; > > GLPlatformSurface::destroy(); >- Display* display = sharedDisplay(); >+ Display* display = m_sharedResources->x11Display(); > if (!display) > return; > >- XDestroyWindow(display, m_drawable); >- m_drawable = 0; >+ XDestroyWindow(display, m_bufferHandle); >+ m_bufferHandle = 0; > } > > } >diff --git Source/WebCore/platform/graphics/surfaces/glx/X11WindowResources.h Source/WebCore/platform/graphics/surfaces/glx/X11WindowResources.h >index b25b2ac..9e5e8cf 100644 >--- Source/WebCore/platform/graphics/surfaces/glx/X11WindowResources.h >+++ Source/WebCore/platform/graphics/surfaces/glx/X11WindowResources.h >@@ -40,8 +40,13 @@ > > namespace WebCore { > >+#if USE(GLX) > class SharedGLXResources; > typedef SharedGLXResources PlatformSharedResources; >+#else >+class DummySharedResources; >+typedef DummySharedResources PlatformSharedResources; >+#endif > > class SharedX11Resources : public WTF::RefCountedBase { > WTF_MAKE_NONCOPYABLE(SharedX11Resources); >@@ -147,6 +152,42 @@ protected: > XVisualInfo* m_VisualInfo; > }; > >+// Dummy Implementation to avoid ifdefs >+class DummySharedResources : public SharedX11Resources { >+ WTF_MAKE_NONCOPYABLE(DummySharedResources); >+ >+public: >+ static PassRefPtr<DummySharedResources> create() >+ { >+ return 0; >+ } >+ >+ PlatformDisplay nativeDisplay() >+ { >+ return 0; >+ } >+ >+ virtual PlatformSurfaceConfig pBufferContextConfig() >+ { >+ return 0; >+ } >+ >+ virtual PlatformSurfaceConfig surfaceContextConfig() >+ { >+ return 0; >+ } >+ >+private: >+ DummySharedResources() >+ : SharedX11Resources() >+ { >+ } >+ >+ virtual ~DummySharedResources() >+ { >+ } >+}; >+ > class X11OffScreenWindow : public GLPlatformSurface { > WTF_MAKE_NONCOPYABLE(X11OffScreenWindow); > >diff --git Source/cmake/OptionsEfl.cmake Source/cmake/OptionsEfl.cmake >index 536d193..70f98dd 100644 >--- Source/cmake/OptionsEfl.cmake >+++ Source/cmake/OptionsEfl.cmake >@@ -168,6 +168,8 @@ if (ENABLE_WEBGL OR WTF_USE_TILED_BACKING_STORE) > > if (OPENGLX_FOUND) > add_definitions(-DHAVE_GLX) >+ add_definitions(-DWTF_USE_GLX=1) >+ > if (X11_Xcomposite_FOUND AND X11_Xrender_FOUND) > set(USE_GRAPHICS_SURFACE 1) > endif ()
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 105431
:
180208
|
180231
|
180388
|
180390