Bug 140354 - [GTK] Do not schedule a redraw for the redirected XComposite window when not in accelerated compositing mode
Summary: [GTK] Do not schedule a redraw for the redirected XComposite window when not ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on: 140352
Blocks:
  Show dependency treegraph
 
Reported: 2015-01-12 03:05 PST by Carlos Garcia Campos
Modified: 2015-01-14 01:03 PST (History)
3 users (show)

See Also:


Attachments
Patch (3.68 KB, patch)
2015-01-12 03:08 PST, Carlos Garcia Campos
mrobinson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2015-01-12 03:05:31 PST
The RedirectedXCompositeWindow uses XDamage to be notified when the XWindow has been modified. Since the redirected window is created unconditionally we always receive a XDamage notify when the window is mapped, and we schedule a redraw in the web view even when the web view is not in accelerated compositing mode.
Comment 1 Carlos Garcia Campos 2015-01-12 03:08:22 PST
Created attachment 244439 [details]
Patch

This applies on top of patch attached to bug #140352
Comment 2 Martin Robinson 2015-01-12 09:08:47 PST
Comment on attachment 244439 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=244439&action=review

> Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp:326
> +                DrawingAreaProxyImpl* drawingArea = static_cast<DrawingAreaProxyImpl*>(webView->priv->pageProxy->drawingArea());

Loosk like you could use priv here?
Comment 3 Carlos Garcia Campos 2015-01-12 10:32:14 PST
Comment on attachment 244439 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=244439&action=review

Thanks for the review!

>> Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp:326
>> +                DrawingAreaProxyImpl* drawingArea = static_cast<DrawingAreaProxyImpl*>(webView->priv->pageProxy->drawingArea());
> 
> Loosk like you could use priv here?

No, priv is not captured.
Comment 4 Martin Robinson 2015-01-12 10:38:27 PST
Comment on attachment 244439 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=244439&action=review

>>> Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp:326
>>> +                DrawingAreaProxyImpl* drawingArea = static_cast<DrawingAreaProxyImpl*>(webView->priv->pageProxy->drawingArea());
>> 
>> Loosk like you could use priv here?
> 
> No, priv is not captured.

Could you could capture priv here instead?
Comment 5 Martin Robinson 2015-01-12 10:38:56 PST
(In reply to comment #4)
> Comment on attachment 244439 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=244439&action=review
> 
> >>> Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp:326
> >>> +                DrawingAreaProxyImpl* drawingArea = static_cast<DrawingAreaProxyImpl*>(webView->priv->pageProxy->drawingArea());
> >> 
> >> Loosk like you could use priv here?
> > 
> > No, priv is not captured.
> 
> Could you could capture priv here instead?

Or, I suppose capture both priv and webView.
Comment 6 Carlos Garcia Campos 2015-01-12 10:45:21 PST
(In reply to comment #5)
> (In reply to comment #4)
> > Comment on attachment 244439 [details]
> > Patch
> > 
> > View in context:
> > https://bugs.webkit.org/attachment.cgi?id=244439&action=review
> > 
> > >>> Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp:326
> > >>> +                DrawingAreaProxyImpl* drawingArea = static_cast<DrawingAreaProxyImpl*>(webView->priv->pageProxy->drawingArea());
> > >> 
> > >> Loosk like you could use priv here?
> > > 
> > > No, priv is not captured.
> > 
> > Could you could capture priv here instead?
> 
> Or, I suppose capture both priv and webView.

I need the webview to call gtk_widget_queue_draw. I could capture the priv, but I don't think it's worth it, since priv is already part of web view (so capturing a single pointer is enough), and the only benefit would be saving 7 characters inside the lambda to add 9 more to the capture [].
Comment 7 Carlos Garcia Campos 2015-01-14 01:03:44 PST
Committed r178415: <http://trac.webkit.org/changeset/178415>