| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <deque> | 10 #include <deque> |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 } | 125 } |
| 126 settings.renderer_settings.partial_swap_enabled = | 126 settings.renderer_settings.partial_swap_enabled = |
| 127 !command_line->HasSwitch(switches::kUIDisablePartialSwap); | 127 !command_line->HasSwitch(switches::kUIDisablePartialSwap); |
| 128 #if defined(OS_WIN) | 128 #if defined(OS_WIN) |
| 129 settings.renderer_settings.finish_rendering_on_resize = true; | 129 settings.renderer_settings.finish_rendering_on_resize = true; |
| 130 #elif defined(OS_MACOSX) | 130 #elif defined(OS_MACOSX) |
| 131 settings.renderer_settings.release_overlay_resources_after_gpu_query = true; | 131 settings.renderer_settings.release_overlay_resources_after_gpu_query = true; |
| 132 #endif | 132 #endif |
| 133 settings.renderer_settings.gl_composited_texture_quad_border = | 133 settings.renderer_settings.gl_composited_texture_quad_border = |
| 134 command_line->HasSwitch(cc::switches::kGlCompositedTextureQuadBorder); | 134 command_line->HasSwitch(cc::switches::kGlCompositedTextureQuadBorder); |
| 135 settings.renderer_settings.show_overdraw_feedback = |
| 136 command_line->HasSwitch(cc::switches::kShowOverdrawFeedback); |
| 135 | 137 |
| 136 // These flags should be mirrored by renderer versions in content/renderer/. | 138 // These flags should be mirrored by renderer versions in content/renderer/. |
| 137 settings.initial_debug_state.show_debug_borders = | 139 settings.initial_debug_state.show_debug_borders = |
| 138 command_line->HasSwitch(cc::switches::kUIShowCompositedLayerBorders); | 140 command_line->HasSwitch(cc::switches::kUIShowCompositedLayerBorders); |
| 139 settings.initial_debug_state.show_fps_counter = | 141 settings.initial_debug_state.show_fps_counter = |
| 140 command_line->HasSwitch(cc::switches::kUIShowFPSCounter); | 142 command_line->HasSwitch(cc::switches::kUIShowFPSCounter); |
| 141 settings.initial_debug_state.show_layer_animation_bounds_rects = | 143 settings.initial_debug_state.show_layer_animation_bounds_rects = |
| 142 command_line->HasSwitch(cc::switches::kUIShowLayerAnimationBounds); | 144 command_line->HasSwitch(cc::switches::kUIShowLayerAnimationBounds); |
| 143 settings.initial_debug_state.show_paint_rects = | 145 settings.initial_debug_state.show_paint_rects = |
| 144 command_line->HasSwitch(switches::kUIShowPaintRects); | 146 command_line->HasSwitch(switches::kUIShowPaintRects); |
| (...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 562 for (auto& observer : observer_list_) | 564 for (auto& observer : observer_list_) |
| 563 observer.OnCompositingLockStateChanged(this); | 565 observer.OnCompositingLockStateChanged(this); |
| 564 } | 566 } |
| 565 | 567 |
| 566 void Compositor::CancelCompositorLock() { | 568 void Compositor::CancelCompositorLock() { |
| 567 if (compositor_lock_) | 569 if (compositor_lock_) |
| 568 compositor_lock_->CancelLock(); | 570 compositor_lock_->CancelLock(); |
| 569 } | 571 } |
| 570 | 572 |
| 571 } // namespace ui | 573 } // namespace ui |
| OLD | NEW |