Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 370 } | 370 } |
| 371 | 371 |
| 372 void RenderWidgetCompositor::NotifyInputThrottledUntilCommit() { | 372 void RenderWidgetCompositor::NotifyInputThrottledUntilCommit() { |
| 373 layer_tree_host_->NotifyInputThrottledUntilCommit(); | 373 layer_tree_host_->NotifyInputThrottledUntilCommit(); |
| 374 } | 374 } |
| 375 | 375 |
| 376 const cc::Layer* RenderWidgetCompositor::GetRootLayer() const { | 376 const cc::Layer* RenderWidgetCompositor::GetRootLayer() const { |
| 377 return layer_tree_host_->root_layer(); | 377 return layer_tree_host_->root_layer(); |
| 378 } | 378 } |
| 379 | 379 |
| 380 void RenderWidgetCompositor::SetNeedsForcedRedraw() { | |
| 381 layer_tree_host_->SetNextCommitForcesRedraw(); | |
| 382 if (threaded_) { | |
|
enne (OOO)
2013/09/24 17:22:26
Maybe just call RenderWidgetCompositor::setNeedsRe
| |
| 383 layer_tree_host_->SetNeedsAnimate(); | |
| 384 } else { | |
| 385 widget_->scheduleAnimation(); | |
| 386 } | |
| 387 } | |
| 388 | |
| 380 bool RenderWidgetCompositor::initialize(cc::LayerTreeSettings settings) { | 389 bool RenderWidgetCompositor::initialize(cc::LayerTreeSettings settings) { |
| 381 scoped_refptr<base::MessageLoopProxy> compositor_message_loop_proxy = | 390 scoped_refptr<base::MessageLoopProxy> compositor_message_loop_proxy = |
| 382 RenderThreadImpl::current()->compositor_message_loop_proxy(); | 391 RenderThreadImpl::current()->compositor_message_loop_proxy(); |
| 383 layer_tree_host_ = cc::LayerTreeHost::Create(this, | 392 layer_tree_host_ = cc::LayerTreeHost::Create(this, |
| 384 settings, | 393 settings, |
| 385 compositor_message_loop_proxy); | 394 compositor_message_loop_proxy); |
| 386 return layer_tree_host_; | 395 return layer_tree_host_; |
| 387 } | 396 } |
| 388 | 397 |
| 389 void RenderWidgetCompositor::setSurfaceReady() { | 398 void RenderWidgetCompositor::setSurfaceReady() { |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 613 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); | 622 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); |
| 614 } | 623 } |
| 615 | 624 |
| 616 scoped_refptr<cc::ContextProvider> | 625 scoped_refptr<cc::ContextProvider> |
| 617 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { | 626 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { |
| 618 return RenderThreadImpl::current()-> | 627 return RenderThreadImpl::current()-> |
| 619 OffscreenContextProviderForCompositorThread(); | 628 OffscreenContextProviderForCompositorThread(); |
| 620 } | 629 } |
| 621 | 630 |
| 622 } // namespace content | 631 } // namespace content |
| OLD | NEW |