Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Side by Side Diff: ui/aura/bench/bench_main.cc

Issue 138903025: Read compositor VSync information from platform, when possible (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 4b969456 piman@ comments; refactor logic into CompositorVSyncManager Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/at_exit.h" 5 #include "base/at_exit.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/i18n/icu_util.h" 8 #include "base/i18n/icu_util.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 } else { 113 } else {
114 Draw(); 114 Draw();
115 } 115 }
116 } 116 }
117 117
118 virtual void OnCompositingAborted(Compositor* compositor) OVERRIDE {} 118 virtual void OnCompositingAborted(Compositor* compositor) OVERRIDE {}
119 119
120 virtual void OnCompositingLockStateChanged( 120 virtual void OnCompositingLockStateChanged(
121 Compositor* compositor) OVERRIDE {} 121 Compositor* compositor) OVERRIDE {}
122 122
123 virtual void OnUpdateVSyncParameters(ui::Compositor* compositor,
124 base::TimeTicks timebase,
125 base::TimeDelta interval) OVERRIDE {
126 }
127
128 virtual void Draw() {} 123 virtual void Draw() {}
129 124
130 int frames() const { return frames_; } 125 int frames() const { return frames_; }
131 126
132 private: 127 private:
133 TimeTicks start_time_; 128 TimeTicks start_time_;
134 int frames_; 129 int frames_;
135 int max_frames_; 130 int max_frames_;
136 131
137 DISALLOW_COPY_AND_ASSIGN(BenchCompositorObserver); 132 DISALLOW_COPY_AND_ASSIGN(BenchCompositorObserver);
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 ui::PrintLayerHierarchy(root_window->window()->layer(), gfx::Point(100, 100)); 346 ui::PrintLayerHierarchy(root_window->window()->layer(), gfx::Point(100, 100));
352 #endif 347 #endif
353 348
354 root_window->host()->Show(); 349 root_window->host()->Show();
355 base::MessageLoopForUI::current()->Run(); 350 base::MessageLoopForUI::current()->Run();
356 focus_client.reset(); 351 focus_client.reset();
357 root_window.reset(); 352 root_window.reset();
358 353
359 return 0; 354 return 0;
360 } 355 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698