| 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 15 matching lines...) Expand all Loading... |
| 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/resources/tile_task_worker_pool.h" | 35 #include "cc/resources/tile_task_worker_pool.h" |
| 36 #include "cc/trees/layer_tree_settings.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" |
| 45 #include "content/child/db_message_filter.h" | 46 #include "content/child/db_message_filter.h" |
| (...skipping 521 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 cc::LayerSettings layer_settings; |
| 579 if (command_line.HasSwitch(switches::kEnableCompositorAnimationTimelines)) |
| 580 layer_settings.use_compositor_animation_timelines = true; |
| 581 cc_blink::WebLayerImpl::SetLayerSettings(layer_settings); |
| 582 |
| 577 is_zero_copy_enabled_ = command_line.HasSwitch(switches::kEnableZeroCopy); | 583 is_zero_copy_enabled_ = command_line.HasSwitch(switches::kEnableZeroCopy); |
| 578 is_one_copy_enabled_ = !command_line.HasSwitch(switches::kDisableOneCopy); | 584 is_one_copy_enabled_ = !command_line.HasSwitch(switches::kDisableOneCopy); |
| 579 | 585 |
| 580 #if defined(OS_MACOSX) && !defined(OS_IOS) | 586 #if defined(OS_MACOSX) && !defined(OS_IOS) |
| 581 is_elastic_overscroll_enabled_ = base::mac::IsOSLionOrLater(); | 587 is_elastic_overscroll_enabled_ = base::mac::IsOSLionOrLater(); |
| 582 if (is_elastic_overscroll_enabled_) { | 588 if (is_elastic_overscroll_enabled_) { |
| 583 base::ScopedCFTypeRef<CFStringRef> key( | 589 base::ScopedCFTypeRef<CFStringRef> key( |
| 584 base::SysUTF8ToCFStringRef("NSScrollViewRubberbanding")); | 590 base::SysUTF8ToCFStringRef("NSScrollViewRubberbanding")); |
| 585 Boolean key_exists = false; | 591 Boolean key_exists = false; |
| 586 Boolean value = CFPreferencesGetAppBooleanValue( | 592 Boolean value = CFPreferencesGetAppBooleanValue( |
| (...skipping 1296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1883 } | 1889 } |
| 1884 | 1890 |
| 1885 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { | 1891 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { |
| 1886 size_t erased = | 1892 size_t erased = |
| 1887 RenderThreadImpl::current()->pending_render_frame_connects_.erase( | 1893 RenderThreadImpl::current()->pending_render_frame_connects_.erase( |
| 1888 routing_id_); | 1894 routing_id_); |
| 1889 DCHECK_EQ(1u, erased); | 1895 DCHECK_EQ(1u, erased); |
| 1890 } | 1896 } |
| 1891 | 1897 |
| 1892 } // namespace content | 1898 } // namespace content |
| OLD | NEW |