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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 cc::LayerTreeSettings settings; | 369 cc::LayerTreeSettings settings; |
370 settings.initialDebugState.showFPSCounter = | 370 settings.initialDebugState.showFPSCounter = |
371 command_line->HasSwitch(switches::kUIShowFPSCounter); | 371 command_line->HasSwitch(switches::kUIShowFPSCounter); |
372 settings.initialDebugState.showPlatformLayerTree = | 372 settings.initialDebugState.showPlatformLayerTree = |
373 command_line->HasSwitch(switches::kUIShowLayerTree); | 373 command_line->HasSwitch(switches::kUIShowLayerTree); |
374 settings.refreshRate = | 374 settings.refreshRate = |
375 g_test_compositor_enabled ? kTestRefreshRate : kDefaultRefreshRate; | 375 g_test_compositor_enabled ? kTestRefreshRate : kDefaultRefreshRate; |
376 settings.initialDebugState.showDebugBorders = | 376 settings.initialDebugState.showDebugBorders = |
377 command_line->HasSwitch(switches::kUIShowLayerBorders); | 377 command_line->HasSwitch(switches::kUIShowLayerBorders); |
378 settings.partialSwapEnabled = | 378 settings.partialSwapEnabled = |
379 command_line->HasSwitch(switches::kUIEnablePartialSwap); | 379 command_line->HasSwitch(switches::kUIEnablePartialSwap) || |
| 380 command_line->HasSwitch(switches::kUIEnableSoftwareCompositing); |
380 settings.perTilePaintingEnabled = | 381 settings.perTilePaintingEnabled = |
381 command_line->HasSwitch(switches::kUIEnablePerTilePainting); | 382 command_line->HasSwitch(switches::kUIEnablePerTilePainting); |
382 | 383 |
383 scoped_ptr<cc::Thread> thread; | 384 scoped_ptr<cc::Thread> thread; |
384 if (g_compositor_thread) { | 385 if (g_compositor_thread) { |
385 thread = cc::ThreadImpl::createForDifferentThread( | 386 thread = cc::ThreadImpl::createForDifferentThread( |
386 g_compositor_thread->message_loop_proxy()); | 387 g_compositor_thread->message_loop_proxy()); |
387 } | 388 } |
388 | 389 |
389 host_ = cc::LayerTreeHost::create(this, settings, thread.Pass()); | 390 host_ = cc::LayerTreeHost::create(this, settings, thread.Pass()); |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
691 | 692 |
692 COMPOSITOR_EXPORT void DisableTestCompositor() { | 693 COMPOSITOR_EXPORT void DisableTestCompositor() { |
693 g_test_compositor_enabled = false; | 694 g_test_compositor_enabled = false; |
694 } | 695 } |
695 | 696 |
696 COMPOSITOR_EXPORT bool IsTestCompositorEnabled() { | 697 COMPOSITOR_EXPORT bool IsTestCompositorEnabled() { |
697 return g_test_compositor_enabled; | 698 return g_test_compositor_enabled; |
698 } | 699 } |
699 | 700 |
700 } // namespace ui | 701 } // namespace ui |
OLD | NEW |