Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(224)

Unified Diff: gfx/gtk_preserve_window.cc

Issue 5275009: Defer window destruction until GPU finished drawing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« gfx/gtk_native_view_id_manager.cc ('K') | « gfx/gtk_native_view_id_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gfx/gtk_preserve_window.cc
diff --git a/gfx/gtk_preserve_window.cc b/gfx/gtk_preserve_window.cc
index c49bd31531880e1f1e13a1309701bb32c182c442..0e2b9db87fdded0ca02ff4b3969bc1daf12bb7bc 100644
--- a/gfx/gtk_preserve_window.cc
+++ b/gfx/gtk_preserve_window.cc
@@ -61,10 +61,13 @@ GtkWidget* gtk_preserve_window_new() {
static void gtk_preserve_window_destroy(GtkObject* object) {
GtkWidget* widget = reinterpret_cast<GtkWidget*>(object);
+ GtkPreserveWindowPrivate* priv = GTK_PRESERVE_WINDOW_GET_PRIVATE(widget);
if (widget->window) {
gdk_window_set_user_data(widget->window, NULL);
- gdk_window_destroy(widget->window);
+ // If the window is preserved, someone else must destroy it.
+ if (!priv->preserve_window)
+ gdk_window_destroy(widget->window);
widget->window = NULL;
}
« gfx/gtk_native_view_id_manager.cc ('K') | « gfx/gtk_native_view_id_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698