DescriptionDefer window destruction until GPU finished drawing.
When a tab is closed, it takes a while before the GPU stops drawing into the window. Destroying the window before the GPU has flushed its drawing pipeline causes unsightly X11 errors. The custom widget class that we use for drawing
tab contents has a lock that is set when the GPU process is drawing to that widget. We use this lock to determine who should delete the associated window:
- if the lock is clear at the time of widget destruction, the widget destroys the window
- if the lock is set, the GPU process signals to the browser to destroy the widget (it has to be done in the browser process b/c the X window is wrapped in a GdkWindow that resides in the browser address space)
Most the management is done in GtkNativeViewManager. I've added another map from XID to GtkWidget to facilitate this management.
BUG=55158
TEST=Open two windows with http://webkit.org/blog-files/3d-transforms/poster-circle.html Close one of them. There should be no X11 errors generated.
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=67719
Patch Set 1 #
Total comments: 9
Patch Set 2 : Response to piman's review. #Patch Set 3 : Now with reference counting. #
Messages
Total messages: 7 (0 generated)
|