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

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

Issue 2158973002: cc: Clean up LayerTreeTest and TestHooks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: proxy-impls: test Created 4 years, 5 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/remote_channel_main.h ('k') | cc/trees/remote_channel_unittest.cc » ('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_main.h" 5 #include "cc/trees/remote_channel_main.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "cc/proto/base_conversions.h" 10 #include "cc/proto/base_conversions.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 proto::BeginMainFrameAborted* begin_main_frame_aborted_message = 165 proto::BeginMainFrameAborted* begin_main_frame_aborted_message =
166 to_impl_proto->mutable_begin_main_frame_aborted_message(); 166 to_impl_proto->mutable_begin_main_frame_aborted_message();
167 CommitEarlyOutReasonToProtobuf( 167 CommitEarlyOutReasonToProtobuf(
168 reason, begin_main_frame_aborted_message->mutable_reason()); 168 reason, begin_main_frame_aborted_message->mutable_reason());
169 169
170 VLOG(1) << "Sending BeginMainFrameAborted message to client with reason: " 170 VLOG(1) << "Sending BeginMainFrameAborted message to client with reason: "
171 << CommitEarlyOutReasonToString(reason); 171 << CommitEarlyOutReasonToString(reason);
172 SendMessageProto(proto); 172 SendMessageProto(proto);
173 } 173 }
174 174
175 void RemoteChannelMain::StartCommitOnImpl( 175 void RemoteChannelMain::NotifyReadyToCommitOnImpl(
176 CompletionEvent* completion, 176 CompletionEvent* completion,
177 LayerTreeHost* layer_tree_host, 177 LayerTreeHost* layer_tree_host,
178 base::TimeTicks main_thread_start_time, 178 base::TimeTicks main_thread_start_time,
179 bool hold_commit_for_activation) { 179 bool hold_commit_for_activation) {
180 TRACE_EVENT0("cc.remote", "RemoteChannelMain::StartCommitOnImpl"); 180 TRACE_EVENT0("cc.remote", "RemoteChannelMain::NotifyReadyToCommitOnImpl");
181 proto::CompositorMessage proto; 181 proto::CompositorMessage proto;
182 proto::CompositorMessageToImpl* to_impl_proto = proto.mutable_to_impl(); 182 proto::CompositorMessageToImpl* to_impl_proto = proto.mutable_to_impl();
183 to_impl_proto->set_message_type(proto::CompositorMessageToImpl::START_COMMIT); 183 to_impl_proto->set_message_type(proto::CompositorMessageToImpl::START_COMMIT);
184 proto::StartCommit* start_commit_message = 184 proto::StartCommit* start_commit_message =
185 to_impl_proto->mutable_start_commit_message(); 185 to_impl_proto->mutable_start_commit_message();
186 std::vector<std::unique_ptr<SwapPromise>> swap_promises; 186 std::vector<std::unique_ptr<SwapPromise>> swap_promises;
187 layer_tree_host->ToProtobufForCommit( 187 layer_tree_host->ToProtobufForCommit(
188 start_commit_message->mutable_layer_tree_host(), &swap_promises); 188 start_commit_message->mutable_layer_tree_host(), &swap_promises);
189 189
190 VLOG(1) << "Sending commit message to client. Commit bytes size: " 190 VLOG(1) << "Sending commit message to client. Commit bytes size: "
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 289
290 void RemoteChannelMain::DidCompleteSwapBuffers() { 290 void RemoteChannelMain::DidCompleteSwapBuffers() {
291 proxy_main_->DidCompleteSwapBuffers(); 291 proxy_main_->DidCompleteSwapBuffers();
292 } 292 }
293 293
294 base::SingleThreadTaskRunner* RemoteChannelMain::MainThreadTaskRunner() const { 294 base::SingleThreadTaskRunner* RemoteChannelMain::MainThreadTaskRunner() const {
295 return task_runner_provider_->MainThreadTaskRunner(); 295 return task_runner_provider_->MainThreadTaskRunner();
296 } 296 }
297 297
298 } // namespace cc 298 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/remote_channel_main.h ('k') | cc/trees/remote_channel_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698