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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 settings.gpu_rasterization_enabled = | 300 settings.gpu_rasterization_enabled = |
301 compositor_deps_->IsGpuRasterizationEnabled(); | 301 compositor_deps_->IsGpuRasterizationEnabled(); |
302 | 302 |
303 settings.can_use_lcd_text = compositor_deps_->IsLcdTextEnabled(); | 303 settings.can_use_lcd_text = compositor_deps_->IsLcdTextEnabled(); |
304 settings.use_distance_field_text = | 304 settings.use_distance_field_text = |
305 compositor_deps_->IsDistanceFieldTextEnabled(); | 305 compositor_deps_->IsDistanceFieldTextEnabled(); |
306 settings.use_zero_copy = compositor_deps_->IsZeroCopyEnabled(); | 306 settings.use_zero_copy = compositor_deps_->IsZeroCopyEnabled(); |
307 settings.use_one_copy = compositor_deps_->IsOneCopyEnabled(); | 307 settings.use_one_copy = compositor_deps_->IsOneCopyEnabled(); |
308 settings.enable_elastic_overscroll = | 308 settings.enable_elastic_overscroll = |
309 compositor_deps_->IsElasticOverscrollEnabled(); | 309 compositor_deps_->IsElasticOverscrollEnabled(); |
310 settings.use_image_texture_target = compositor_deps_->GetImageTextureTarget(); | 310 settings.use_image_texture_targets = |
| 311 compositor_deps_->GetImageTextureTargets(); |
311 settings.gather_pixel_refs = compositor_deps_->IsGatherPixelRefsEnabled(); | 312 settings.gather_pixel_refs = compositor_deps_->IsGatherPixelRefsEnabled(); |
312 | 313 |
313 if (cmd->HasSwitch(cc::switches::kTopControlsShowThreshold)) { | 314 if (cmd->HasSwitch(cc::switches::kTopControlsShowThreshold)) { |
314 std::string top_threshold_str = | 315 std::string top_threshold_str = |
315 cmd->GetSwitchValueASCII(cc::switches::kTopControlsShowThreshold); | 316 cmd->GetSwitchValueASCII(cc::switches::kTopControlsShowThreshold); |
316 double show_threshold; | 317 double show_threshold; |
317 if (base::StringToDouble(top_threshold_str, &show_threshold) && | 318 if (base::StringToDouble(top_threshold_str, &show_threshold) && |
318 show_threshold >= 0.f && show_threshold <= 1.f) | 319 show_threshold >= 0.f && show_threshold <= 1.f) |
319 settings.top_controls_show_threshold = show_threshold; | 320 settings.top_controls_show_threshold = show_threshold; |
320 } | 321 } |
(...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1047 return; | 1048 return; |
1048 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 1049 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
1049 } | 1050 } |
1050 | 1051 |
1051 void RenderWidgetCompositor::SetSurfaceIdNamespace( | 1052 void RenderWidgetCompositor::SetSurfaceIdNamespace( |
1052 uint32_t surface_id_namespace) { | 1053 uint32_t surface_id_namespace) { |
1053 layer_tree_host_->set_surface_id_namespace(surface_id_namespace); | 1054 layer_tree_host_->set_surface_id_namespace(surface_id_namespace); |
1054 } | 1055 } |
1055 | 1056 |
1056 } // namespace content | 1057 } // namespace content |
OLD | NEW |