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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 schedule_draw_factory_(this) { | 90 schedule_draw_factory_(this) { |
91 root_web_layer_ = cc::Layer::Create(); | 91 root_web_layer_ = cc::Layer::Create(); |
92 | 92 |
93 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 93 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
94 | 94 |
95 cc::LayerTreeSettings settings; | 95 cc::LayerTreeSettings settings; |
96 settings.refresh_rate = | 96 settings.refresh_rate = |
97 context_factory_->DoesCreateTestContexts() | 97 context_factory_->DoesCreateTestContexts() |
98 ? kTestRefreshRate | 98 ? kTestRefreshRate |
99 : kDefaultRefreshRate; | 99 : kDefaultRefreshRate; |
100 settings.main_frame_before_draw_enabled = false; | |
101 settings.main_frame_before_activation_enabled = false; | 100 settings.main_frame_before_activation_enabled = false; |
102 settings.throttle_frame_production = | 101 settings.throttle_frame_production = |
103 !command_line->HasSwitch(switches::kDisableGpuVsync); | 102 !command_line->HasSwitch(switches::kDisableGpuVsync); |
104 #if !defined(OS_MACOSX) | 103 #if !defined(OS_MACOSX) |
105 settings.partial_swap_enabled = | 104 settings.partial_swap_enabled = |
106 !command_line->HasSwitch(cc::switches::kUIDisablePartialSwap); | 105 !command_line->HasSwitch(cc::switches::kUIDisablePartialSwap); |
107 #endif | 106 #endif |
108 #if defined(OS_CHROMEOS) | 107 #if defined(OS_CHROMEOS) |
109 settings.per_tile_painting_enabled = true; | 108 settings.per_tile_painting_enabled = true; |
110 #endif | 109 #endif |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 // Call ScheduleDraw() instead of Draw() in order to allow other | 443 // Call ScheduleDraw() instead of Draw() in order to allow other |
445 // CompositorObservers to be notified before starting another | 444 // CompositorObservers to be notified before starting another |
446 // draw cycle. | 445 // draw cycle. |
447 ScheduleDraw(); | 446 ScheduleDraw(); |
448 } | 447 } |
449 FOR_EACH_OBSERVER( | 448 FOR_EACH_OBSERVER( |
450 CompositorObserver, observer_list_, OnCompositingEnded(this)); | 449 CompositorObserver, observer_list_, OnCompositingEnded(this)); |
451 } | 450 } |
452 | 451 |
453 } // namespace ui | 452 } // namespace ui |
OLD | NEW |