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 "content/renderer/render_thread_impl.h" | 5 #include "content/renderer/render_thread_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <map> | 9 #include <map> |
10 #include <vector> | 10 #include <vector> |
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
729 | 729 |
730 void RenderThreadImpl::EnsureWebKitInitialized() { | 730 void RenderThreadImpl::EnsureWebKitInitialized() { |
731 if (webkit_platform_support_) | 731 if (webkit_platform_support_) |
732 return; | 732 return; |
733 | 733 |
734 webkit_platform_support_.reset(new RendererWebKitPlatformSupportImpl); | 734 webkit_platform_support_.reset(new RendererWebKitPlatformSupportImpl); |
735 blink::initialize(webkit_platform_support_.get()); | 735 blink::initialize(webkit_platform_support_.get()); |
736 | 736 |
737 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 737 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
738 | 738 |
739 bool enable = command_line.HasSwitch(switches::kEnableThreadedCompositing); | 739 bool enable = !command_line.HasSwitch(switches::kDisableThreadedCompositing); |
740 if (enable) { | 740 if (enable) { |
741 #if defined(OS_ANDROID) | 741 #if defined(OS_ANDROID) |
742 if (SynchronousCompositorFactory* factory = | 742 if (SynchronousCompositorFactory* factory = |
743 SynchronousCompositorFactory::GetInstance()) | 743 SynchronousCompositorFactory::GetInstance()) |
744 compositor_message_loop_proxy_ = | 744 compositor_message_loop_proxy_ = |
745 factory->GetCompositorMessageLoop(); | 745 factory->GetCompositorMessageLoop(); |
746 #endif | 746 #endif |
747 if (!compositor_message_loop_proxy_.get()) { | 747 if (!compositor_message_loop_proxy_.get()) { |
748 compositor_thread_.reset(new base::Thread("Compositor")); | 748 compositor_thread_.reset(new base::Thread("Compositor")); |
749 compositor_thread_->Start(); | 749 compositor_thread_->Start(); |
(...skipping 763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1513 hidden_widget_count_--; | 1513 hidden_widget_count_--; |
1514 | 1514 |
1515 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { | 1515 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { |
1516 return; | 1516 return; |
1517 } | 1517 } |
1518 | 1518 |
1519 ScheduleIdleHandler(kLongIdleHandlerDelayMs); | 1519 ScheduleIdleHandler(kLongIdleHandlerDelayMs); |
1520 } | 1520 } |
1521 | 1521 |
1522 } // namespace content | 1522 } // namespace content |
OLD | NEW |