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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 } | 107 } |
108 } | 108 } |
109 settings.renderer_settings.partial_swap_enabled = | 109 settings.renderer_settings.partial_swap_enabled = |
110 !command_line->HasSwitch(cc::switches::kUIDisablePartialSwap); | 110 !command_line->HasSwitch(cc::switches::kUIDisablePartialSwap); |
111 #if defined(OS_WIN) | 111 #if defined(OS_WIN) |
112 settings.renderer_settings.finish_rendering_on_resize = true; | 112 settings.renderer_settings.finish_rendering_on_resize = true; |
113 #elif defined(OS_MACOSX) | 113 #elif defined(OS_MACOSX) |
114 settings.renderer_settings.delay_releasing_overlay_resources = true; | 114 settings.renderer_settings.delay_releasing_overlay_resources = true; |
115 #endif | 115 #endif |
116 | 116 |
| 117 // Partial swap is always enabled for UI. |
| 118 settings.enable_partial_raster = true; |
| 119 |
117 // These flags should be mirrored by renderer versions in content/renderer/. | 120 // These flags should be mirrored by renderer versions in content/renderer/. |
118 settings.initial_debug_state.show_debug_borders = | 121 settings.initial_debug_state.show_debug_borders = |
119 command_line->HasSwitch(cc::switches::kUIShowCompositedLayerBorders); | 122 command_line->HasSwitch(cc::switches::kUIShowCompositedLayerBorders); |
120 settings.initial_debug_state.show_fps_counter = | 123 settings.initial_debug_state.show_fps_counter = |
121 command_line->HasSwitch(cc::switches::kUIShowFPSCounter); | 124 command_line->HasSwitch(cc::switches::kUIShowFPSCounter); |
122 settings.initial_debug_state.show_layer_animation_bounds_rects = | 125 settings.initial_debug_state.show_layer_animation_bounds_rects = |
123 command_line->HasSwitch(cc::switches::kUIShowLayerAnimationBounds); | 126 command_line->HasSwitch(cc::switches::kUIShowLayerAnimationBounds); |
124 settings.initial_debug_state.show_paint_rects = | 127 settings.initial_debug_state.show_paint_rects = |
125 command_line->HasSwitch(switches::kUIShowPaintRects); | 128 command_line->HasSwitch(switches::kUIShowPaintRects); |
126 settings.initial_debug_state.show_property_changed_rects = | 129 settings.initial_debug_state.show_property_changed_rects = |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 observer_list_, | 468 observer_list_, |
466 OnCompositingLockStateChanged(this)); | 469 OnCompositingLockStateChanged(this)); |
467 } | 470 } |
468 | 471 |
469 void Compositor::CancelCompositorLock() { | 472 void Compositor::CancelCompositorLock() { |
470 if (compositor_lock_) | 473 if (compositor_lock_) |
471 compositor_lock_->CancelLock(); | 474 compositor_lock_->CancelLock(); |
472 } | 475 } |
473 | 476 |
474 } // namespace ui | 477 } // namespace ui |
OLD | NEW |