diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-21 22:17:19 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-21 22:17:19 +0000 |
commit | 3593695e937262f1ec11dbace007dd4d771e7756 (patch) | |
tree | 6387f13d05c0a1cb48fea6287dcc51632f63f1cf /views/controls/native/native_view_host_gtk.cc | |
parent | d9bdcbf9df5a5f03190084192559a9572d0222b8 (diff) | |
download | chromium_src-3593695e937262f1ec11dbace007dd4d771e7756.zip chromium_src-3593695e937262f1ec11dbace007dd4d771e7756.tar.gz chromium_src-3593695e937262f1ec11dbace007dd4d771e7756.tar.bz2 |
Add EnableDoubleBuffer to WidgetGtk
This will be used to eliminate flicker issue in notification panel (and probably in settings when settings is moved to views).
NativeViewHostGtk was creating Fixed with gdk window everytime it is repositioned with clipping.
This was causing a lot of creation/deletion of fixed when moving a native control in scroll bar.
BUG=23445
TEST=none
Review URL: http://codereview.chromium.org/1725005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45252 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls/native/native_view_host_gtk.cc')
-rw-r--r-- | views/controls/native/native_view_host_gtk.cc | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/views/controls/native/native_view_host_gtk.cc b/views/controls/native/native_view_host_gtk.cc index 533683e..36aa82b 100644 --- a/views/controls/native/native_view_host_gtk.cc +++ b/views/controls/native/native_view_host_gtk.cc @@ -188,13 +188,15 @@ void NativeViewHostGtk::RemovedFromWidget() { void NativeViewHostGtk::InstallClip(int x, int y, int w, int h) { DCHECK(w > 0 && h > 0); installed_clip_bounds_.SetRect(x, y, w, h); - installed_clip_ = true; - - // We only re-create the fixed with a window when a cliprect is installed. - // Because the presence of a X Window will prevent transparency from working - // properly, we only want it to be active for the duration of a clip - // (typically during animations and scrolling.) - CreateFixed(true); + if (!installed_clip_) { + installed_clip_ = true; + + // We only re-create the fixed with a window when a cliprect is installed. + // Because the presence of a X Window will prevent transparency from working + // properly, we only want it to be active for the duration of a clip + // (typically during animations and scrolling.) + CreateFixed(true); + } } bool NativeViewHostGtk::HasInstalledClip() { |