OLD | NEW |
1 // TODO(jam): move this file to src/content once we have an interface that the | 1 // TODO(jam): move this file to src/content once we have an interface that the |
2 // embedder provides. We can then use it to get the resource and resize the | 2 // embedder provides. We can then use it to get the resource and resize the |
3 // window. | 3 // window. |
4 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 4 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
5 // Use of this source code is governed by a BSD-style license that can be | 5 // Use of this source code is governed by a BSD-style license that can be |
6 // found in the LICENSE file. | 6 // found in the LICENSE file. |
7 | 7 |
8 #include "chrome/browser/gpu_process_host_ui_shim.h" | 8 #include "chrome/browser/gpu_process_host_ui_shim.h" |
9 | 9 |
10 #include "base/id_map.h" | 10 #include "base/id_map.h" |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 // use of multiple GPU processes. | 117 // use of multiple GPU processes. |
118 if (!g_hosts_by_id.IsEmpty()) { | 118 if (!g_hosts_by_id.IsEmpty()) { |
119 IDMap<GpuProcessHostUIShim>::iterator it(&g_hosts_by_id); | 119 IDMap<GpuProcessHostUIShim>::iterator it(&g_hosts_by_id); |
120 return it.GetCurrentValue(); | 120 return it.GetCurrentValue(); |
121 } | 121 } |
122 | 122 |
123 GpuProcessHostUIShim* ui_shim(new GpuProcessHostUIShim); | 123 GpuProcessHostUIShim* ui_shim(new GpuProcessHostUIShim); |
124 | 124 |
125 // If Init succeeds, post a task to create the corresponding GpuProcessHost. | 125 // If Init succeeds, post a task to create the corresponding GpuProcessHost. |
126 // The GpuProcessHost will take ownership of the GpuProcessHostUIShim. | 126 // The GpuProcessHost will take ownership of the GpuProcessHostUIShim. |
127 BrowserThread::PostTask(BrowserThread::IO, | 127 BrowserThread::PostTask( |
128 FROM_HERE, | 128 BrowserThread::IO, |
129 NewRunnableFunction(&GpuProcessHost::Create, | 129 FROM_HERE, |
130 ui_shim->host_id_)); | 130 NewRunnableFunction( |
| 131 &GpuProcessHost::Create, |
| 132 ui_shim->host_id_, |
| 133 GpuDataManager::GetInstance()->GetGpuFeatureFlags())); |
131 | 134 |
132 return ui_shim; | 135 return ui_shim; |
133 } | 136 } |
134 | 137 |
135 // static | 138 // static |
136 void GpuProcessHostUIShim::Destroy(int host_id) { | 139 void GpuProcessHostUIShim::Destroy(int host_id) { |
137 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 140 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
138 delete FromID(host_id); | 141 delete FromID(host_id); |
139 } | 142 } |
140 | 143 |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
530 RenderViewHost* host = RenderViewHost::FromID(renderer_id, | 533 RenderViewHost* host = RenderViewHost::FromID(renderer_id, |
531 render_view_id); | 534 render_view_id); |
532 if (!host) { | 535 if (!host) { |
533 return; | 536 return; |
534 } | 537 } |
535 host->ScheduleComposite(); | 538 host->ScheduleComposite(); |
536 } | 539 } |
537 | 540 |
538 #endif | 541 #endif |
539 | 542 |
OLD | NEW |