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

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

Issue 12614013: Plumb cc::LatencyInfo through command buffer and output surface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 ae4bb37c12877e341511763ab8f85d88920714b7..04255c974967657df8fbece142d816ecab8fe7f4 100644
--- a/content/browser/renderer_host/image_transport_factory.cc
+++ b/content/browser/renderer_host/image_transport_factory.cc
@@ -309,7 +309,8 @@ class BrowserCompositorOutputSurface
surface_id_(surface_id),
output_surface_proxy_(output_surface_proxy),
compositor_message_loop_(compositor_message_loop),
- compositor_(compositor) {
+ compositor_(compositor),
+ context_(context) {
CommandLine* command_line = CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(switches::kUIMaxFramesPending)) {
std::string string_value = command_line->GetSwitchValueASCII(
@@ -338,9 +339,17 @@ class BrowserCompositorOutputSurface
return false;
output_surface_proxy_->AddSurface(this, surface_id_);
+ context_->GetCommandBufferProxy()->SetLatencyInfoCallback(
+ base::Bind(&BrowserCompositorOutputSurface::OnReceivedLatencyInfo,
+ base::Unretained(this)));
return true;
}
+ virtual void SetLatencyInfo(
+ const cc::LatencyInfo& latency_info) OVERRIDE {
+ context_->GetCommandBufferProxy()->SetLatencyInfo(latency_info);
+ }
+
void OnUpdateVSyncParameters(
base::TimeTicks timebase, base::TimeDelta interval) {
DCHECK(CalledOnValidThread());
@@ -353,11 +362,17 @@ class BrowserCompositorOutputSurface
}
private:
+
+ void OnReceivedLatencyInfo(const cc::LatencyInfo& latency_info) {
+ client_->OnReceivedLatencyInfo(latency_info);
+ }
+
int surface_id_;
scoped_refptr<BrowserCompositorOutputSurfaceProxy> output_surface_proxy_;
scoped_refptr<base::MessageLoopProxy> compositor_message_loop_;
base::WeakPtr<ui::Compositor> compositor_;
+ WebGraphicsContext3DCommandBufferImpl* context_;
};
void BrowserCompositorOutputSurfaceProxy::OnUpdateVSyncParameters(

Powered by Google App Engine
This is Rietveld 408576698