OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/compositor_output_surface.h" | 5 #include "content/renderer/gpu/compositor_output_surface.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/message_loop_proxy.h" | 8 #include "base/message_loop_proxy.h" |
9 #include "cc/output/compositor_frame.h" | 9 #include "cc/output/compositor_frame.h" |
10 #include "cc/output/compositor_frame_ack.h" | 10 #include "cc/output/compositor_frame_ack.h" |
11 #include "cc/output/output_surface_client.h" | 11 #include "cc/output/output_surface_client.h" |
12 #include "content/common/gpu/client/command_buffer_proxy_impl.h" | 12 #include "content/common/gpu/client/command_buffer_proxy_impl.h" |
13 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" | 13 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" |
14 #include "content/common/view_messages.h" | 14 #include "content/common/view_messages.h" |
15 #include "content/public/common/content_switches.h" | 15 #include "content/public/common/content_switches.h" |
16 #include "content/renderer/render_thread_impl.h" | 16 #include "content/renderer/render_thread_impl.h" |
17 #include "ipc/ipc_forwarding_message_filter.h" | 17 #include "ipc/ipc_forwarding_message_filter.h" |
18 #include "ipc/ipc_sync_channel.h" | 18 #include "ipc/ipc_sync_channel.h" |
19 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3
D.h" | 19 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" |
20 | 20 |
21 #if defined(OS_ANDROID) | 21 #if defined(OS_ANDROID) |
22 // TODO(epenner): Move thread priorities to base. (crbug.com/170549) | 22 // TODO(epenner): Move thread priorities to base. (crbug.com/170549) |
23 #include <sys/resource.h> | 23 #include <sys/resource.h> |
24 #endif | 24 #endif |
25 | 25 |
26 using WebKit::WebGraphicsContext3D; | 26 using WebKit::WebGraphicsContext3D; |
27 | 27 |
28 namespace { | 28 namespace { |
29 // There are several compositor surfaces in a process, but they share the same | 29 // There are several compositor surfaces in a process, but they share the same |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 // If this is the last surface to stop preferring smoothness, | 203 // If this is the last surface to stop preferring smoothness, |
204 // Reset the main thread's priority to the default. | 204 // Reset the main thread's priority to the default. |
205 if (prefers_smoothness_ == true && | 205 if (prefers_smoothness_ == true && |
206 --g_prefer_smoothness_count == 0) { | 206 --g_prefer_smoothness_count == 0) { |
207 SetThreadsPriorityToDefault(main_thread_id_); | 207 SetThreadsPriorityToDefault(main_thread_id_); |
208 } | 208 } |
209 prefers_smoothness_ = prefers_smoothness; | 209 prefers_smoothness_ = prefers_smoothness; |
210 } | 210 } |
211 | 211 |
212 } // namespace content | 212 } // namespace content |
OLD | NEW |