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 689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
700 | 700 |
701 const base::CommandLine& command_line = | 701 const base::CommandLine& command_line = |
702 *base::CommandLine::ForCurrentProcess(); | 702 *base::CommandLine::ForCurrentProcess(); |
703 | 703 |
704 cc::LayerSettings layer_settings; | 704 cc::LayerSettings layer_settings; |
705 if (command_line.HasSwitch(switches::kEnableCompositorAnimationTimelines)) | 705 if (command_line.HasSwitch(switches::kEnableCompositorAnimationTimelines)) |
706 layer_settings.use_compositor_animation_timelines = true; | 706 layer_settings.use_compositor_animation_timelines = true; |
707 cc_blink::WebLayerImpl::SetLayerSettings(layer_settings); | 707 cc_blink::WebLayerImpl::SetLayerSettings(layer_settings); |
708 | 708 |
709 is_zero_copy_enabled_ = command_line.HasSwitch(switches::kEnableZeroCopy); | 709 is_zero_copy_enabled_ = command_line.HasSwitch(switches::kEnableZeroCopy); |
710 is_one_copy_enabled_ = !command_line.HasSwitch(switches::kDisableOneCopy); | |
711 | 710 |
712 #if defined(OS_MACOSX) && !defined(OS_IOS) | 711 #if defined(OS_MACOSX) && !defined(OS_IOS) |
713 is_elastic_overscroll_enabled_ = base::mac::IsOSLionOrLater(); | 712 is_elastic_overscroll_enabled_ = base::mac::IsOSLionOrLater(); |
714 if (is_elastic_overscroll_enabled_) { | 713 if (is_elastic_overscroll_enabled_) { |
715 base::ScopedCFTypeRef<CFStringRef> key( | 714 base::ScopedCFTypeRef<CFStringRef> key( |
716 base::SysUTF8ToCFStringRef("NSScrollViewRubberbanding")); | 715 base::SysUTF8ToCFStringRef("NSScrollViewRubberbanding")); |
717 Boolean key_exists = false; | 716 Boolean key_exists = false; |
718 Boolean value = CFPreferencesGetAppBooleanValue( | 717 Boolean value = CFPreferencesGetAppBooleanValue( |
719 key, kCFPreferencesCurrentApplication, &key_exists); | 718 key, kCFPreferencesCurrentApplication, &key_exists); |
720 if (key_exists && !value) | 719 if (key_exists && !value) |
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1515 } | 1514 } |
1516 | 1515 |
1517 bool RenderThreadImpl::IsDistanceFieldTextEnabled() { | 1516 bool RenderThreadImpl::IsDistanceFieldTextEnabled() { |
1518 return is_distance_field_text_enabled_; | 1517 return is_distance_field_text_enabled_; |
1519 } | 1518 } |
1520 | 1519 |
1521 bool RenderThreadImpl::IsZeroCopyEnabled() { | 1520 bool RenderThreadImpl::IsZeroCopyEnabled() { |
1522 return is_zero_copy_enabled_; | 1521 return is_zero_copy_enabled_; |
1523 } | 1522 } |
1524 | 1523 |
1525 bool RenderThreadImpl::IsOneCopyEnabled() { | |
1526 return is_one_copy_enabled_; | |
1527 } | |
1528 | |
1529 bool RenderThreadImpl::IsElasticOverscrollEnabled() { | 1524 bool RenderThreadImpl::IsElasticOverscrollEnabled() { |
1530 return is_elastic_overscroll_enabled_; | 1525 return is_elastic_overscroll_enabled_; |
1531 } | 1526 } |
1532 | 1527 |
1533 uint32 RenderThreadImpl::GetImageTextureTarget() { | 1528 uint32 RenderThreadImpl::GetImageTextureTarget() { |
1534 return use_image_texture_target_; | 1529 return use_image_texture_target_; |
1535 } | 1530 } |
1536 | 1531 |
1537 scoped_refptr<base::SingleThreadTaskRunner> | 1532 scoped_refptr<base::SingleThreadTaskRunner> |
1538 RenderThreadImpl::GetCompositorMainThreadTaskRunner() { | 1533 RenderThreadImpl::GetCompositorMainThreadTaskRunner() { |
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1995 } | 1990 } |
1996 | 1991 |
1997 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { | 1992 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { |
1998 size_t erased = | 1993 size_t erased = |
1999 RenderThreadImpl::current()->pending_render_frame_connects_.erase( | 1994 RenderThreadImpl::current()->pending_render_frame_connects_.erase( |
2000 routing_id_); | 1995 routing_id_); |
2001 DCHECK_EQ(1u, erased); | 1996 DCHECK_EQ(1u, erased); |
2002 } | 1997 } |
2003 | 1998 |
2004 } // namespace content | 1999 } // namespace content |
OLD | NEW |