| OLD | NEW |
| 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.h" | 10 #include "base/message_loop.h" |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 start_time_ = now; | 101 start_time_ = now; |
| 102 } | 102 } |
| 103 } | 103 } |
| 104 if (max_frames_ && frames_ == max_frames_) { | 104 if (max_frames_ && frames_ == max_frames_) { |
| 105 MessageLoop::current()->Quit(); | 105 MessageLoop::current()->Quit(); |
| 106 } else { | 106 } else { |
| 107 Draw(); | 107 Draw(); |
| 108 } | 108 } |
| 109 } | 109 } |
| 110 | 110 |
| 111 virtual void OnCompositingAborted(Compositor* compositor) OVERRIDE {} |
| 112 |
| 111 virtual void Draw() {} | 113 virtual void Draw() {} |
| 112 | 114 |
| 113 int frames() const { return frames_; } | 115 int frames() const { return frames_; } |
| 114 | 116 |
| 115 private: | 117 private: |
| 116 TimeTicks start_time_; | 118 TimeTicks start_time_; |
| 117 int frames_; | 119 int frames_; |
| 118 int max_frames_; | 120 int max_frames_; |
| 119 | 121 |
| 120 DISALLOW_COPY_AND_ASSIGN(BenchCompositorObserver); | 122 DISALLOW_COPY_AND_ASSIGN(BenchCompositorObserver); |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 #endif | 325 #endif |
| 324 | 326 |
| 325 root_window->ShowRootWindow(); | 327 root_window->ShowRootWindow(); |
| 326 MessageLoopForUI::current()->Run(); | 328 MessageLoopForUI::current()->Run(); |
| 327 root_window.reset(); | 329 root_window.reset(); |
| 328 | 330 |
| 329 ui::CompositorTestSupport::Terminate(); | 331 ui::CompositorTestSupport::Terminate(); |
| 330 | 332 |
| 331 return 0; | 333 return 0; |
| 332 } | 334 } |
| OLD | NEW |