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

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

Issue 16431010: Refactor RenderProcessHost to use IPC::Listener instead of RenderWidgetHost (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase on top of hash_pair move. Created 7 years, 6 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 | Annotate | Revision Log
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.h" 5 #include "content/browser/gpu/gpu_process_host.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/base_switches.h" 8 #include "base/base_switches.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 return; 126 return;
127 } 127 }
128 128
129 int render_process_id = 0; 129 int render_process_id = 0;
130 int render_widget_id = 0; 130 int render_widget_id = 0;
131 if (!GpuSurfaceTracker::Get()->GetRenderWidgetIDForSurface( 131 if (!GpuSurfaceTracker::Get()->GetRenderWidgetIDForSurface(
132 surface_id, &render_process_id, &render_widget_id)) { 132 surface_id, &render_process_id, &render_widget_id)) {
133 RenderWidgetHostImpl::CompositorFrameDrawn(latency_info); 133 RenderWidgetHostImpl::CompositorFrameDrawn(latency_info);
134 return; 134 return;
135 } 135 }
136 RenderProcessHost* host = RenderProcessHost::FromID(render_process_id); 136 RenderWidgetHost* rwh =
137 if (!host) 137 RenderWidgetHost::FromID(render_process_id, render_widget_id);
138 return;
139 RenderWidgetHost* rwh = host->GetRenderWidgetHostByID(render_widget_id);
140 if (!rwh) 138 if (!rwh)
141 return; 139 return;
142 RenderWidgetHostImpl::From(rwh)->AcknowledgeSwapBuffersToRenderer(); 140 RenderWidgetHostImpl::From(rwh)->AcknowledgeSwapBuffersToRenderer();
143 if (interval != base::TimeDelta()) 141 if (interval != base::TimeDelta())
144 RenderWidgetHostImpl::From(rwh)->UpdateVSyncParameters(timebase, interval); 142 RenderWidgetHostImpl::From(rwh)->UpdateVSyncParameters(timebase, interval);
145 RenderWidgetHostImpl::From(rwh)->FrameSwapped(latency_info); 143 RenderWidgetHostImpl::From(rwh)->FrameSwapped(latency_info);
146 } 144 }
147 145
148 void AcceleratedSurfaceBuffersSwappedCompleted( 146 void AcceleratedSurfaceBuffersSwappedCompleted(
149 int host_id, 147 int host_id,
(...skipping 1126 matching lines...) Expand 10 before | Expand all | Expand 10 after
1276 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); 1274 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader");
1277 ClientIdToShaderCacheMap::iterator iter = 1275 ClientIdToShaderCacheMap::iterator iter =
1278 client_id_to_shader_cache_.find(client_id); 1276 client_id_to_shader_cache_.find(client_id);
1279 // If the cache doesn't exist then this is an off the record profile. 1277 // If the cache doesn't exist then this is an off the record profile.
1280 if (iter == client_id_to_shader_cache_.end()) 1278 if (iter == client_id_to_shader_cache_.end())
1281 return; 1279 return;
1282 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); 1280 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader);
1283 } 1281 }
1284 1282
1285 } // namespace content 1283 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/devtools/render_view_devtools_agent_host.cc ('k') | content/browser/gpu/gpu_process_host_ui_shim.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698