| 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 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 645 | 645 |
| 646 cc::LayerSettings layer_settings; | 646 cc::LayerSettings layer_settings; |
| 647 if (command_line.HasSwitch(switches::kEnableCompositorAnimationTimelines)) | 647 if (command_line.HasSwitch(switches::kEnableCompositorAnimationTimelines)) |
| 648 layer_settings.use_compositor_animation_timelines = true; | 648 layer_settings.use_compositor_animation_timelines = true; |
| 649 cc_blink::WebLayerImpl::SetLayerSettings(layer_settings); | 649 cc_blink::WebLayerImpl::SetLayerSettings(layer_settings); |
| 650 | 650 |
| 651 is_threaded_animation_enabled_ = | 651 is_threaded_animation_enabled_ = |
| 652 !command_line.HasSwitch(cc::switches::kDisableThreadedAnimation); | 652 !command_line.HasSwitch(cc::switches::kDisableThreadedAnimation); |
| 653 | 653 |
| 654 is_zero_copy_enabled_ = command_line.HasSwitch(switches::kEnableZeroCopy); | 654 is_zero_copy_enabled_ = command_line.HasSwitch(switches::kEnableZeroCopy); |
| 655 is_one_copy_enabled_ = !command_line.HasSwitch(switches::kDisableOneCopy); | |
| 656 is_persistent_gpu_memory_buffer_enabled_ = | 655 is_persistent_gpu_memory_buffer_enabled_ = |
| 657 command_line.HasSwitch(switches::kEnablePersistentGpuMemoryBuffer); | 656 command_line.HasSwitch(switches::kEnablePersistentGpuMemoryBuffer); |
| 658 | 657 |
| 659 #if defined(OS_MACOSX) && !defined(OS_IOS) | 658 #if defined(OS_MACOSX) && !defined(OS_IOS) |
| 660 is_elastic_overscroll_enabled_ = base::mac::IsOSLionOrLater(); | 659 is_elastic_overscroll_enabled_ = base::mac::IsOSLionOrLater(); |
| 661 if (is_elastic_overscroll_enabled_) { | 660 if (is_elastic_overscroll_enabled_) { |
| 662 base::ScopedCFTypeRef<CFStringRef> key( | 661 base::ScopedCFTypeRef<CFStringRef> key( |
| 663 base::SysUTF8ToCFStringRef("NSScrollViewRubberbanding")); | 662 base::SysUTF8ToCFStringRef("NSScrollViewRubberbanding")); |
| 664 Boolean key_exists = false; | 663 Boolean key_exists = false; |
| 665 Boolean value = CFPreferencesGetAppBooleanValue( | 664 Boolean value = CFPreferencesGetAppBooleanValue( |
| (...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1476 } | 1475 } |
| 1477 | 1476 |
| 1478 bool RenderThreadImpl::IsDistanceFieldTextEnabled() { | 1477 bool RenderThreadImpl::IsDistanceFieldTextEnabled() { |
| 1479 return is_distance_field_text_enabled_; | 1478 return is_distance_field_text_enabled_; |
| 1480 } | 1479 } |
| 1481 | 1480 |
| 1482 bool RenderThreadImpl::IsZeroCopyEnabled() { | 1481 bool RenderThreadImpl::IsZeroCopyEnabled() { |
| 1483 return is_zero_copy_enabled_; | 1482 return is_zero_copy_enabled_; |
| 1484 } | 1483 } |
| 1485 | 1484 |
| 1486 bool RenderThreadImpl::IsOneCopyEnabled() { | |
| 1487 return is_one_copy_enabled_; | |
| 1488 } | |
| 1489 | |
| 1490 bool RenderThreadImpl::IsPersistentGpuMemoryBufferEnabled() { | 1485 bool RenderThreadImpl::IsPersistentGpuMemoryBufferEnabled() { |
| 1491 return is_persistent_gpu_memory_buffer_enabled_; | 1486 return is_persistent_gpu_memory_buffer_enabled_; |
| 1492 } | 1487 } |
| 1493 | 1488 |
| 1494 bool RenderThreadImpl::IsElasticOverscrollEnabled() { | 1489 bool RenderThreadImpl::IsElasticOverscrollEnabled() { |
| 1495 return is_elastic_overscroll_enabled_; | 1490 return is_elastic_overscroll_enabled_; |
| 1496 } | 1491 } |
| 1497 | 1492 |
| 1498 std::vector<unsigned> RenderThreadImpl::GetImageTextureTargets() { | 1493 std::vector<unsigned> RenderThreadImpl::GetImageTextureTargets() { |
| 1499 return use_image_texture_targets_; | 1494 return use_image_texture_targets_; |
| (...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1959 } | 1954 } |
| 1960 | 1955 |
| 1961 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { | 1956 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { |
| 1962 size_t erased = | 1957 size_t erased = |
| 1963 RenderThreadImpl::current()->pending_render_frame_connects_.erase( | 1958 RenderThreadImpl::current()->pending_render_frame_connects_.erase( |
| 1964 routing_id_); | 1959 routing_id_); |
| 1965 DCHECK_EQ(1u, erased); | 1960 DCHECK_EQ(1u, erased); |
| 1966 } | 1961 } |
| 1967 | 1962 |
| 1968 } // namespace content | 1963 } // namespace content |
| OLD | NEW |