| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/gpu/render_widget_compositor.h" | 5 #include "content/renderer/gpu/render_widget_compositor.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 settings.max_untiled_layer_size = gfx::Size(max_untiled_layer_width, | 233 settings.max_untiled_layer_size = gfx::Size(max_untiled_layer_width, |
| 234 max_untiled_layer_height); | 234 max_untiled_layer_height); |
| 235 | 235 |
| 236 settings.gpu_rasterization_msaa_sample_count = | 236 settings.gpu_rasterization_msaa_sample_count = |
| 237 compositor_deps_->GetGpuRasterizationMSAASampleCount(); | 237 compositor_deps_->GetGpuRasterizationMSAASampleCount(); |
| 238 settings.impl_side_painting = compositor_deps_->IsImplSidePaintingEnabled(); | 238 settings.impl_side_painting = compositor_deps_->IsImplSidePaintingEnabled(); |
| 239 settings.gpu_rasterization_forced = | 239 settings.gpu_rasterization_forced = |
| 240 compositor_deps_->IsGpuRasterizationForced(); | 240 compositor_deps_->IsGpuRasterizationForced(); |
| 241 settings.gpu_rasterization_enabled = | 241 settings.gpu_rasterization_enabled = |
| 242 compositor_deps_->IsGpuRasterizationEnabled(); | 242 compositor_deps_->IsGpuRasterizationEnabled(); |
| 243 settings.threaded_gpu_rasterization_enabled = | 243 |
| 244 compositor_deps_->IsThreadedGpuRasterizationEnabled(); | 244 if (compositor_deps_->IsThreadedGpuRasterizationEnabled()) { |
| 245 settings.threaded_gpu_rasterization_enabled = true; |
| 246 settings.gpu_rasterization_skewport_target_time_in_seconds = 0.2f; |
| 247 } |
| 248 |
| 245 settings.can_use_lcd_text = compositor_deps_->IsLcdTextEnabled(); | 249 settings.can_use_lcd_text = compositor_deps_->IsLcdTextEnabled(); |
| 246 settings.use_distance_field_text = | 250 settings.use_distance_field_text = |
| 247 compositor_deps_->IsDistanceFieldTextEnabled(); | 251 compositor_deps_->IsDistanceFieldTextEnabled(); |
| 248 settings.use_zero_copy = compositor_deps_->IsZeroCopyEnabled(); | 252 settings.use_zero_copy = compositor_deps_->IsZeroCopyEnabled(); |
| 249 settings.use_one_copy = compositor_deps_->IsOneCopyEnabled(); | 253 settings.use_one_copy = compositor_deps_->IsOneCopyEnabled(); |
| 250 settings.enable_elastic_overscroll = | 254 settings.enable_elastic_overscroll = |
| 251 compositor_deps_->IsElasticOverscrollEnabled(); | 255 compositor_deps_->IsElasticOverscrollEnabled(); |
| 252 settings.use_image_texture_target = compositor_deps_->GetImageTextureTarget(); | 256 settings.use_image_texture_target = compositor_deps_->GetImageTextureTarget(); |
| 253 | 257 |
| 254 settings.calculate_top_controls_position = | 258 settings.calculate_top_controls_position = |
| (...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 879 widget_->OnSwapBuffersAborted(); | 883 widget_->OnSwapBuffersAborted(); |
| 880 } | 884 } |
| 881 | 885 |
| 882 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { | 886 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { |
| 883 cc::ContextProvider* provider = | 887 cc::ContextProvider* provider = |
| 884 compositor_deps_->GetSharedMainThreadContextProvider(); | 888 compositor_deps_->GetSharedMainThreadContextProvider(); |
| 885 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 889 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
| 886 } | 890 } |
| 887 | 891 |
| 888 } // namespace content | 892 } // namespace content |
| OLD | NEW |