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 "ui/compositor/compositor.h" | 5 #include "ui/compositor/compositor.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <deque> | 8 #include <deque> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 disable_schedule_composite_(false), | 104 disable_schedule_composite_(false), |
105 compositor_lock_(NULL), | 105 compositor_lock_(NULL), |
106 defer_draw_scheduling_(false), | 106 defer_draw_scheduling_(false), |
107 waiting_on_compositing_end_(false), | 107 waiting_on_compositing_end_(false), |
108 draw_on_compositing_end_(false), | 108 draw_on_compositing_end_(false), |
109 swap_state_(SWAP_NONE), | 109 swap_state_(SWAP_NONE), |
110 layer_animator_collection_(this), | 110 layer_animator_collection_(this), |
111 weak_ptr_factory_(this) { | 111 weak_ptr_factory_(this) { |
112 root_web_layer_ = cc::Layer::Create(); | 112 root_web_layer_ = cc::Layer::Create(); |
113 | 113 |
114 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 114 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
115 | 115 |
116 cc::LayerTreeSettings settings; | 116 cc::LayerTreeSettings settings; |
117 settings.renderer_settings.refresh_rate = | 117 settings.renderer_settings.refresh_rate = |
118 context_factory_->DoesCreateTestContexts() | 118 context_factory_->DoesCreateTestContexts() |
119 ? kTestRefreshRate | 119 ? kTestRefreshRate |
120 : kDefaultRefreshRate; | 120 : kDefaultRefreshRate; |
121 settings.main_frame_before_activation_enabled = false; | 121 settings.main_frame_before_activation_enabled = false; |
122 settings.throttle_frame_production = | 122 settings.throttle_frame_production = |
123 !command_line->HasSwitch(switches::kDisableGpuVsync); | 123 !command_line->HasSwitch(switches::kDisableGpuVsync); |
124 #if !defined(OS_MACOSX) | 124 #if !defined(OS_MACOSX) |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
492 // Call ScheduleDraw() instead of Draw() in order to allow other | 492 // Call ScheduleDraw() instead of Draw() in order to allow other |
493 // CompositorObservers to be notified before starting another | 493 // CompositorObservers to be notified before starting another |
494 // draw cycle. | 494 // draw cycle. |
495 ScheduleDraw(); | 495 ScheduleDraw(); |
496 } | 496 } |
497 FOR_EACH_OBSERVER( | 497 FOR_EACH_OBSERVER( |
498 CompositorObserver, observer_list_, OnCompositingEnded(this)); | 498 CompositorObserver, observer_list_, OnCompositingEnded(this)); |
499 } | 499 } |
500 | 500 |
501 } // namespace ui | 501 } // namespace ui |
OLD | NEW |