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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 cc::LayerTreeSettings settings; | 87 cc::LayerTreeSettings settings; |
88 | 88 |
89 // When impl-side painting is enabled, this will ensure PictureLayers always | 89 // When impl-side painting is enabled, this will ensure PictureLayers always |
90 // can have LCD text, to match the previous behaviour with ContentLayers, | 90 // can have LCD text, to match the previous behaviour with ContentLayers, |
91 // where LCD-not-allowed notifications were ignored. | 91 // where LCD-not-allowed notifications were ignored. |
92 settings.layers_always_allowed_lcd_text = true; | 92 settings.layers_always_allowed_lcd_text = true; |
93 settings.renderer_settings.refresh_rate = | 93 settings.renderer_settings.refresh_rate = |
94 context_factory_->DoesCreateTestContexts() ? kTestRefreshRate | 94 context_factory_->DoesCreateTestContexts() ? kTestRefreshRate |
95 : kDefaultRefreshRate; | 95 : kDefaultRefreshRate; |
96 settings.main_frame_before_activation_enabled = false; | 96 settings.main_frame_before_activation_enabled = false; |
97 settings.renderer_settings.disable_gpu_vsync = | 97 settings.renderer_settings.disable_display_vsync = |
98 command_line->HasSwitch(switches::kDisableGpuVsync); | 98 (command_line->HasSwitch(switches::kDisableGpuVsync) || |
| 99 command_line->HasSwitch(switches::kDisableDisplayVsync)); |
| 100 settings.throttle_frame_production = |
| 101 !(command_line->HasSwitch(switches::kDisableGpuVsync) || |
| 102 command_line->HasSwitch(cc::switches::kDisableBeginFrameInterval)); |
| 103 |
99 settings.renderer_settings.partial_swap_enabled = | 104 settings.renderer_settings.partial_swap_enabled = |
100 !command_line->HasSwitch(cc::switches::kUIDisablePartialSwap); | 105 !command_line->HasSwitch(cc::switches::kUIDisablePartialSwap); |
101 #if defined(OS_CHROMEOS) | 106 #if defined(OS_CHROMEOS) |
102 settings.per_tile_painting_enabled = true; | 107 settings.per_tile_painting_enabled = true; |
103 #endif | 108 #endif |
104 #if defined(OS_WIN) | 109 #if defined(OS_WIN) |
105 settings.renderer_settings.finish_rendering_on_resize = true; | 110 settings.renderer_settings.finish_rendering_on_resize = true; |
106 #endif | 111 #endif |
107 | 112 |
108 // These flags should be mirrored by renderer versions in content/renderer/. | 113 // These flags should be mirrored by renderer versions in content/renderer/. |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 observer_list_, | 464 observer_list_, |
460 OnCompositingLockStateChanged(this)); | 465 OnCompositingLockStateChanged(this)); |
461 } | 466 } |
462 | 467 |
463 void Compositor::CancelCompositorLock() { | 468 void Compositor::CancelCompositorLock() { |
464 if (compositor_lock_) | 469 if (compositor_lock_) |
465 compositor_lock_->CancelLock(); | 470 compositor_lock_->CancelLock(); |
466 } | 471 } |
467 | 472 |
468 } // namespace ui | 473 } // namespace ui |
OLD | NEW |