Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Side by Side Diff: content/browser/gpu/gpu_process_host_ui_shim.cc

Issue 821133006: ozone: Dispatch GPU process IPCs to IO thread directly from GpuPlatformSupportHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/browser/gpu/gpu_process_host_ui_shim.h" 5 #include "content/browser/gpu/gpu_process_host_ui_shim.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 if (ui_shim) 106 if (ui_shim)
107 ui_shim->OnMessageReceived(msg); 107 ui_shim->OnMessageReceived(msg);
108 } 108 }
109 109
110 GpuProcessHostUIShim::GpuProcessHostUIShim(int host_id) 110 GpuProcessHostUIShim::GpuProcessHostUIShim(int host_id)
111 : host_id_(host_id) { 111 : host_id_(host_id) {
112 g_hosts_by_id.Pointer()->AddWithID(this, host_id_); 112 g_hosts_by_id.Pointer()->AddWithID(this, host_id_);
113 #if defined(USE_OZONE) 113 #if defined(USE_OZONE)
114 ui::OzonePlatform::GetInstance() 114 ui::OzonePlatform::GetInstance()
115 ->GetGpuPlatformSupportHost() 115 ->GetGpuPlatformSupportHost()
116 ->OnChannelEstablished(host_id, this); 116 ->OnChannelEstablished(
117 host_id,
118 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
119 base::Bind(&SendOnIOThreadTask, host_id_));
117 #endif 120 #endif
118 } 121 }
119 122
120 // static 123 // static
121 GpuProcessHostUIShim* GpuProcessHostUIShim::Create(int host_id) { 124 GpuProcessHostUIShim* GpuProcessHostUIShim::Create(int host_id) {
122 DCHECK(!FromID(host_id)); 125 DCHECK(!FromID(host_id));
123 return new GpuProcessHostUIShim(host_id); 126 return new GpuProcessHostUIShim(host_id);
124 } 127 }
125 128
126 // static 129 // static
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 329
327 void GpuProcessHostUIShim::OnRemoveSubscription( 330 void GpuProcessHostUIShim::OnRemoveSubscription(
328 int32 process_id, unsigned int target) { 331 int32 process_id, unsigned int target) {
329 RenderProcessHost* rph = RenderProcessHost::FromID(process_id); 332 RenderProcessHost* rph = RenderProcessHost::FromID(process_id);
330 if (rph) { 333 if (rph) {
331 rph->OnRemoveSubscription(target); 334 rph->OnRemoveSubscription(target);
332 } 335 }
333 } 336 }
334 337
335 } // namespace content 338 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | ui/ozone/platform/dri/dri_gpu_platform_support_host.h » ('j') | ui/ozone/public/ui_thread_gpu.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698