diff options
author | piman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-07 22:18:40 +0000 |
---|---|---|
committer | piman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-07 22:18:40 +0000 |
commit | b9667d33b4f0d556cc9e2d8e39d5ed5d7055b155 (patch) | |
tree | 3259971289f2ca1b69fae250d09826bcb0eb5800 /ui | |
parent | a0ad93ea4d1567d0224ee09defed28865799ec3d (diff) | |
download | chromium_src-b9667d33b4f0d556cc9e2d8e39d5ed5d7055b155.zip chromium_src-b9667d33b4f0d556cc9e2d8e39d5ed5d7055b155.tar.gz chromium_src-b9667d33b4f0d556cc9e2d8e39d5ed5d7055b155.tar.bz2 |
RWHVA: Force redraw after resize
BUG=122093
TEST=manual (see bug).
Review URL: https://chromiumcodereview.appspot.com/10384043
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135744 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r-- | ui/compositor/layer.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/ui/compositor/layer.cc b/ui/compositor/layer.cc index faba3db..204b1b0 100644 --- a/ui/compositor/layer.cc +++ b/ui/compositor/layer.cc @@ -421,11 +421,14 @@ void Layer::SetBoundsImmediately(const gfx::Rect& bounds) { bool was_move = bounds_.size() == bounds.size(); bounds_ = bounds; - if (IsDrawn()) { - if (was_move) + if (was_move) { + // Don't schedule a draw if we're invisible. We'll schedule one + // automatically when we get visible. + if (IsDrawn()) ScheduleDraw(); - else - SchedulePaint(gfx::Rect(bounds.size())); + } else { + // Always schedule a paint, even if we're invisible. + SchedulePaint(gfx::Rect(bounds.size())); } RecomputeTransform(); |