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/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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 return; | 134 return; |
135 } | 135 } |
136 RenderWidgetHost* rwh = | 136 RenderWidgetHost* rwh = |
137 RenderWidgetHost::FromID(render_process_id, render_widget_id); | 137 RenderWidgetHost::FromID(render_process_id, render_widget_id); |
138 if (!rwh) | 138 if (!rwh) |
139 return; | 139 return; |
140 RenderWidgetHostImpl::From(rwh)->AcknowledgeSwapBuffersToRenderer(); | 140 RenderWidgetHostImpl::From(rwh)->AcknowledgeSwapBuffersToRenderer(); |
141 if (interval != base::TimeDelta()) | 141 if (interval != base::TimeDelta()) |
142 RenderWidgetHostImpl::From(rwh)->UpdateVSyncParameters(timebase, interval); | 142 RenderWidgetHostImpl::From(rwh)->UpdateVSyncParameters(timebase, interval); |
143 RenderWidgetHostImpl::From(rwh)->FrameSwapped(latency_info); | 143 RenderWidgetHostImpl::From(rwh)->FrameSwapped(latency_info); |
| 144 RenderWidgetHostImpl::From(rwh)->DidReceiveRendererFrame(); |
144 } | 145 } |
145 | 146 |
146 void AcceleratedSurfaceBuffersSwappedCompleted( | 147 void AcceleratedSurfaceBuffersSwappedCompleted( |
147 int host_id, | 148 int host_id, |
148 int route_id, | 149 int route_id, |
149 int surface_id, | 150 int surface_id, |
150 bool alive, | 151 bool alive, |
151 base::TimeTicks timebase, | 152 base::TimeTicks timebase, |
152 base::TimeDelta interval, | 153 base::TimeDelta interval, |
153 const ui::LatencyInfo& latency_info) { | 154 const ui::LatencyInfo& latency_info) { |
(...skipping 1115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1269 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); | 1270 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); |
1270 ClientIdToShaderCacheMap::iterator iter = | 1271 ClientIdToShaderCacheMap::iterator iter = |
1271 client_id_to_shader_cache_.find(client_id); | 1272 client_id_to_shader_cache_.find(client_id); |
1272 // If the cache doesn't exist then this is an off the record profile. | 1273 // If the cache doesn't exist then this is an off the record profile. |
1273 if (iter == client_id_to_shader_cache_.end()) | 1274 if (iter == client_id_to_shader_cache_.end()) |
1274 return; | 1275 return; |
1275 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); | 1276 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); |
1276 } | 1277 } |
1277 | 1278 |
1278 } // namespace content | 1279 } // namespace content |
OLD | NEW |