| 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 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 656 cc::LayerSettings layer_settings; | 656 cc::LayerSettings layer_settings; |
| 657 if (command_line.HasSwitch(switches::kEnableCompositorAnimationTimelines)) | 657 if (command_line.HasSwitch(switches::kEnableCompositorAnimationTimelines)) |
| 658 layer_settings.use_compositor_animation_timelines = true; | 658 layer_settings.use_compositor_animation_timelines = true; |
| 659 cc_blink::WebLayerImpl::SetLayerSettings(layer_settings); | 659 cc_blink::WebLayerImpl::SetLayerSettings(layer_settings); |
| 660 cc::SetClientNameForMetrics("Renderer"); | 660 cc::SetClientNameForMetrics("Renderer"); |
| 661 | 661 |
| 662 is_threaded_animation_enabled_ = | 662 is_threaded_animation_enabled_ = |
| 663 !command_line.HasSwitch(cc::switches::kDisableThreadedAnimation); | 663 !command_line.HasSwitch(cc::switches::kDisableThreadedAnimation); |
| 664 | 664 |
| 665 is_zero_copy_enabled_ = command_line.HasSwitch(switches::kEnableZeroCopy); | 665 is_zero_copy_enabled_ = command_line.HasSwitch(switches::kEnableZeroCopy); |
| 666 is_persistent_gpu_memory_buffer_enabled_ = | 666 is_partial_raster_enabled_ = |
| 667 command_line.HasSwitch(switches::kEnablePersistentGpuMemoryBuffer); | 667 command_line.HasSwitch(switches::kEnablePartialRaster); |
| 668 | 668 |
| 669 #if defined(OS_MACOSX) && !defined(OS_IOS) | 669 #if defined(OS_MACOSX) && !defined(OS_IOS) |
| 670 is_elastic_overscroll_enabled_ = base::mac::IsOSLionOrLater(); | 670 is_elastic_overscroll_enabled_ = base::mac::IsOSLionOrLater(); |
| 671 if (is_elastic_overscroll_enabled_) { | 671 if (is_elastic_overscroll_enabled_) { |
| 672 base::ScopedCFTypeRef<CFStringRef> key( | 672 base::ScopedCFTypeRef<CFStringRef> key( |
| 673 base::SysUTF8ToCFStringRef("NSScrollViewRubberbanding")); | 673 base::SysUTF8ToCFStringRef("NSScrollViewRubberbanding")); |
| 674 Boolean key_exists = false; | 674 Boolean key_exists = false; |
| 675 Boolean value = CFPreferencesGetAppBooleanValue( | 675 Boolean value = CFPreferencesGetAppBooleanValue( |
| 676 key, kCFPreferencesCurrentApplication, &key_exists); | 676 key, kCFPreferencesCurrentApplication, &key_exists); |
| 677 if (key_exists && !value) | 677 if (key_exists && !value) |
| (...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1479 } | 1479 } |
| 1480 | 1480 |
| 1481 bool RenderThreadImpl::IsDistanceFieldTextEnabled() { | 1481 bool RenderThreadImpl::IsDistanceFieldTextEnabled() { |
| 1482 return is_distance_field_text_enabled_; | 1482 return is_distance_field_text_enabled_; |
| 1483 } | 1483 } |
| 1484 | 1484 |
| 1485 bool RenderThreadImpl::IsZeroCopyEnabled() { | 1485 bool RenderThreadImpl::IsZeroCopyEnabled() { |
| 1486 return is_zero_copy_enabled_; | 1486 return is_zero_copy_enabled_; |
| 1487 } | 1487 } |
| 1488 | 1488 |
| 1489 bool RenderThreadImpl::IsPersistentGpuMemoryBufferEnabled() { | 1489 bool RenderThreadImpl::IsPartialRasterEnabled() { |
| 1490 return is_persistent_gpu_memory_buffer_enabled_; | 1490 return is_partial_raster_enabled_; |
| 1491 } | 1491 } |
| 1492 | 1492 |
| 1493 bool RenderThreadImpl::IsElasticOverscrollEnabled() { | 1493 bool RenderThreadImpl::IsElasticOverscrollEnabled() { |
| 1494 return is_elastic_overscroll_enabled_; | 1494 return is_elastic_overscroll_enabled_; |
| 1495 } | 1495 } |
| 1496 | 1496 |
| 1497 std::vector<unsigned> RenderThreadImpl::GetImageTextureTargets() { | 1497 std::vector<unsigned> RenderThreadImpl::GetImageTextureTargets() { |
| 1498 return use_image_texture_targets_; | 1498 return use_image_texture_targets_; |
| 1499 } | 1499 } |
| 1500 | 1500 |
| (...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1991 } | 1991 } |
| 1992 | 1992 |
| 1993 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { | 1993 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { |
| 1994 size_t erased = | 1994 size_t erased = |
| 1995 RenderThreadImpl::current()->pending_render_frame_connects_.erase( | 1995 RenderThreadImpl::current()->pending_render_frame_connects_.erase( |
| 1996 routing_id_); | 1996 routing_id_); |
| 1997 DCHECK_EQ(1u, erased); | 1997 DCHECK_EQ(1u, erased); |
| 1998 } | 1998 } |
| 1999 | 1999 |
| 2000 } // namespace content | 2000 } // namespace content |
| OLD | NEW |