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

Unified Diff: content/browser/gpu/gpu_process_host_ui_shim.cc

Issue 140663003: Removed requirement for the renderer to know it's process ID (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed Windows 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/gpu/gpu_process_host_ui_shim.cc
diff --git a/content/browser/gpu/gpu_process_host_ui_shim.cc b/content/browser/gpu/gpu_process_host_ui_shim.cc
index b17bc59faae752ffa98445671ceac7261a81bcdb..98573bd4d8be6dc08939787e8a7011c29892b648 100644
--- a/content/browser/gpu/gpu_process_host_ui_shim.cc
+++ b/content/browser/gpu/gpu_process_host_ui_shim.cc
@@ -307,8 +307,15 @@ void GpuProcessHostUIShim::OnAcceleratedSurfaceBuffersSwapped(
if (swap_delay.ToInternalValue())
base::PlatformThread::Sleep(swap_delay);
+ GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params view_params = params;
+
+ RenderWidgetHostImpl* impl =
+ RenderWidgetHostImpl::From(view->GetRenderWidgetHost());
+ view_params.latency_info.AnnotateComponentsWithProcessId(
+ impl->GetProcess()->GetID());
+
// View must send ACK message after next composite.
- view->AcceleratedSurfaceBuffersSwapped(params, host_id_);
+ view->AcceleratedSurfaceBuffersSwapped(view_params, host_id_);
view->DidReceiveRendererFrame();
}
@@ -320,7 +327,6 @@ void GpuProcessHostUIShim::OnAcceleratedSurfacePostSubBuffer(
const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params) {
TRACE_EVENT0("renderer",
"GpuProcessHostUIShim::OnAcceleratedSurfacePostSubBuffer");
-
AcceleratedSurfaceMsg_BufferPresented_Params ack_params;
ack_params.mailbox_name = params.mailbox_name;
ack_params.sync_point = 0;
@@ -340,8 +346,15 @@ void GpuProcessHostUIShim::OnAcceleratedSurfacePostSubBuffer(
delayed_send.Cancel();
+ GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params view_params = params;
+
+ RenderWidgetHostImpl* impl = RenderWidgetHostImpl::From(
+ view->GetRenderWidgetHost());
+ view_params.latency_info.AnnotateComponentsWithProcessId(
+ impl->GetProcess()->GetID());
+
// View must send ACK message after next composite.
- view->AcceleratedSurfacePostSubBuffer(params, host_id_);
+ view->AcceleratedSurfacePostSubBuffer(view_params, host_id_);
view->DidReceiveRendererFrame();
}
« no previous file with comments | « no previous file | content/browser/renderer_host/render_process_host_impl.cc » ('j') | content/renderer/render_view_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698