Changeset 136207 in webkit
- Timestamp:
- Nov 29, 2012, 10:41:40 PM (14 years ago)
- Location:
- trunk/Source
- Files:
-
- 5 edited
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/platform/gtk/RedirectedXCompositeWindow.cpp (modified) (3 diffs)
-
WebCore/platform/gtk/RedirectedXCompositeWindow.h (modified) (3 diffs)
-
WebKit2/ChangeLog (modified) (1 diff)
-
WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r136205 r136207 1 2012-11-29 Martin Robinson <mrobinson@igalia.com> 2 3 [GTK] [WebKit2] WebKitWebViewBase creates a GL context for the redirected XComposite window crashing WebKit in Xvfb 4 https://bugs.webkit.org/show_bug.cgi?id=103476 5 6 Reviewed by Alejandro G. Castro. 7 8 Allow creation of RedirectedXCompositeWindow in a mode which does not have a backing 9 GLContext. For WebKit2 the GLContext is always in the WebProcess. Creating the GLContext 10 in both processes can cause crashes when library is run in Xvfb. 11 12 No new tests. This fixes a crash running tests on some systems. 13 14 * platform/gtk/RedirectedXCompositeWindow.cpp: 15 (WebCore::RedirectedXCompositeWindow::RedirectedXCompositeWindow): 16 (WebCore::RedirectedXCompositeWindow::resize): Do not create the GLContext when 17 in the new no-GLContext mode. 18 (WebCore::RedirectedXCompositeWindow::context): ASSERT that we are not in 19 no-GLContext mode. 20 1 21 2012-11-29 Keishi Hattori <keishi@webkit.org> 2 22 -
trunk/Source/WebCore/platform/gtk/RedirectedXCompositeWindow.cpp
r132823 r136207 93 93 } 94 94 95 PassOwnPtr<RedirectedXCompositeWindow> RedirectedXCompositeWindow::create(const IntSize& size )96 { 97 return supportsXDamageAndXComposite() ? adoptPtr(new RedirectedXCompositeWindow(size )) : nullptr;98 } 99 100 RedirectedXCompositeWindow::RedirectedXCompositeWindow(const IntSize& size )95 PassOwnPtr<RedirectedXCompositeWindow> RedirectedXCompositeWindow::create(const IntSize& size, GLContextNeeded needsContext) 96 { 97 return supportsXDamageAndXComposite() ? adoptPtr(new RedirectedXCompositeWindow(size, needsContext)) : nullptr; 98 } 99 100 RedirectedXCompositeWindow::RedirectedXCompositeWindow(const IntSize& size, GLContextNeeded needsContext) 101 101 : m_size(size) 102 102 , m_window(0) 103 103 , m_parentWindow(0) 104 104 , m_pixmap(0) 105 , m_needsContext(needsContext) 105 106 , m_surface(0) 106 107 , m_needsNewPixmapAfterResize(false) … … 177 178 178 179 XFlush(display); 179 context()->waitNative(); 180 181 // This swap is based on code in Chromium. It tries to work-around a bug in the Intel drivers 182 // where a swap is necessary to ensure the front and back buffers are properly resized. 183 if (context() == GLContext::getCurrent()) 184 context()->swapBuffers(); 180 181 if (m_needsContext == CreateGLContext) { 182 context()->waitNative(); 183 // This swap is based on code in Chromium. It tries to work-around a bug in the Intel drivers 184 // where a swap is necessary to ensure the front and back buffers are properly resized. 185 if (context() == GLContext::getCurrent()) 186 context()->swapBuffers(); 187 } 185 188 186 189 m_size = size; … … 190 193 GLContext* RedirectedXCompositeWindow::context() 191 194 { 195 ASSERT(m_needsContext); 196 192 197 if (m_context) 193 198 return m_context.get(); -
trunk/Source/WebCore/platform/gtk/RedirectedXCompositeWindow.h
r130525 r136207 43 43 class RedirectedXCompositeWindow { 44 44 public: 45 static PassOwnPtr<RedirectedXCompositeWindow> create(const IntSize&); 45 enum GLContextNeeded { CreateGLContext, DoNotCreateGLContext }; 46 static PassOwnPtr<RedirectedXCompositeWindow> create(const IntSize&, GLContextNeeded = CreateGLContext); 46 47 virtual ~RedirectedXCompositeWindow(); 47 48 const IntSize& size() { return m_size; } … … 60 61 61 62 private: 62 RedirectedXCompositeWindow(const IntSize& );63 RedirectedXCompositeWindow(const IntSize&, GLContextNeeded); 63 64 void cleanupPixmapAndPixmapSurface(); 64 65 … … 67 68 Window m_parentWindow; 68 69 Pixmap m_pixmap; 70 GLContextNeeded m_needsContext; 69 71 OwnPtr<GLContext> m_context; 70 72 RefPtr<cairo_surface_t> m_surface; -
trunk/Source/WebKit2/ChangeLog
r136204 r136207 1 2012-11-29 Martin Robinson <mrobinson@igalia.com> 2 3 [GTK] [WebKit2] WebKitWebViewBase creates a GL context for the redirected XComposite window crashing WebKit in Xvfb 4 https://bugs.webkit.org/show_bug.cgi?id=103476 5 6 Reviewed by Alejandro G. Castro. 7 8 Create the RedirectedXCompositeWindow with an argument specifying that it 9 should never have a GLContext backing it. 10 11 * UIProcess/API/gtk/WebKitWebViewBase.cpp: 12 (_WebKitWebViewBasePrivate::_WebKitWebViewBasePrivate): 13 1 14 2012-11-29 Rafael Weinstein <rafaelw@chromium.org> 2 15 -
trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp
r136152 r136207 84 84 : imContext(adoptGRef(gtk_im_multicontext_new())) 85 85 #if USE(TEXTURE_MAPPER_GL) 86 , redirectedWindow(RedirectedXCompositeWindow::create(IntSize(1, 1) ))86 , redirectedWindow(RedirectedXCompositeWindow::create(IntSize(1, 1), RedirectedXCompositeWindow::DoNotCreateGLContext)) 87 87 #endif 88 88 {
Note:
See TracChangeset
for help on using the changeset viewer.