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 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
436 // When pinching in, only show the pinch-viewport overlay scrollbars if the | 436 // When pinching in, only show the pinch-viewport overlay scrollbars if the |
437 // page scale is at least some threshold away from the minimum. i.e. don't | 437 // page scale is at least some threshold away from the minimum. i.e. don't |
438 // show the pinch scrollbars when at minimum scale. | 438 // show the pinch scrollbars when at minimum scale. |
439 settings.scrollbar_show_scale_threshold = 1.05f; | 439 settings.scrollbar_show_scale_threshold = 1.05f; |
440 #endif | 440 #endif |
441 | 441 |
442 if (cmd->HasSwitch(switches::kEnableLowResTiling)) | 442 if (cmd->HasSwitch(switches::kEnableLowResTiling)) |
443 settings.create_low_res_tiling = true; | 443 settings.create_low_res_tiling = true; |
444 if (cmd->HasSwitch(switches::kDisableLowResTiling)) | 444 if (cmd->HasSwitch(switches::kDisableLowResTiling)) |
445 settings.create_low_res_tiling = false; | 445 settings.create_low_res_tiling = false; |
446 if (cmd->HasSwitch(switches::kEnableBeginFrameScheduling)) | 446 if (cmd->HasSwitch(cc::switches::kEnableBeginFrameScheduling)) |
447 settings.use_external_begin_frame_source = true; | 447 settings.use_external_begin_frame_source = true; |
448 | 448 |
449 if (widget_->for_oopif()) { | 449 if (widget_->for_oopif()) { |
450 // TODO(simonhong): Apply BeginFrame scheduling for OOPIF. | 450 // TODO(simonhong): Apply BeginFrame scheduling for OOPIF. |
451 // See crbug.com/471411. | 451 // See crbug.com/471411. |
452 settings.use_external_begin_frame_source = false; | 452 settings.use_external_begin_frame_source = false; |
453 } | 453 } |
454 | 454 |
455 scoped_refptr<base::SingleThreadTaskRunner> compositor_thread_task_runner = | 455 scoped_refptr<base::SingleThreadTaskRunner> compositor_thread_task_runner = |
456 compositor_deps_->GetCompositorImplThreadTaskRunner(); | 456 compositor_deps_->GetCompositorImplThreadTaskRunner(); |
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
964 return; | 964 return; |
965 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 965 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
966 } | 966 } |
967 | 967 |
968 void RenderWidgetCompositor::SetSurfaceIdNamespace( | 968 void RenderWidgetCompositor::SetSurfaceIdNamespace( |
969 uint32_t surface_id_namespace) { | 969 uint32_t surface_id_namespace) { |
970 layer_tree_host_->set_surface_id_namespace(surface_id_namespace); | 970 layer_tree_host_->set_surface_id_namespace(surface_id_namespace); |
971 } | 971 } |
972 | 972 |
973 } // namespace content | 973 } // namespace content |
OLD | NEW |