| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 // When impl-side painting is enabled, this will ensure PictureLayers always | 91 // When impl-side painting is enabled, this will ensure PictureLayers always |
| 92 // can have LCD text, to match the previous behaviour with ContentLayers, | 92 // can have LCD text, to match the previous behaviour with ContentLayers, |
| 93 // where LCD-not-allowed notifications were ignored. | 93 // where LCD-not-allowed notifications were ignored. |
| 94 settings.layers_always_allowed_lcd_text = true; | 94 settings.layers_always_allowed_lcd_text = true; |
| 95 settings.renderer_settings.refresh_rate = | 95 settings.renderer_settings.refresh_rate = |
| 96 context_factory_->DoesCreateTestContexts() ? kTestRefreshRate | 96 context_factory_->DoesCreateTestContexts() ? kTestRefreshRate |
| 97 : kDefaultRefreshRate; | 97 : kDefaultRefreshRate; |
| 98 settings.main_frame_before_activation_enabled = false; | 98 settings.main_frame_before_activation_enabled = false; |
| 99 settings.throttle_frame_production = | 99 settings.throttle_frame_production = |
| 100 !command_line->HasSwitch(switches::kDisableGpuVsync); | 100 !command_line->HasSwitch(switches::kDisableGpuVsync); |
| 101 #if !defined(OS_MACOSX) | |
| 102 settings.renderer_settings.partial_swap_enabled = | 101 settings.renderer_settings.partial_swap_enabled = |
| 103 !command_line->HasSwitch(cc::switches::kUIDisablePartialSwap); | 102 !command_line->HasSwitch(cc::switches::kUIDisablePartialSwap); |
| 104 #endif | |
| 105 #if defined(OS_CHROMEOS) | 103 #if defined(OS_CHROMEOS) |
| 106 settings.per_tile_painting_enabled = true; | 104 settings.per_tile_painting_enabled = true; |
| 107 #endif | 105 #endif |
| 108 #if defined(OS_WIN) | 106 #if defined(OS_WIN) |
| 109 settings.renderer_settings.finish_rendering_on_resize = true; | 107 settings.renderer_settings.finish_rendering_on_resize = true; |
| 110 #endif | 108 #endif |
| 111 | 109 |
| 112 // These flags should be mirrored by renderer versions in content/renderer/. | 110 // These flags should be mirrored by renderer versions in content/renderer/. |
| 113 settings.initial_debug_state.show_debug_borders = | 111 settings.initial_debug_state.show_debug_borders = |
| 114 command_line->HasSwitch(cc::switches::kUIShowCompositedLayerBorders); | 112 command_line->HasSwitch(cc::switches::kUIShowCompositedLayerBorders); |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 observer_list_, | 418 observer_list_, |
| 421 OnCompositingLockStateChanged(this)); | 419 OnCompositingLockStateChanged(this)); |
| 422 } | 420 } |
| 423 | 421 |
| 424 void Compositor::CancelCompositorLock() { | 422 void Compositor::CancelCompositorLock() { |
| 425 if (compositor_lock_) | 423 if (compositor_lock_) |
| 426 compositor_lock_->CancelLock(); | 424 compositor_lock_->CancelLock(); |
| 427 } | 425 } |
| 428 | 426 |
| 429 } // namespace ui | 427 } // namespace ui |
| OLD | NEW |