| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_ | 5 #ifndef CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_ |
| 6 #define CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_ | 6 #define CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <queue> | 10 #include <queue> |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 int host_id_; | 119 int host_id_; |
| 120 | 120 |
| 121 // These are the channel requests that we have already sent to | 121 // These are the channel requests that we have already sent to |
| 122 // the GPU process, but haven't heard back about yet. | 122 // the GPU process, but haven't heard back about yet. |
| 123 std::queue<linked_ptr<EstablishChannelCallback> > channel_requests_; | 123 std::queue<linked_ptr<EstablishChannelCallback> > channel_requests_; |
| 124 | 124 |
| 125 // The pending create command buffer requests we need to reply to. | 125 // The pending create command buffer requests we need to reply to. |
| 126 std::queue<linked_ptr<CreateCommandBufferCallback> > | 126 std::queue<linked_ptr<CreateCommandBufferCallback> > |
| 127 create_command_buffer_requests_; | 127 create_command_buffer_requests_; |
| 128 | 128 |
| 129 #if defined(TOOLKIT_USES_GTK) && !defined(TOUCH_UI) | 129 #if defined(TOOLKIT_USES_GTK) |
| 130 typedef std::pair<int32 /* renderer_id */, | 130 typedef std::pair<int32 /* renderer_id */, |
| 131 int32 /* render_view_id */> ViewID; | 131 int32 /* render_view_id */> ViewID; |
| 132 | 132 |
| 133 // Encapsulates surfaces that we lock when creating view command buffers. | 133 // Encapsulates surfaces that we lock when creating view command buffers. |
| 134 // We release this lock once the command buffer (or associated GPU process) | 134 // We release this lock once the command buffer (or associated GPU process) |
| 135 // is destroyed. This prevents the browser from destroying the surface | 135 // is destroyed. This prevents the browser from destroying the surface |
| 136 // while the GPU process is drawing to it. | 136 // while the GPU process is drawing to it. |
| 137 | 137 |
| 138 // Multimap is used to simulate reference counting, see comment in | 138 // Multimap is used to simulate reference counting, see comment in |
| 139 // GpuProcessHostUIShim::CreateViewCommandBuffer. | 139 // GpuProcessHostUIShim::CreateViewCommandBuffer. |
| (...skipping 18 matching lines...) Expand all Loading... |
| 158 | 158 |
| 159 // Master switch for enabling/disabling GPU acceleration for the current | 159 // Master switch for enabling/disabling GPU acceleration for the current |
| 160 // browser session. It does not change the acceleration settings for | 160 // browser session. It does not change the acceleration settings for |
| 161 // existing tabs, just the future ones. | 161 // existing tabs, just the future ones. |
| 162 CONTENT_EXPORT static bool gpu_enabled_; | 162 CONTENT_EXPORT static bool gpu_enabled_; |
| 163 | 163 |
| 164 DISALLOW_COPY_AND_ASSIGN(GpuProcessHost); | 164 DISALLOW_COPY_AND_ASSIGN(GpuProcessHost); |
| 165 }; | 165 }; |
| 166 | 166 |
| 167 #endif // CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_ | 167 #endif // CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_ |
| OLD | NEW |