| 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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 int max_untiled_layer_height = settings.max_untiled_layer_size.height(); | 225 int max_untiled_layer_height = settings.max_untiled_layer_size.height(); |
| 226 if (cmd->HasSwitch(switches::kMaxUntiledLayerHeight)) { | 226 if (cmd->HasSwitch(switches::kMaxUntiledLayerHeight)) { |
| 227 GetSwitchValueAsInt(*cmd, switches::kMaxUntiledLayerHeight, 1, | 227 GetSwitchValueAsInt(*cmd, switches::kMaxUntiledLayerHeight, 1, |
| 228 std::numeric_limits<int>::max(), | 228 std::numeric_limits<int>::max(), |
| 229 &max_untiled_layer_height); | 229 &max_untiled_layer_height); |
| 230 } | 230 } |
| 231 | 231 |
| 232 settings.max_untiled_layer_size = gfx::Size(max_untiled_layer_width, | 232 settings.max_untiled_layer_size = gfx::Size(max_untiled_layer_width, |
| 233 max_untiled_layer_height); | 233 max_untiled_layer_height); |
| 234 | 234 |
| 235 settings.gpu_rasterization_msaa_sample_count = |
| 236 compositor_deps_->GpuRasterizationMSAASampleCount(); |
| 235 settings.impl_side_painting = compositor_deps_->IsImplSidePaintingEnabled(); | 237 settings.impl_side_painting = compositor_deps_->IsImplSidePaintingEnabled(); |
| 236 settings.gpu_rasterization_forced = | 238 settings.gpu_rasterization_forced = |
| 237 compositor_deps_->IsGpuRasterizationForced(); | 239 compositor_deps_->IsGpuRasterizationForced(); |
| 238 settings.gpu_rasterization_enabled = | 240 settings.gpu_rasterization_enabled = |
| 239 compositor_deps_->IsGpuRasterizationEnabled(); | 241 compositor_deps_->IsGpuRasterizationEnabled(); |
| 240 settings.can_use_lcd_text = compositor_deps_->IsLcdTextEnabled(); | 242 settings.can_use_lcd_text = compositor_deps_->IsLcdTextEnabled(); |
| 241 settings.use_distance_field_text = | 243 settings.use_distance_field_text = |
| 242 compositor_deps_->IsDistanceFieldTextEnabled(); | 244 compositor_deps_->IsDistanceFieldTextEnabled(); |
| 243 settings.use_zero_copy = compositor_deps_->IsZeroCopyEnabled(); | 245 settings.use_zero_copy = compositor_deps_->IsZeroCopyEnabled(); |
| 244 settings.use_one_copy = compositor_deps_->IsOneCopyEnabled(); | 246 settings.use_one_copy = compositor_deps_->IsOneCopyEnabled(); |
| (...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 870 widget_->OnSwapBuffersAborted(); | 872 widget_->OnSwapBuffersAborted(); |
| 871 } | 873 } |
| 872 | 874 |
| 873 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { | 875 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { |
| 874 cc::ContextProvider* provider = | 876 cc::ContextProvider* provider = |
| 875 compositor_deps_->GetSharedMainThreadContextProvider(); | 877 compositor_deps_->GetSharedMainThreadContextProvider(); |
| 876 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 878 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
| 877 } | 879 } |
| 878 | 880 |
| 879 } // namespace content | 881 } // namespace content |
| OLD | NEW |