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 800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
811 blink::initialize(webkit_platform_support_.get()); | 811 blink::initialize(webkit_platform_support_.get()); |
812 | 812 |
813 v8::Isolate* isolate = blink::mainThreadIsolate(); | 813 v8::Isolate* isolate = blink::mainThreadIsolate(); |
814 | 814 |
815 isolate->SetCounterFunction(base::StatsTable::FindLocation); | 815 isolate->SetCounterFunction(base::StatsTable::FindLocation); |
816 isolate->SetCreateHistogramFunction(CreateHistogram); | 816 isolate->SetCreateHistogramFunction(CreateHistogram); |
817 isolate->SetAddHistogramSampleFunction(AddHistogramSample); | 817 isolate->SetAddHistogramSampleFunction(AddHistogramSample); |
818 | 818 |
819 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 819 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
820 | 820 |
821 bool enable = command_line.HasSwitch(switches::kEnableThreadedCompositing); | 821 bool enable = !command_line.HasSwitch(switches::kDisableThreadedCompositing); |
822 if (enable) { | 822 if (enable) { |
823 #if defined(OS_ANDROID) | 823 #if defined(OS_ANDROID) |
824 if (SynchronousCompositorFactory* factory = | 824 if (SynchronousCompositorFactory* factory = |
825 SynchronousCompositorFactory::GetInstance()) | 825 SynchronousCompositorFactory::GetInstance()) |
826 compositor_message_loop_proxy_ = | 826 compositor_message_loop_proxy_ = |
827 factory->GetCompositorMessageLoop(); | 827 factory->GetCompositorMessageLoop(); |
828 #endif | 828 #endif |
829 if (!compositor_message_loop_proxy_.get()) { | 829 if (!compositor_message_loop_proxy_.get()) { |
830 compositor_thread_.reset(new base::Thread("Compositor")); | 830 compositor_thread_.reset(new base::Thread("Compositor")); |
831 compositor_thread_->Start(); | 831 compositor_thread_->Start(); |
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1608 hidden_widget_count_--; | 1608 hidden_widget_count_--; |
1609 | 1609 |
1610 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { | 1610 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { |
1611 return; | 1611 return; |
1612 } | 1612 } |
1613 | 1613 |
1614 ScheduleIdleHandler(kLongIdleHandlerDelayMs); | 1614 ScheduleIdleHandler(kLongIdleHandlerDelayMs); |
1615 } | 1615 } |
1616 | 1616 |
1617 } // namespace content | 1617 } // namespace content |
OLD | NEW |