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 14 matching lines...) Expand all Loading... |
25 #include "base/strings/sys_string_conversions.h" | 25 #include "base/strings/sys_string_conversions.h" |
26 #include "base/strings/utf_string_conversions.h" | 26 #include "base/strings/utf_string_conversions.h" |
27 #include "base/threading/simple_thread.h" | 27 #include "base/threading/simple_thread.h" |
28 #include "base/threading/thread_local.h" | 28 #include "base/threading/thread_local.h" |
29 #include "base/threading/thread_restrictions.h" | 29 #include "base/threading/thread_restrictions.h" |
30 #include "base/trace_event/trace_event.h" | 30 #include "base/trace_event/trace_event.h" |
31 #include "base/values.h" | 31 #include "base/values.h" |
32 #include "cc/base/switches.h" | 32 #include "cc/base/switches.h" |
33 #include "cc/blink/web_external_bitmap_impl.h" | 33 #include "cc/blink/web_external_bitmap_impl.h" |
34 #include "cc/blink/web_layer_impl.h" | 34 #include "cc/blink/web_layer_impl.h" |
| 35 #include "cc/layers/layer.h" |
35 #include "cc/resources/tile_task_worker_pool.h" | 36 #include "cc/resources/tile_task_worker_pool.h" |
36 #include "components/scheduler/renderer/renderer_scheduler.h" | 37 #include "components/scheduler/renderer/renderer_scheduler.h" |
37 #include "content/child/appcache/appcache_dispatcher.h" | 38 #include "content/child/appcache/appcache_dispatcher.h" |
38 #include "content/child/appcache/appcache_frontend_impl.h" | 39 #include "content/child/appcache/appcache_frontend_impl.h" |
39 #include "content/child/child_discardable_shared_memory_manager.h" | 40 #include "content/child/child_discardable_shared_memory_manager.h" |
40 #include "content/child/child_gpu_memory_buffer_manager.h" | 41 #include "content/child/child_gpu_memory_buffer_manager.h" |
41 #include "content/child/child_histogram_message_filter.h" | 42 #include "content/child/child_histogram_message_filter.h" |
42 #include "content/child/child_resource_message_filter.h" | 43 #include "content/child/child_resource_message_filter.h" |
43 #include "content/child/child_shared_bitmap_manager.h" | 44 #include "content/child/child_shared_bitmap_manager.h" |
44 #include "content/child/content_child_helpers.h" | 45 #include "content/child/content_child_helpers.h" |
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
567 InitSkiaEventTracer(); | 568 InitSkiaEventTracer(); |
568 | 569 |
569 const base::CommandLine& command_line = | 570 const base::CommandLine& command_line = |
570 *base::CommandLine::ForCurrentProcess(); | 571 *base::CommandLine::ForCurrentProcess(); |
571 | 572 |
572 is_impl_side_painting_enabled_ = | 573 is_impl_side_painting_enabled_ = |
573 !command_line.HasSwitch(switches::kDisableImplSidePainting); | 574 !command_line.HasSwitch(switches::kDisableImplSidePainting); |
574 cc_blink::WebLayerImpl::SetImplSidePaintingEnabled( | 575 cc_blink::WebLayerImpl::SetImplSidePaintingEnabled( |
575 is_impl_side_painting_enabled_); | 576 is_impl_side_painting_enabled_); |
576 | 577 |
| 578 if (command_line.HasSwitch(switches::kEnableCompositorAnimationTimelines)) |
| 579 cc::Layer::SetCompositorAnimationTimelinesEnabled(true); |
| 580 |
577 is_zero_copy_enabled_ = command_line.HasSwitch(switches::kEnableZeroCopy); | 581 is_zero_copy_enabled_ = command_line.HasSwitch(switches::kEnableZeroCopy); |
578 is_one_copy_enabled_ = !command_line.HasSwitch(switches::kDisableOneCopy); | 582 is_one_copy_enabled_ = !command_line.HasSwitch(switches::kDisableOneCopy); |
579 | 583 |
580 #if defined(OS_MACOSX) && !defined(OS_IOS) | 584 #if defined(OS_MACOSX) && !defined(OS_IOS) |
581 is_elastic_overscroll_enabled_ = base::mac::IsOSLionOrLater(); | 585 is_elastic_overscroll_enabled_ = base::mac::IsOSLionOrLater(); |
582 if (is_elastic_overscroll_enabled_) { | 586 if (is_elastic_overscroll_enabled_) { |
583 base::ScopedCFTypeRef<CFStringRef> key( | 587 base::ScopedCFTypeRef<CFStringRef> key( |
584 base::SysUTF8ToCFStringRef("NSScrollViewRubberbanding")); | 588 base::SysUTF8ToCFStringRef("NSScrollViewRubberbanding")); |
585 Boolean key_exists = false; | 589 Boolean key_exists = false; |
586 Boolean value = CFPreferencesGetAppBooleanValue( | 590 Boolean value = CFPreferencesGetAppBooleanValue( |
(...skipping 1308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1895 } | 1899 } |
1896 | 1900 |
1897 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { | 1901 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { |
1898 size_t erased = | 1902 size_t erased = |
1899 RenderThreadImpl::current()->pending_render_frame_connects_.erase( | 1903 RenderThreadImpl::current()->pending_render_frame_connects_.erase( |
1900 routing_id_); | 1904 routing_id_); |
1901 DCHECK_EQ(1u, erased); | 1905 DCHECK_EQ(1u, erased); |
1902 } | 1906 } |
1903 | 1907 |
1904 } // namespace content | 1908 } // namespace content |
OLD | NEW |