| Index: cc/trees/remote_channel_impl.cc
|
| diff --git a/cc/trees/remote_channel_impl.cc b/cc/trees/remote_channel_impl.cc
|
| index a55dc9770be51cb2937e6af31bc584368f782cc4..58fdca78574b3655969b7b78ce9581602825dec3 100644
|
| --- a/cc/trees/remote_channel_impl.cc
|
| +++ b/cc/trees/remote_channel_impl.cc
|
| @@ -63,6 +63,7 @@ void RemoteChannelImpl::OnProtoReceived(
|
| // If we don't have an output surface, queue the message and defer processing
|
| // it till we initialize a new output surface.
|
| if (main().waiting_for_output_surface_initialization) {
|
| + VLOG(1) << "Queueing message proto since output surface was released.";
|
| main().pending_messages.push(proto->to_impl());
|
| } else {
|
| HandleProto(proto->to_impl());
|
| @@ -92,6 +93,7 @@ void RemoteChannelImpl::HandleProto(
|
| proxy_impl_weak_ptr_));
|
| break;
|
| case proto::CompositorMessageToImpl::SET_NEEDS_COMMIT:
|
| + VLOG(1) << "Received commit request from the engine.";
|
| ImplThreadTaskRunner()->PostTask(
|
| FROM_HERE,
|
| base::Bind(&ProxyImpl::SetNeedsCommitOnImpl, proxy_impl_weak_ptr_));
|
| @@ -100,11 +102,14 @@ void RemoteChannelImpl::HandleProto(
|
| const proto::SetDeferCommits& defer_commits_message =
|
| proto.defer_commits_message();
|
| bool defer_commits = defer_commits_message.defer_commits();
|
| + VLOG(1) << "Received set defer commits to: " << defer_commits
|
| + << " from the engine.";
|
| ImplThreadTaskRunner()->PostTask(
|
| FROM_HERE, base::Bind(&ProxyImpl::SetDeferCommitsOnImpl,
|
| proxy_impl_weak_ptr_, defer_commits));
|
| } break;
|
| case proto::CompositorMessageToImpl::START_COMMIT: {
|
| + VLOG(1) << "Received commit proto from the engine.";
|
| base::TimeTicks main_thread_start_time = base::TimeTicks::Now();
|
| const proto::StartCommit& start_commit_message =
|
| proto.start_commit_message();
|
| @@ -115,6 +120,7 @@ void RemoteChannelImpl::HandleProto(
|
| DebugScopedSetMainThreadBlocked main_thread_blocked(
|
| task_runner_provider_);
|
| CompletionEvent completion;
|
| + VLOG(1) << "Starting commit.";
|
| ImplThreadTaskRunner()->PostTask(
|
| FROM_HERE,
|
| base::Bind(&ProxyImpl::StartCommitOnImpl, proxy_impl_weak_ptr_,
|
| @@ -129,12 +135,15 @@ void RemoteChannelImpl::HandleProto(
|
| proto.begin_main_frame_aborted_message();
|
| CommitEarlyOutReason reason = CommitEarlyOutReasonFromProtobuf(
|
| begin_main_frame_aborted_message.reason());
|
| + VLOG(1) << "Received BeginMainFrameAborted from the engine with reason: "
|
| + << CommitEarlyOutReasonToString(reason);
|
| ImplThreadTaskRunner()->PostTask(
|
| FROM_HERE,
|
| base::Bind(&ProxyImpl::BeginMainFrameAbortedOnImpl,
|
| proxy_impl_weak_ptr_, reason, main_thread_start_time));
|
| } break;
|
| case proto::CompositorMessageToImpl::SET_NEEDS_REDRAW: {
|
| + VLOG(1) << "Received redraw request from the engine.";
|
| const proto::SetNeedsRedraw& set_needs_redraw_message =
|
| proto.set_needs_redraw_message();
|
| gfx::Rect damaged_rect =
|
| @@ -168,6 +177,7 @@ void RemoteChannelImpl::SetOutputSurface(OutputSurface* output_surface) {
|
| void RemoteChannelImpl::ReleaseOutputSurface() {
|
| DCHECK(task_runner_provider_->IsMainThread());
|
| DCHECK(!main().waiting_for_output_surface_initialization);
|
| + VLOG(1) << "Releasing Output Surface";
|
|
|
| {
|
| CompletionEvent completion;
|
| @@ -183,6 +193,7 @@ void RemoteChannelImpl::ReleaseOutputSurface() {
|
|
|
| void RemoteChannelImpl::SetVisible(bool visible) {
|
| DCHECK(task_runner_provider_->IsMainThread());
|
| + VLOG(1) << "Setting visibility to: " << visible;
|
|
|
| ImplThreadTaskRunner()->PostTask(
|
| FROM_HERE,
|
| @@ -415,6 +426,7 @@ void RemoteChannelImpl::DidInitializeOutputSurfaceOnMain(
|
| return;
|
| }
|
|
|
| + VLOG(1) << "OutputSurface initialized successfully";
|
| main().renderer_capabilities = capabilities;
|
| main().layer_tree_host->DidInitializeOutputSurface();
|
|
|
| @@ -423,6 +435,7 @@ void RemoteChannelImpl::DidInitializeOutputSurfaceOnMain(
|
| // initialized.
|
| main().waiting_for_output_surface_initialization = false;
|
| while (!main().pending_messages.empty()) {
|
| + VLOG(1) << "Handling queued message";
|
| HandleProto(main().pending_messages.front());
|
| main().pending_messages.pop();
|
| }
|
| @@ -436,6 +449,7 @@ void RemoteChannelImpl::DidInitializeOutputSurfaceOnMain(
|
| void RemoteChannelImpl::SendMessageProtoOnMain(
|
| scoped_ptr<proto::CompositorMessage> proto) {
|
| DCHECK(task_runner_provider_->IsMainThread());
|
| + VLOG(1) << "Sending BeginMainFrame request to the engine.";
|
|
|
| main().remote_proto_channel->SendCompositorProto(*proto);
|
| }
|
|
|