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 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 layer_tree_host_->UpdateTopControlsState(enable_hiding, | 327 layer_tree_host_->UpdateTopControlsState(enable_hiding, |
328 enable_showing, | 328 enable_showing, |
329 animate); | 329 animate); |
330 } | 330 } |
331 | 331 |
332 void RenderWidgetCompositor::SetOverdrawBottomHeight( | 332 void RenderWidgetCompositor::SetOverdrawBottomHeight( |
333 float overdraw_bottom_height) { | 333 float overdraw_bottom_height) { |
334 layer_tree_host_->SetOverdrawBottomHeight(overdraw_bottom_height); | 334 layer_tree_host_->SetOverdrawBottomHeight(overdraw_bottom_height); |
335 } | 335 } |
336 | 336 |
| 337 void RenderWidgetCompositor::SetNeedsRedrawRect(gfx::Rect damage_rect) { |
| 338 layer_tree_host_->SetNeedsRedrawRect(damage_rect); |
| 339 } |
| 340 |
337 bool RenderWidgetCompositor::initialize(cc::LayerTreeSettings settings) { | 341 bool RenderWidgetCompositor::initialize(cc::LayerTreeSettings settings) { |
338 scoped_ptr<cc::Thread> impl_thread; | 342 scoped_ptr<cc::Thread> impl_thread; |
339 scoped_refptr<base::MessageLoopProxy> compositor_message_loop_proxy = | 343 scoped_refptr<base::MessageLoopProxy> compositor_message_loop_proxy = |
340 RenderThreadImpl::current()->compositor_message_loop_proxy(); | 344 RenderThreadImpl::current()->compositor_message_loop_proxy(); |
341 threaded_ = !!compositor_message_loop_proxy; | 345 threaded_ = !!compositor_message_loop_proxy; |
342 if (threaded_) { | 346 if (threaded_) { |
343 impl_thread = cc::ThreadImpl::CreateForDifferentThread( | 347 impl_thread = cc::ThreadImpl::CreateForDifferentThread( |
344 compositor_message_loop_proxy); | 348 compositor_message_loop_proxy); |
345 } | 349 } |
346 layer_tree_host_ = cc::LayerTreeHost::Create(this, | 350 layer_tree_host_ = cc::LayerTreeHost::Create(this, |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); | 555 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); |
552 } | 556 } |
553 | 557 |
554 scoped_refptr<cc::ContextProvider> | 558 scoped_refptr<cc::ContextProvider> |
555 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { | 559 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { |
556 return RenderThreadImpl::current()-> | 560 return RenderThreadImpl::current()-> |
557 OffscreenContextProviderForCompositorThread(); | 561 OffscreenContextProviderForCompositorThread(); |
558 } | 562 } |
559 | 563 |
560 } // namespace content | 564 } // namespace content |
OLD | NEW |