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

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

Issue 123563002: Remove gpu side LatencyInfo merging (Closed) Base URL: http://git.chromium.org/chromium/src.git@gpu-per-event-latency-6-small
Patch Set: Sending LatencyInfo back to View through SendAcceleratedSurfaceBuffersSwapped Created 6 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.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/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 } 124 }
125 } 125 }
126 126
127 #if defined(OS_WIN) 127 #if defined(OS_WIN)
128 // This sends a ViewMsg_SwapBuffers_ACK directly to the renderer process 128 // This sends a ViewMsg_SwapBuffers_ACK directly to the renderer process
129 // (RenderWidget). 129 // (RenderWidget).
130 void AcceleratedSurfaceBuffersSwappedCompletedForRenderer( 130 void AcceleratedSurfaceBuffersSwappedCompletedForRenderer(
131 int surface_id, 131 int surface_id,
132 base::TimeTicks timebase, 132 base::TimeTicks timebase,
133 base::TimeDelta interval, 133 base::TimeDelta interval,
134 const ui::LatencyInfo& latency_info) { 134 const std::vector<ui::LatencyInfo>& latency_info) {
135 if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) { 135 if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
136 BrowserThread::PostTask( 136 BrowserThread::PostTask(
137 BrowserThread::UI, 137 BrowserThread::UI,
138 FROM_HERE, 138 FROM_HERE,
139 base::Bind(&AcceleratedSurfaceBuffersSwappedCompletedForRenderer, 139 base::Bind(&AcceleratedSurfaceBuffersSwappedCompletedForRenderer,
140 surface_id, timebase, interval, latency_info)); 140 surface_id, timebase, interval, latency_info));
141 return; 141 return;
142 } 142 }
143 143
144 int render_process_id = 0; 144 int render_process_id = 0;
(...skipping 14 matching lines...) Expand all
159 RenderWidgetHostImpl::From(rwh)->DidReceiveRendererFrame(); 159 RenderWidgetHostImpl::From(rwh)->DidReceiveRendererFrame();
160 } 160 }
161 161
162 void AcceleratedSurfaceBuffersSwappedCompleted( 162 void AcceleratedSurfaceBuffersSwappedCompleted(
163 int host_id, 163 int host_id,
164 int route_id, 164 int route_id,
165 int surface_id, 165 int surface_id,
166 bool alive, 166 bool alive,
167 base::TimeTicks timebase, 167 base::TimeTicks timebase,
168 base::TimeDelta interval, 168 base::TimeDelta interval,
169 const ui::LatencyInfo& latency_info) { 169 const std::vector<ui::LatencyInfo>& latency_info) {
170 AcceleratedSurfaceBuffersSwappedCompletedForGPU( 170 AcceleratedSurfaceBuffersSwappedCompletedForGPU(
171 host_id, route_id, alive, timebase, interval); 171 host_id, route_id, alive, timebase, interval);
172 AcceleratedSurfaceBuffersSwappedCompletedForRenderer( 172 AcceleratedSurfaceBuffersSwappedCompletedForRenderer(
173 surface_id, timebase, interval, latency_info); 173 surface_id, timebase, interval, latency_info);
174 } 174 }
175 175
176 // NOTE: changes to this class need to be reviewed by the security team. 176 // NOTE: changes to this class need to be reviewed by the security team.
177 class GpuSandboxedProcessLauncherDelegate 177 class GpuSandboxedProcessLauncherDelegate
178 : public SandboxedProcessLauncherDelegate { 178 : public SandboxedProcessLauncherDelegate {
179 public: 179 public:
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
924 #endif // OS_MACOSX 924 #endif // OS_MACOSX
925 925
926 #if defined(OS_WIN) 926 #if defined(OS_WIN)
927 void GpuProcessHost::OnAcceleratedSurfaceBuffersSwapped( 927 void GpuProcessHost::OnAcceleratedSurfaceBuffersSwapped(
928 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params) { 928 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params) {
929 TRACE_EVENT0("gpu", "GpuProcessHost::OnAcceleratedSurfaceBuffersSwapped"); 929 TRACE_EVENT0("gpu", "GpuProcessHost::OnAcceleratedSurfaceBuffersSwapped");
930 930
931 base::ScopedClosureRunner scoped_completion_runner( 931 base::ScopedClosureRunner scoped_completion_runner(
932 base::Bind(&AcceleratedSurfaceBuffersSwappedCompleted, 932 base::Bind(&AcceleratedSurfaceBuffersSwappedCompleted,
933 host_id_, params.route_id, params.surface_id, 933 host_id_, params.route_id, params.surface_id,
934 true, base::TimeTicks(), base::TimeDelta(), ui::LatencyInfo())); 934 true, base::TimeTicks(), base::TimeDelta(),
935 std::vector<ui::LatencyInfo>()));
935 936
936 gfx::GLSurfaceHandle handle = 937 gfx::GLSurfaceHandle handle =
937 GpuSurfaceTracker::Get()->GetSurfaceHandle(params.surface_id); 938 GpuSurfaceTracker::Get()->GetSurfaceHandle(params.surface_id);
938 939
939 if (handle.is_null()) 940 if (handle.is_null())
940 return; 941 return;
941 942
942 if (handle.transport_type == gfx::TEXTURE_TRANSPORT) { 943 if (handle.transport_type == gfx::TEXTURE_TRANSPORT) {
943 TRACE_EVENT1("gpu", "SurfaceIDNotFound_RoutingToUI", 944 TRACE_EVENT1("gpu", "SurfaceIDNotFound_RoutingToUI",
944 "surface_id", params.surface_id); 945 "surface_id", params.surface_id);
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
1257 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); 1258 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader");
1258 ClientIdToShaderCacheMap::iterator iter = 1259 ClientIdToShaderCacheMap::iterator iter =
1259 client_id_to_shader_cache_.find(client_id); 1260 client_id_to_shader_cache_.find(client_id);
1260 // If the cache doesn't exist then this is an off the record profile. 1261 // If the cache doesn't exist then this is an off the record profile.
1261 if (iter == client_id_to_shader_cache_.end()) 1262 if (iter == client_id_to_shader_cache_.end())
1262 return; 1263 return;
1263 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); 1264 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader);
1264 } 1265 }
1265 1266
1266 } // namespace content 1267 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698