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

Side by Side Diff: content/renderer/render_widget.cc

Issue 925353002: Make commit for swap promises do not set can_cancel_commit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.cc ('k') | no next file » | 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) 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
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
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
OLDNEW
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698