RESOLVED FIXED 159463
[GTK] Avoid the redirected window resize when the view is realized in AC mode
https://bugs.webkit.org/show_bug.cgi?id=159463
Summary [GTK] Avoid the redirected window resize when the view is realized in AC mode
Carlos Garcia Campos
Reported 2016-07-06 05:07:23 PDT
We are always creating the redirected window at 1x1 and then resizing it if we are in AC mode. When the view is realized and AC mode is already enabled, which happens for example when AC mode is forced, or when the threaded compositor is enabled, we could just pass the initial size to the redirected window constructor to create the XWindow at the right size.
Attachments
Patch (9.98 KB, patch)
2016-07-06 05:13 PDT, Carlos Garcia Campos
mcatanzaro: review+
Carlos Garcia Campos
Comment 1 2016-07-06 05:13:07 PDT
WebKit Commit Bot
Comment 2 2016-07-06 05:14:59 PDT
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
WebKit Commit Bot
Comment 3 2016-07-06 05:15:07 PDT
Attachment 282881 [details] did not pass style-queue: ERROR: Source/WebKit2/UIProcess/gtk/RedirectedXCompositeWindow.h:48: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebKit2/UIProcess/gtk/RedirectedXCompositeWindow.h:56: Extra space before ( in function call [whitespace/parens] [4] Total errors found: 2 in 4 files If any of these errors are false positives, please file a bug against check-webkit-style.
Michael Catanzaro
Comment 4 2016-07-20 17:18:44 PDT
Comment on attachment 282881 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=282881&action=review > Source/WebKit2/ChangeLog:18 > + WebPageProxy the redirected window has access to the devide scale factor and view widget to get the parent device > Source/WebKit2/ChangeLog:26 > + (WebKit::RedirectedXCompositeWindow::~RedirectedXCompositeWindow): Deleted. prepare-ChangeLog bug > Source/WebKit2/UIProcess/gtk/RedirectedXCompositeWindow.cpp:140 > + return std::unique_ptr<RedirectedXCompositeWindow>(new RedirectedXCompositeWindow(webPage, initialSize, WTFMove(damageNotify))); Since you modified this line anyway, change it to use std::make_unique while you're at it, please. Using new outside of a create function is not OK anymore.
Carlos Garcia Campos
Comment 5 2016-07-21 00:04:51 PDT
(In reply to comment #4) > Comment on attachment 282881 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=282881&action=review > > > Source/WebKit2/ChangeLog:18 > > + WebPageProxy the redirected window has access to the devide scale factor and view widget to get the parent > > device > > > Source/WebKit2/ChangeLog:26 > > + (WebKit::RedirectedXCompositeWindow::~RedirectedXCompositeWindow): Deleted. > > prepare-ChangeLog bug > > > Source/WebKit2/UIProcess/gtk/RedirectedXCompositeWindow.cpp:140 > > + return std::unique_ptr<RedirectedXCompositeWindow>(new RedirectedXCompositeWindow(webPage, initialSize, WTFMove(damageNotify))); > > Since you modified this line anyway, change it to use std::make_unique while > you're at it, please. Using new outside of a create function is not OK > anymore. This is the create() function and the constructor is private.
Carlos Garcia Campos
Comment 6 2016-07-21 00:06:05 PDT
Note You need to log in before you can comment on or make changes to this bug.