Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/render_widget.h" | 5 #include "content/renderer/render_widget.h" |
| 6 | 6 |
| 7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 1434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1445 scoped_ptr<cc::SwapPromise> swap_promise = | 1445 scoped_ptr<cc::SwapPromise> swap_promise = |
| 1446 QueueMessageImpl(msg, | 1446 QueueMessageImpl(msg, |
| 1447 policy, | 1447 policy, |
| 1448 frame_swap_message_queue_.get(), | 1448 frame_swap_message_queue_.get(), |
| 1449 RenderThreadImpl::current()->sync_message_filter(), | 1449 RenderThreadImpl::current()->sync_message_filter(), |
| 1450 compositor_->BeginMainFrameRequested(), | 1450 compositor_->BeginMainFrameRequested(), |
| 1451 compositor_->GetSourceFrameNumber()); | 1451 compositor_->GetSourceFrameNumber()); |
| 1452 | 1452 |
| 1453 if (swap_promise) { | 1453 if (swap_promise) { |
| 1454 compositor_->QueueSwapPromise(swap_promise.Pass()); | 1454 compositor_->QueueSwapPromise(swap_promise.Pass()); |
| 1455 compositor_->SetNeedsCommit(); | 1455 compositor_->SetNeedsUpdateLayers(); |
|
Sami
2015/02/16 16:12:30
Could you add a comment here saying why we need to
Ignacio Solla
2015/02/17 11:41:18
Done.
| |
| 1456 } | 1456 } |
| 1457 } | 1457 } |
| 1458 | 1458 |
| 1459 void RenderWidget::didCommitAndDrawCompositorFrame() { | 1459 void RenderWidget::didCommitAndDrawCompositorFrame() { |
| 1460 // NOTE: Tests may break if this event is renamed or moved. See | 1460 // NOTE: Tests may break if this event is renamed or moved. See |
| 1461 // tab_capture_performancetest.cc. | 1461 // tab_capture_performancetest.cc. |
| 1462 TRACE_EVENT0("gpu", "RenderWidget::didCommitAndDrawCompositorFrame"); | 1462 TRACE_EVENT0("gpu", "RenderWidget::didCommitAndDrawCompositorFrame"); |
| 1463 // Notify subclasses that we initiated the paint operation. | 1463 // Notify subclasses that we initiated the paint operation. |
| 1464 DidInitiatePaint(); | 1464 DidInitiatePaint(); |
| 1465 } | 1465 } |
| (...skipping 957 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2423 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { | 2423 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { |
| 2424 video_hole_frames_.AddObserver(frame); | 2424 video_hole_frames_.AddObserver(frame); |
| 2425 } | 2425 } |
| 2426 | 2426 |
| 2427 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { | 2427 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { |
| 2428 video_hole_frames_.RemoveObserver(frame); | 2428 video_hole_frames_.RemoveObserver(frame); |
| 2429 } | 2429 } |
| 2430 #endif // defined(VIDEO_HOLE) | 2430 #endif // defined(VIDEO_HOLE) |
| 2431 | 2431 |
| 2432 } // namespace content | 2432 } // namespace content |
| OLD | NEW |