summaryrefslogtreecommitdiffstats
path: root/ui/gfx/compositor/compositor_observer.h
diff options
context:
space:
mode:
authorpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-23 01:36:06 +0000
committerpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-23 01:36:06 +0000
commita8f677c4f043a47ee4cbb295b438662eabec08ad (patch)
tree3ba7a41c75522c8f8d394062ac70e297e679d90f /ui/gfx/compositor/compositor_observer.h
parent219773188f91004c38ff602b821bf87fbd6034b2 (diff)
downloadchromium_src-a8f677c4f043a47ee4cbb295b438662eabec08ad.zip
chromium_src-a8f677c4f043a47ee4cbb295b438662eabec08ad.tar.gz
chromium_src-a8f677c4f043a47ee4cbb295b438662eabec08ad.tar.bz2
aura: remove one frame of input latency on mouse moves.
The "hold mouse moves" logic was written with the assumption that Draw() would block, but that's not true anymore with --ui-use-gpu-process. Because of that, during mouse moves or animations we handle all events between Draw() and ScheduleDraw(), meaning mouse moves are always held, so they're delayed until after the next Draw(), losing one frame. The logic in RootWindow was to make sure when we release the locks in RWHVA when we receive the new texture we don't handle mouse moves (which would resize the window) until after the next draw, but we can move that logic direcly in RWHVA where it belongs, and only apply that hold while we're resizing. BUG=none TEST=with and without --ui-use-gpu-process, drag windows around, and resize them. In both cases, observe lower latency with --ui-use-gpu-process. Review URL: http://codereview.chromium.org/9838029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128380 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/compositor/compositor_observer.h')
-rw-r--r--ui/gfx/compositor/compositor_observer.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/ui/gfx/compositor/compositor_observer.h b/ui/gfx/compositor/compositor_observer.h
index 0025799..1d4bf7da3 100644
--- a/ui/gfx/compositor/compositor_observer.h
+++ b/ui/gfx/compositor/compositor_observer.h
@@ -15,7 +15,11 @@ class Compositor;
// A compositor observer is notified when compositing completes.
class COMPOSITOR_EXPORT CompositorObserver {
public:
- // Called when compositing completes.
+ // Called when compositing started: it has taken all the layer changes into
+ // account and has issued the graphics commands.
+ virtual void OnCompositingStarted(Compositor* compositor) = 0;
+
+ // Called when compositing completes: the present to screen has completed.
virtual void OnCompositingEnded(Compositor* compositor) = 0;
protected: