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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 waiting_on_compositing_end_(false), | 83 waiting_on_compositing_end_(false), |
84 draw_on_compositing_end_(false), | 84 draw_on_compositing_end_(false), |
85 swap_state_(SWAP_NONE), | 85 swap_state_(SWAP_NONE), |
86 layer_animator_collection_(this), | 86 layer_animator_collection_(this), |
87 weak_ptr_factory_(this) { | 87 weak_ptr_factory_(this) { |
88 root_web_layer_ = cc::Layer::Create(); | 88 root_web_layer_ = cc::Layer::Create(); |
89 | 89 |
90 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 90 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
91 | 91 |
92 cc::LayerTreeSettings settings; | 92 cc::LayerTreeSettings settings; |
93 // When impl-side painting is enabled, this will ensure PictureLayers always | |
94 // can have LCD text, to match the previous behaviour with ContentLayers, | |
95 // where LCD-not-allowed notifications were ignored. | |
96 settings.layers_always_allowed_lcd_text = true; | |
97 settings.refresh_rate = | 93 settings.refresh_rate = |
98 context_factory_->DoesCreateTestContexts() | 94 context_factory_->DoesCreateTestContexts() |
99 ? kTestRefreshRate | 95 ? kTestRefreshRate |
100 : kDefaultRefreshRate; | 96 : kDefaultRefreshRate; |
101 settings.main_frame_before_activation_enabled = false; | 97 settings.main_frame_before_activation_enabled = false; |
102 settings.throttle_frame_production = | 98 settings.throttle_frame_production = |
103 !command_line->HasSwitch(switches::kDisableGpuVsync); | 99 !command_line->HasSwitch(switches::kDisableGpuVsync); |
104 #if !defined(OS_MACOSX) | 100 #if !defined(OS_MACOSX) |
105 settings.partial_swap_enabled = | 101 settings.partial_swap_enabled = |
106 !command_line->HasSwitch(cc::switches::kUIDisablePartialSwap); | 102 !command_line->HasSwitch(cc::switches::kUIDisablePartialSwap); |
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 // Call ScheduleDraw() instead of Draw() in order to allow other | 454 // Call ScheduleDraw() instead of Draw() in order to allow other |
459 // CompositorObservers to be notified before starting another | 455 // CompositorObservers to be notified before starting another |
460 // draw cycle. | 456 // draw cycle. |
461 ScheduleDraw(); | 457 ScheduleDraw(); |
462 } | 458 } |
463 FOR_EACH_OBSERVER( | 459 FOR_EACH_OBSERVER( |
464 CompositorObserver, observer_list_, OnCompositingEnded(this)); | 460 CompositorObserver, observer_list_, OnCompositingEnded(this)); |
465 } | 461 } |
466 | 462 |
467 } // namespace ui | 463 } // namespace ui |
OLD | NEW |