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

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

Issue 16848010: Add LayerTreeHostClient::{will,did}UpdateLayer, report layer updates to DevTools (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments addressed Created 7 years, 5 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
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 #include <string> 8 #include <string>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 350
351 void RenderWidgetCompositor::SetNeedsRedrawRect(gfx::Rect damage_rect) { 351 void RenderWidgetCompositor::SetNeedsRedrawRect(gfx::Rect damage_rect) {
352 layer_tree_host_->SetNeedsRedrawRect(damage_rect); 352 layer_tree_host_->SetNeedsRedrawRect(damage_rect);
353 } 353 }
354 354
355 void RenderWidgetCompositor::SetLatencyInfo( 355 void RenderWidgetCompositor::SetLatencyInfo(
356 const ui::LatencyInfo& latency_info) { 356 const ui::LatencyInfo& latency_info) {
357 layer_tree_host_->SetLatencyInfo(latency_info); 357 layer_tree_host_->SetLatencyInfo(latency_info);
358 } 358 }
359 359
360 int RenderWidgetCompositor::GetLayerTreeId() const {
361 return layer_tree_host_->id();
362 }
363
360 bool RenderWidgetCompositor::initialize(cc::LayerTreeSettings settings) { 364 bool RenderWidgetCompositor::initialize(cc::LayerTreeSettings settings) {
361 scoped_refptr<base::MessageLoopProxy> compositor_message_loop_proxy = 365 scoped_refptr<base::MessageLoopProxy> compositor_message_loop_proxy =
362 RenderThreadImpl::current()->compositor_message_loop_proxy(); 366 RenderThreadImpl::current()->compositor_message_loop_proxy();
363 layer_tree_host_ = cc::LayerTreeHost::Create(this, 367 layer_tree_host_ = cc::LayerTreeHost::Create(this,
364 settings, 368 settings,
365 compositor_message_loop_proxy); 369 compositor_message_loop_proxy);
366 return layer_tree_host_; 370 return layer_tree_host_;
367 } 371 }
368 372
369 void RenderWidgetCompositor::setSurfaceReady() { 373 void RenderWidgetCompositor::setSurfaceReady() {
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); 563 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread();
560 } 564 }
561 565
562 scoped_refptr<cc::ContextProvider> 566 scoped_refptr<cc::ContextProvider>
563 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { 567 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() {
564 return RenderThreadImpl::current()-> 568 return RenderThreadImpl::current()->
565 OffscreenContextProviderForCompositorThread(); 569 OffscreenContextProviderForCompositorThread();
566 } 570 }
567 571
568 } // namespace content 572 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698