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 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
650 cc::LayerSettings layer_settings; | 650 cc::LayerSettings layer_settings; |
651 if (command_line.HasSwitch(switches::kEnableCompositorAnimationTimelines)) | 651 if (command_line.HasSwitch(switches::kEnableCompositorAnimationTimelines)) |
652 layer_settings.use_compositor_animation_timelines = true; | 652 layer_settings.use_compositor_animation_timelines = true; |
653 cc_blink::WebLayerImpl::SetLayerSettings(layer_settings); | 653 cc_blink::WebLayerImpl::SetLayerSettings(layer_settings); |
654 cc::SetClientNameForMetrics("Renderer"); | 654 cc::SetClientNameForMetrics("Renderer"); |
655 | 655 |
656 is_threaded_animation_enabled_ = | 656 is_threaded_animation_enabled_ = |
657 !command_line.HasSwitch(cc::switches::kDisableThreadedAnimation); | 657 !command_line.HasSwitch(cc::switches::kDisableThreadedAnimation); |
658 | 658 |
659 is_zero_copy_enabled_ = command_line.HasSwitch(switches::kEnableZeroCopy); | 659 is_zero_copy_enabled_ = command_line.HasSwitch(switches::kEnableZeroCopy); |
660 is_persistent_gpu_memory_buffer_enabled_ = | 660 is_partial_raster_enabled_ = |
661 command_line.HasSwitch(switches::kEnablePersistentGpuMemoryBuffer); | 661 command_line.HasSwitch(switches::kEnablePartialRaster); |
662 | 662 |
663 #if defined(OS_MACOSX) && !defined(OS_IOS) | 663 #if defined(OS_MACOSX) && !defined(OS_IOS) |
664 is_elastic_overscroll_enabled_ = base::mac::IsOSLionOrLater(); | 664 is_elastic_overscroll_enabled_ = base::mac::IsOSLionOrLater(); |
665 if (is_elastic_overscroll_enabled_) { | 665 if (is_elastic_overscroll_enabled_) { |
666 base::ScopedCFTypeRef<CFStringRef> key( | 666 base::ScopedCFTypeRef<CFStringRef> key( |
667 base::SysUTF8ToCFStringRef("NSScrollViewRubberbanding")); | 667 base::SysUTF8ToCFStringRef("NSScrollViewRubberbanding")); |
668 Boolean key_exists = false; | 668 Boolean key_exists = false; |
669 Boolean value = CFPreferencesGetAppBooleanValue( | 669 Boolean value = CFPreferencesGetAppBooleanValue( |
670 key, kCFPreferencesCurrentApplication, &key_exists); | 670 key, kCFPreferencesCurrentApplication, &key_exists); |
671 if (key_exists && !value) | 671 if (key_exists && !value) |
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1472 } | 1472 } |
1473 | 1473 |
1474 bool RenderThreadImpl::IsDistanceFieldTextEnabled() { | 1474 bool RenderThreadImpl::IsDistanceFieldTextEnabled() { |
1475 return is_distance_field_text_enabled_; | 1475 return is_distance_field_text_enabled_; |
1476 } | 1476 } |
1477 | 1477 |
1478 bool RenderThreadImpl::IsZeroCopyEnabled() { | 1478 bool RenderThreadImpl::IsZeroCopyEnabled() { |
1479 return is_zero_copy_enabled_; | 1479 return is_zero_copy_enabled_; |
1480 } | 1480 } |
1481 | 1481 |
1482 bool RenderThreadImpl::IsPersistentGpuMemoryBufferEnabled() { | 1482 bool RenderThreadImpl::IsPartialRasterEnabled() { |
1483 return is_persistent_gpu_memory_buffer_enabled_; | 1483 return is_partial_raster_enabled_; |
1484 } | 1484 } |
1485 | 1485 |
1486 bool RenderThreadImpl::IsElasticOverscrollEnabled() { | 1486 bool RenderThreadImpl::IsElasticOverscrollEnabled() { |
1487 return is_elastic_overscroll_enabled_; | 1487 return is_elastic_overscroll_enabled_; |
1488 } | 1488 } |
1489 | 1489 |
1490 std::vector<unsigned> RenderThreadImpl::GetImageTextureTargets() { | 1490 std::vector<unsigned> RenderThreadImpl::GetImageTextureTargets() { |
1491 return use_image_texture_targets_; | 1491 return use_image_texture_targets_; |
1492 } | 1492 } |
1493 | 1493 |
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1984 } | 1984 } |
1985 | 1985 |
1986 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { | 1986 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { |
1987 size_t erased = | 1987 size_t erased = |
1988 RenderThreadImpl::current()->pending_render_frame_connects_.erase( | 1988 RenderThreadImpl::current()->pending_render_frame_connects_.erase( |
1989 routing_id_); | 1989 routing_id_); |
1990 DCHECK_EQ(1u, erased); | 1990 DCHECK_EQ(1u, erased); |
1991 } | 1991 } |
1992 | 1992 |
1993 } // namespace content | 1993 } // namespace content |
OLD | NEW |