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

Side by Side Diff: content/renderer/gpu/render_widget_compositor.cc

Issue 13931009: Add latency info to input events sent to RenderWidget. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.h ('k') | content/renderer/idle_user_detector.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/renderer/gpu/render_widget_compositor.h" 5 #include "content/renderer/gpu/render_widget_compositor.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 334
335 void RenderWidgetCompositor::SetOverdrawBottomHeight( 335 void RenderWidgetCompositor::SetOverdrawBottomHeight(
336 float overdraw_bottom_height) { 336 float overdraw_bottom_height) {
337 layer_tree_host_->SetOverdrawBottomHeight(overdraw_bottom_height); 337 layer_tree_host_->SetOverdrawBottomHeight(overdraw_bottom_height);
338 } 338 }
339 339
340 void RenderWidgetCompositor::SetNeedsRedrawRect(gfx::Rect damage_rect) { 340 void RenderWidgetCompositor::SetNeedsRedrawRect(gfx::Rect damage_rect) {
341 layer_tree_host_->SetNeedsRedrawRect(damage_rect); 341 layer_tree_host_->SetNeedsRedrawRect(damage_rect);
342 } 342 }
343 343
344 void RenderWidgetCompositor::SetLatencyInfo(
345 const cc::LatencyInfo& latency_info) {
346 layer_tree_host_->SetLatencyInfo(latency_info);
347 }
348
344 bool RenderWidgetCompositor::initialize(cc::LayerTreeSettings settings) { 349 bool RenderWidgetCompositor::initialize(cc::LayerTreeSettings settings) {
345 scoped_ptr<cc::Thread> impl_thread; 350 scoped_ptr<cc::Thread> impl_thread;
346 scoped_refptr<base::MessageLoopProxy> compositor_message_loop_proxy = 351 scoped_refptr<base::MessageLoopProxy> compositor_message_loop_proxy =
347 RenderThreadImpl::current()->compositor_message_loop_proxy(); 352 RenderThreadImpl::current()->compositor_message_loop_proxy();
348 threaded_ = !!compositor_message_loop_proxy; 353 threaded_ = !!compositor_message_loop_proxy;
349 if (threaded_) { 354 if (threaded_) {
350 impl_thread = cc::ThreadImpl::CreateForDifferentThread( 355 impl_thread = cc::ThreadImpl::CreateForDifferentThread(
351 compositor_message_loop_proxy); 356 compositor_message_loop_proxy);
352 } 357 }
353 layer_tree_host_ = cc::LayerTreeHost::Create(this, 358 layer_tree_host_ = cc::LayerTreeHost::Create(this,
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); 564 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread();
560 } 565 }
561 566
562 scoped_refptr<cc::ContextProvider> 567 scoped_refptr<cc::ContextProvider>
563 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { 568 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() {
564 return RenderThreadImpl::current()-> 569 return RenderThreadImpl::current()->
565 OffscreenContextProviderForCompositorThread(); 570 OffscreenContextProviderForCompositorThread();
566 } 571 }
567 572
568 } // namespace content 573 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.h ('k') | content/renderer/idle_user_detector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698