summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-12 13:19:02 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-12 13:19:02 +0000
commit33097104769c11ab7981e064441d40d7aa2680dc (patch)
treea4dda85e3aae5a7d8be10e312771f70c5bd5535a /views
parentab19cc385ebcb26dcc226aed4d61ed984c94bc4b (diff)
downloadchromium_src-33097104769c11ab7981e064441d40d7aa2680dc.zip
chromium_src-33097104769c11ab7981e064441d40d7aa2680dc.tar.gz
chromium_src-33097104769c11ab7981e064441d40d7aa2680dc.tar.bz2
ScheduleDraw() in View::SchedulePaintBoundsChanged() when a child view is moved so that its parent can be redrawn by the compositor with the child in its new position.
R=sadrul,sky BUG= TEST=Drag and move chromium window around when no on-screen animation is occuring (such as cursor blink). Review URL: http://codereview.chromium.org/8177010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105062 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r--views/view.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/views/view.cc b/views/view.cc
index 90210dd..d6a16eb 100644
--- a/views/view.cc
+++ b/views/view.cc
@@ -1412,6 +1412,12 @@ void View::SchedulePaintBoundsChanged(SchedulePaintType type) {
// Otherwise, if the size changes or we don't have a layer then we need to
// use SchedulePaint to invalidate the area occupied by the View.
SchedulePaint();
+ } else if (parent_ && type == SCHEDULE_PAINT_SIZE_SAME) {
+ // The compositor doesn't Draw() until something on screen changes, so
+ // if our position changes but nothing is being animated on screen, then
+ // tell the compositor to redraw the scene. We know layer() exists due to
+ // the above if clause.
+ layer()->ScheduleDraw();
}
}