| 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" |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/strings/string_number_conversions.h" | 12 #include "base/strings/string_number_conversions.h" |
| 13 #include "base/synchronization/lock.h" | 13 #include "base/synchronization/lock.h" |
| 14 #include "base/sys_info.h" | 14 #include "base/sys_info.h" |
| 15 #include "base/time/time.h" | 15 #include "base/time/time.h" |
| 16 #include "base/values.h" | 16 #include "base/values.h" |
| 17 #include "cc/base/latency_info_swap_promise.h" | |
| 18 #include "cc/base/latency_info_swap_promise_monitor.h" | |
| 19 #include "cc/base/swap_promise.h" | |
| 20 #include "cc/base/switches.h" | 17 #include "cc/base/switches.h" |
| 21 #include "cc/blink/web_layer_impl.h" | 18 #include "cc/blink/web_layer_impl.h" |
| 22 #include "cc/debug/layer_tree_debug_state.h" | 19 #include "cc/debug/layer_tree_debug_state.h" |
| 23 #include "cc/debug/micro_benchmark.h" | 20 #include "cc/debug/micro_benchmark.h" |
| 24 #include "cc/input/layer_selection_bound.h" | 21 #include "cc/input/layer_selection_bound.h" |
| 25 #include "cc/layers/layer.h" | 22 #include "cc/layers/layer.h" |
| 26 #include "cc/output/begin_frame_args.h" | 23 #include "cc/output/begin_frame_args.h" |
| 27 #include "cc/output/copy_output_request.h" | 24 #include "cc/output/copy_output_request.h" |
| 28 #include "cc/output/copy_output_result.h" | 25 #include "cc/output/copy_output_result.h" |
| 26 #include "cc/output/latency_info_swap_promise.h" |
| 27 #include "cc/output/swap_promise.h" |
| 29 #include "cc/resources/single_release_callback.h" | 28 #include "cc/resources/single_release_callback.h" |
| 30 #include "cc/scheduler/begin_frame_source.h" | 29 #include "cc/scheduler/begin_frame_source.h" |
| 30 #include "cc/trees/latency_info_swap_promise_monitor.h" |
| 31 #include "cc/trees/layer_tree_host.h" | 31 #include "cc/trees/layer_tree_host.h" |
| 32 #include "content/common/content_switches_internal.h" | 32 #include "content/common/content_switches_internal.h" |
| 33 #include "content/common/gpu/client/context_provider_command_buffer.h" | 33 #include "content/common/gpu/client/context_provider_command_buffer.h" |
| 34 #include "content/public/common/content_switches.h" | 34 #include "content/public/common/content_switches.h" |
| 35 #include "content/renderer/input/input_handler_manager.h" | 35 #include "content/renderer/input/input_handler_manager.h" |
| 36 #include "content/renderer/scheduler/renderer_scheduler.h" | 36 #include "content/renderer/scheduler/renderer_scheduler.h" |
| 37 #include "gpu/command_buffer/client/gles2_interface.h" | 37 #include "gpu/command_buffer/client/gles2_interface.h" |
| 38 #include "third_party/WebKit/public/platform/WebCompositeAndReadbackAsyncCallbac
k.h" | 38 #include "third_party/WebKit/public/platform/WebCompositeAndReadbackAsyncCallbac
k.h" |
| 39 #include "third_party/WebKit/public/platform/WebSelectionBound.h" | 39 #include "third_party/WebKit/public/platform/WebSelectionBound.h" |
| 40 #include "third_party/WebKit/public/platform/WebSize.h" | 40 #include "third_party/WebKit/public/platform/WebSize.h" |
| (...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 905 cc::ContextProvider* provider = | 905 cc::ContextProvider* provider = |
| 906 compositor_deps_->GetSharedMainThreadContextProvider(); | 906 compositor_deps_->GetSharedMainThreadContextProvider(); |
| 907 // provider can be NULL after the GPU process crashed enough times and we | 907 // provider can be NULL after the GPU process crashed enough times and we |
| 908 // don't want to restart it any more (falling back to software). | 908 // don't want to restart it any more (falling back to software). |
| 909 if (!provider) | 909 if (!provider) |
| 910 return; | 910 return; |
| 911 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 911 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
| 912 } | 912 } |
| 913 | 913 |
| 914 } // namespace content | 914 } // namespace content |
| OLD | NEW |