| 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/raster/task_graph_runner.h" | 35 #include "cc/raster/task_graph_runner.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 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 569 InitSkiaEventTracer(); | 570 InitSkiaEventTracer(); |
| 570 | 571 |
| 571 const base::CommandLine& command_line = | 572 const base::CommandLine& command_line = |
| 572 *base::CommandLine::ForCurrentProcess(); | 573 *base::CommandLine::ForCurrentProcess(); |
| 573 | 574 |
| 574 is_impl_side_painting_enabled_ = | 575 is_impl_side_painting_enabled_ = |
| 575 !command_line.HasSwitch(switches::kDisableImplSidePainting); | 576 !command_line.HasSwitch(switches::kDisableImplSidePainting); |
| 576 cc_blink::WebLayerImpl::SetImplSidePaintingEnabled( | 577 cc_blink::WebLayerImpl::SetImplSidePaintingEnabled( |
| 577 is_impl_side_painting_enabled_); | 578 is_impl_side_painting_enabled_); |
| 578 | 579 |
| 580 cc::LayerSettings layer_settings; |
| 581 if (command_line.HasSwitch(switches::kEnableCompositorAnimationTimelines)) |
| 582 layer_settings.use_compositor_animation_timelines = true; |
| 583 cc_blink::WebLayerImpl::SetLayerSettings(layer_settings); |
| 584 |
| 579 is_zero_copy_enabled_ = command_line.HasSwitch(switches::kEnableZeroCopy); | 585 is_zero_copy_enabled_ = command_line.HasSwitch(switches::kEnableZeroCopy); |
| 580 is_one_copy_enabled_ = !command_line.HasSwitch(switches::kDisableOneCopy); | 586 is_one_copy_enabled_ = !command_line.HasSwitch(switches::kDisableOneCopy); |
| 581 | 587 |
| 582 #if defined(OS_MACOSX) && !defined(OS_IOS) | 588 #if defined(OS_MACOSX) && !defined(OS_IOS) |
| 583 is_elastic_overscroll_enabled_ = base::mac::IsOSLionOrLater(); | 589 is_elastic_overscroll_enabled_ = base::mac::IsOSLionOrLater(); |
| 584 if (is_elastic_overscroll_enabled_) { | 590 if (is_elastic_overscroll_enabled_) { |
| 585 base::ScopedCFTypeRef<CFStringRef> key( | 591 base::ScopedCFTypeRef<CFStringRef> key( |
| 586 base::SysUTF8ToCFStringRef("NSScrollViewRubberbanding")); | 592 base::SysUTF8ToCFStringRef("NSScrollViewRubberbanding")); |
| 587 Boolean key_exists = false; | 593 Boolean key_exists = false; |
| 588 Boolean value = CFPreferencesGetAppBooleanValue( | 594 Boolean value = CFPreferencesGetAppBooleanValue( |
| (...skipping 1303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1892 } | 1898 } |
| 1893 | 1899 |
| 1894 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { | 1900 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { |
| 1895 size_t erased = | 1901 size_t erased = |
| 1896 RenderThreadImpl::current()->pending_render_frame_connects_.erase( | 1902 RenderThreadImpl::current()->pending_render_frame_connects_.erase( |
| 1897 routing_id_); | 1903 routing_id_); |
| 1898 DCHECK_EQ(1u, erased); | 1904 DCHECK_EQ(1u, erased); |
| 1899 } | 1905 } |
| 1900 | 1906 |
| 1901 } // namespace content | 1907 } // namespace content |
| OLD | NEW |