diff options
author | backer@chromium.org <backer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-03 20:12:26 +0000 |
---|---|---|
committer | backer@chromium.org <backer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-03 20:12:26 +0000 |
commit | 44b871fde45eacd5e843740a6c74e7cf6948da23 (patch) | |
tree | 12ac3778146f7675bae75fd3ec36070676358215 /ui | |
parent | f815828e98b8449e52963f5b50e95d9cd6ed84c0 (diff) | |
download | chromium_src-44b871fde45eacd5e843740a6c74e7cf6948da23.zip chromium_src-44b871fde45eacd5e843740a6c74e7cf6948da23.tar.gz chromium_src-44b871fde45eacd5e843740a6c74e7cf6948da23.tar.bz2 |
To prevent damage to the back-buffer, it's only necessary to defer resize.
In particular, we can move the window right away.
BUG=74805
TEST=By hand on Linux with software rendering, WebGL, and 3D CSS.
Review URL: http://codereview.chromium.org/6613020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76789 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r-- | ui/gfx/gtk_preserve_window.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ui/gfx/gtk_preserve_window.cc b/ui/gfx/gtk_preserve_window.cc index 973af1f..174e23d 100644 --- a/ui/gfx/gtk_preserve_window.cc +++ b/ui/gfx/gtk_preserve_window.cc @@ -182,9 +182,11 @@ void gtk_preserve_window_size_allocate(GtkWidget* widget, GtkPreserveWindowPrivate* priv = GTK_PRESERVE_WINDOW_GET_PRIVATE(widget); if (priv->delegate_resize) { - // Just update the state. Someone else will gdk_window_resize the - // associated GdkWindow. widget->allocation = *allocation; + // Only update the position. Someone else will call gdk_window_resize. + if (GTK_WIDGET_REALIZED(widget)) { + gdk_window_move(widget->window, allocation->x, allocation->y); + } } else { GTK_WIDGET_CLASS(gtk_preserve_window_parent_class)->size_allocate( widget, allocation); |