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

Side by Side Diff: cc/trees/remote_channel_impl.cc

Issue 2188093002: cc: Complete swap promise for aborted commit after pending activation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: post rebase fix Created 4 years, 4 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 | « cc/trees/proxy_main.cc ('k') | cc/trees/remote_channel_main.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "cc/trees/remote_channel_impl.h" 5 #include "cc/trees/remote_channel_impl.h"
6 6
7 #include "base/bind_helpers.h" 7 #include "base/bind_helpers.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "cc/animation/animation_events.h" 10 #include "cc/animation/animation_events.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 main().layer_tree_host, main_thread_start_time, false)); 123 main().layer_tree_host, main_thread_start_time, false));
124 completion.Wait(); 124 completion.Wait();
125 } 125 }
126 } break; 126 } break;
127 case proto::CompositorMessageToImpl::BEGIN_MAIN_FRAME_ABORTED: { 127 case proto::CompositorMessageToImpl::BEGIN_MAIN_FRAME_ABORTED: {
128 base::TimeTicks main_thread_start_time = base::TimeTicks::Now(); 128 base::TimeTicks main_thread_start_time = base::TimeTicks::Now();
129 const proto::BeginMainFrameAborted& begin_main_frame_aborted_message = 129 const proto::BeginMainFrameAborted& begin_main_frame_aborted_message =
130 proto.begin_main_frame_aborted_message(); 130 proto.begin_main_frame_aborted_message();
131 CommitEarlyOutReason reason = CommitEarlyOutReasonFromProtobuf( 131 CommitEarlyOutReason reason = CommitEarlyOutReasonFromProtobuf(
132 begin_main_frame_aborted_message.reason()); 132 begin_main_frame_aborted_message.reason());
133 std::vector<std::unique_ptr<SwapPromise>> empty_swap_promises;
133 VLOG(1) << "Received BeginMainFrameAborted from the engine with reason: " 134 VLOG(1) << "Received BeginMainFrameAborted from the engine with reason: "
134 << CommitEarlyOutReasonToString(reason); 135 << CommitEarlyOutReasonToString(reason);
135 ImplThreadTaskRunner()->PostTask( 136 ImplThreadTaskRunner()->PostTask(
136 FROM_HERE, 137 FROM_HERE,
137 base::Bind(&ProxyImpl::BeginMainFrameAbortedOnImpl, 138 base::Bind(&ProxyImpl::BeginMainFrameAbortedOnImpl,
138 proxy_impl_weak_ptr_, reason, main_thread_start_time)); 139 proxy_impl_weak_ptr_, reason, main_thread_start_time,
140 base::Passed(&empty_swap_promises)));
139 } break; 141 } break;
140 case proto::CompositorMessageToImpl::SET_NEEDS_REDRAW: { 142 case proto::CompositorMessageToImpl::SET_NEEDS_REDRAW: {
141 VLOG(1) << "Received redraw request from the engine."; 143 VLOG(1) << "Received redraw request from the engine.";
142 const proto::SetNeedsRedraw& set_needs_redraw_message = 144 const proto::SetNeedsRedraw& set_needs_redraw_message =
143 proto.set_needs_redraw_message(); 145 proto.set_needs_redraw_message();
144 gfx::Rect damaged_rect = 146 gfx::Rect damaged_rect =
145 ProtoToRect(set_needs_redraw_message.damaged_rect()); 147 ProtoToRect(set_needs_redraw_message.damaged_rect());
146 PostSetNeedsRedrawToImpl(damaged_rect); 148 PostSetNeedsRedrawToImpl(damaged_rect);
147 } break; 149 } break;
148 } 150 }
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 538
537 RemoteChannelImpl::CompositorThreadOnly::CompositorThreadOnly( 539 RemoteChannelImpl::CompositorThreadOnly::CompositorThreadOnly(
538 base::WeakPtr<RemoteChannelImpl> remote_channel_weak_ptr) 540 base::WeakPtr<RemoteChannelImpl> remote_channel_weak_ptr)
539 : proxy_impl(nullptr), 541 : proxy_impl(nullptr),
540 proxy_impl_weak_factory(nullptr), 542 proxy_impl_weak_factory(nullptr),
541 remote_channel_weak_ptr(remote_channel_weak_ptr) {} 543 remote_channel_weak_ptr(remote_channel_weak_ptr) {}
542 544
543 RemoteChannelImpl::CompositorThreadOnly::~CompositorThreadOnly() {} 545 RemoteChannelImpl::CompositorThreadOnly::~CompositorThreadOnly() {}
544 546
545 } // namespace cc 547 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/proxy_main.cc ('k') | cc/trees/remote_channel_main.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698