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

Unified Diff: content/browser/renderer_host/image_transport_factory.cc

Issue 11293121: Add latency measurement system (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: create cc::LatencyInfo Created 7 years, 12 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/renderer_host/image_transport_factory.cc
diff --git a/content/browser/renderer_host/image_transport_factory.cc b/content/browser/renderer_host/image_transport_factory.cc
index a2fce40d2f2caa2a86417ba1127ca2807324b361..c4c3a34a52d5ce0339f1b255f832d15d994688bb 100644
--- a/content/browser/renderer_host/image_transport_factory.cc
+++ b/content/browser/renderer_host/image_transport_factory.cc
@@ -321,6 +321,9 @@ class BrowserCompositorOutputSurface :
client_ = client;
output_surface_proxy_->AddSurface(this, surface_id_);
+ context3D_->GetCommandBufferProxy()->SetLatencyInfoCallback(
+ base::Bind(&BrowserCompositorOutputSurface::OnReceivedLatencyInfo,
+ base::Unretained(this)));
return true;
}
@@ -343,6 +346,11 @@ class BrowserCompositorOutputSurface :
const cc::CompositorFrame&) OVERRIDE {
}
+ virtual void SetLatencyInfo(
+ const cc::LatencyInfo& latency_info) OVERRIDE {
+ context3D_->GetCommandBufferProxy()->SetLatencyInfo(latency_info);
+ }
+
void OnUpdateVSyncParameters(
base::TimeTicks timebase, base::TimeDelta interval) {
DCHECK(CalledOnValidThread());
@@ -351,6 +359,11 @@ class BrowserCompositorOutputSurface :
}
private:
+
+ void OnReceivedLatencyInfo(const cc::LatencyInfo& latency_info) {
+ client_->OnReceivedLatencyInfo(latency_info);
+ }
+
scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context3D_;
int surface_id_;
struct Capabilities capabilities_;
« no previous file with comments | « content/browser/renderer_host/compositor_impl_android.cc ('k') | content/browser/renderer_host/render_widget_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698