| 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 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 layer_settings.use_compositor_animation_timelines = true; | 698 layer_settings.use_compositor_animation_timelines = true; |
| 699 cc_blink::WebLayerImpl::SetLayerSettings(layer_settings); | 699 cc_blink::WebLayerImpl::SetLayerSettings(layer_settings); |
| 700 cc::SetClientNameForMetrics("Renderer"); | 700 cc::SetClientNameForMetrics("Renderer"); |
| 701 | 701 |
| 702 is_threaded_animation_enabled_ = | 702 is_threaded_animation_enabled_ = |
| 703 !command_line.HasSwitch(cc::switches::kDisableThreadedAnimation); | 703 !command_line.HasSwitch(cc::switches::kDisableThreadedAnimation); |
| 704 | 704 |
| 705 is_zero_copy_enabled_ = command_line.HasSwitch(switches::kEnableZeroCopy); | 705 is_zero_copy_enabled_ = command_line.HasSwitch(switches::kEnableZeroCopy); |
| 706 is_partial_raster_enabled_ = | 706 is_partial_raster_enabled_ = |
| 707 command_line.HasSwitch(switches::kEnablePartialRaster); | 707 command_line.HasSwitch(switches::kEnablePartialRaster); |
| 708 is_gpu_memory_buffer_compositor_resources_enabled_ = command_line.HasSwitch( |
| 709 switches::kEnableGpuMemoryBufferCompositorResources); |
| 708 | 710 |
| 709 #if defined(OS_MACOSX) && !defined(OS_IOS) | 711 #if defined(OS_MACOSX) && !defined(OS_IOS) |
| 710 is_elastic_overscroll_enabled_ = base::mac::IsOSLionOrLater(); | 712 is_elastic_overscroll_enabled_ = base::mac::IsOSLionOrLater(); |
| 711 if (is_elastic_overscroll_enabled_) { | 713 if (is_elastic_overscroll_enabled_) { |
| 712 base::ScopedCFTypeRef<CFStringRef> key( | 714 base::ScopedCFTypeRef<CFStringRef> key( |
| 713 base::SysUTF8ToCFStringRef("NSScrollViewRubberbanding")); | 715 base::SysUTF8ToCFStringRef("NSScrollViewRubberbanding")); |
| 714 Boolean key_exists = false; | 716 Boolean key_exists = false; |
| 715 Boolean value = CFPreferencesGetAppBooleanValue( | 717 Boolean value = CFPreferencesGetAppBooleanValue( |
| 716 key, kCFPreferencesCurrentApplication, &key_exists); | 718 key, kCFPreferencesCurrentApplication, &key_exists); |
| 717 if (key_exists && !value) | 719 if (key_exists && !value) |
| (...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1496 } | 1498 } |
| 1497 | 1499 |
| 1498 bool RenderThreadImpl::IsZeroCopyEnabled() { | 1500 bool RenderThreadImpl::IsZeroCopyEnabled() { |
| 1499 return is_zero_copy_enabled_; | 1501 return is_zero_copy_enabled_; |
| 1500 } | 1502 } |
| 1501 | 1503 |
| 1502 bool RenderThreadImpl::IsPartialRasterEnabled() { | 1504 bool RenderThreadImpl::IsPartialRasterEnabled() { |
| 1503 return is_partial_raster_enabled_; | 1505 return is_partial_raster_enabled_; |
| 1504 } | 1506 } |
| 1505 | 1507 |
| 1508 bool RenderThreadImpl::IsGpuMemoryBufferCompositorResourcesEnabled() { |
| 1509 return is_gpu_memory_buffer_compositor_resources_enabled_; |
| 1510 } |
| 1511 |
| 1506 bool RenderThreadImpl::IsElasticOverscrollEnabled() { | 1512 bool RenderThreadImpl::IsElasticOverscrollEnabled() { |
| 1507 return is_elastic_overscroll_enabled_; | 1513 return is_elastic_overscroll_enabled_; |
| 1508 } | 1514 } |
| 1509 | 1515 |
| 1510 std::vector<unsigned> RenderThreadImpl::GetImageTextureTargets() { | 1516 std::vector<unsigned> RenderThreadImpl::GetImageTextureTargets() { |
| 1511 return use_image_texture_targets_; | 1517 return use_image_texture_targets_; |
| 1512 } | 1518 } |
| 1513 | 1519 |
| 1514 scoped_refptr<base::SingleThreadTaskRunner> | 1520 scoped_refptr<base::SingleThreadTaskRunner> |
| 1515 RenderThreadImpl::GetCompositorMainThreadTaskRunner() { | 1521 RenderThreadImpl::GetCompositorMainThreadTaskRunner() { |
| (...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2001 } | 2007 } |
| 2002 | 2008 |
| 2003 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { | 2009 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { |
| 2004 size_t erased = | 2010 size_t erased = |
| 2005 RenderThreadImpl::current()->pending_render_frame_connects_.erase( | 2011 RenderThreadImpl::current()->pending_render_frame_connects_.erase( |
| 2006 routing_id_); | 2012 routing_id_); |
| 2007 DCHECK_EQ(1u, erased); | 2013 DCHECK_EQ(1u, erased); |
| 2008 } | 2014 } |
| 2009 | 2015 |
| 2010 } // namespace content | 2016 } // namespace content |
| OLD | NEW |