Bug 140935

Summary: [GTK] Resize the redirected XComposite window again after leaving accelerated compositing mode
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: berto, commit-queue, gustavo, mrobinson, svillar, zan
Priority: P2 Keywords: Gtk
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch svillar: review+

Carlos Garcia Campos
Reported 2015-01-27 06:32:37 PST
Since r178414 we don't resize the redirected XComposite window until we enter accelerated compositing mode, but after leaving it the redirected window keeps its size. We should resize to 1x1 again and free the XPixmap and cairo surface to save that memory.
Attachments
Patch (7.32 KB, patch)
2015-01-27 06:37 PST, Carlos Garcia Campos
svillar: review+
Carlos Garcia Campos
Comment 1 2015-01-27 06:37:39 PST
WebKit Commit Bot
Comment 2 2015-01-27 06:39:38 PST
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Sergio Villar Senin
Comment 3 2015-01-29 02:18:39 PST
Comment on attachment 245440 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=245440&action=review Awesome fix. > Source/WebKit2/UIProcess/gtk/RedirectedXCompositeWindow.cpp:219 > + XResizeWindow(m_display, m_window, std::max(1, size.width()), std::max(1, size.height())); Perhaps a comment explaining that 0x0 windows are not allowed by X... > Source/WebKit2/UIProcess/gtk/RedirectedXCompositeWindow.cpp:259 > + std::max(1, m_size.width()), std::max(1, m_size.height()))); Ditto. Orthogonal to this we should probably assert in ::surface() if we aren't in AC.
Carlos Garcia Campos
Comment 4 2015-01-29 23:29:23 PST
(In reply to comment #3) > Comment on attachment 245440 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=245440&action=review > > Awesome fix. Thanks. > > Source/WebKit2/UIProcess/gtk/RedirectedXCompositeWindow.cpp:219 > > + XResizeWindow(m_display, m_window, std::max(1, size.width()), std::max(1, size.height())); > > Perhaps a comment explaining that 0x0 windows are not allowed by X... Sure. > > Source/WebKit2/UIProcess/gtk/RedirectedXCompositeWindow.cpp:259 > > + std::max(1, m_size.width()), std::max(1, m_size.height()))); > > Ditto. I've realized we don't need this, since we are going to assert for empty sizes here. > Orthogonal to this we should probably assert in ::surface() if we aren't in > AC. Sure.
Carlos Garcia Campos
Comment 5 2015-01-29 23:38:18 PST
Note You need to log in before you can comment on or make changes to this bug.