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

Side by Side Diff: blimp/client/core/compositor/blimp_compositor.cc

Issue 2326913004: Adding UMA stats for Blimp Client (Closed)
Patch Set: dtrainor comments Created 4 years, 3 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "blimp/client/core/compositor/blimp_compositor.h" 5 #include "blimp/client/core/compositor/blimp_compositor.h"
6 6
7 #include "base/bind_helpers.h" 7 #include "base/bind_helpers.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/metrics/histogram_macros.h"
10 #include "base/numerics/safe_conversions.h" 11 #include "base/numerics/safe_conversions.h"
11 #include "base/single_thread_task_runner.h" 12 #include "base/single_thread_task_runner.h"
12 #include "base/threading/thread.h" 13 #include "base/threading/thread.h"
13 #include "base/threading/thread_local.h" 14 #include "base/threading/thread_local.h"
14 #include "base/threading/thread_restrictions.h" 15 #include "base/threading/thread_restrictions.h"
15 #include "base/threading/thread_task_runner_handle.h" 16 #include "base/threading/thread_task_runner_handle.h"
16 #include "blimp/client/core/compositor/blimp_compositor_dependencies.h" 17 #include "blimp/client/core/compositor/blimp_compositor_dependencies.h"
17 #include "blimp/client/core/compositor/delegated_output_surface.h" 18 #include "blimp/client/core/compositor/delegated_output_surface.h"
18 #include "blimp/client/public/compositor/compositor_dependencies.h" 19 #include "blimp/client/public/compositor/compositor_dependencies.h"
19 #include "blimp/net/blimp_stats.h" 20 #include "blimp/net/blimp_stats.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 void BlimpCompositor::OnCompositorMessageReceived( 126 void BlimpCompositor::OnCompositorMessageReceived(
126 std::unique_ptr<cc::proto::CompositorMessage> message) { 127 std::unique_ptr<cc::proto::CompositorMessage> message) {
127 DCHECK(message->has_to_impl()); 128 DCHECK(message->has_to_impl());
128 const cc::proto::CompositorMessageToImpl& to_impl_proto = message->to_impl(); 129 const cc::proto::CompositorMessageToImpl& to_impl_proto = message->to_impl();
129 130
130 DCHECK(to_impl_proto.has_message_type()); 131 DCHECK(to_impl_proto.has_message_type());
131 switch (to_impl_proto.message_type()) { 132 switch (to_impl_proto.message_type()) {
132 case cc::proto::CompositorMessageToImpl::UNKNOWN: 133 case cc::proto::CompositorMessageToImpl::UNKNOWN:
133 NOTIMPLEMENTED() << "Ignoring message of UNKNOWN type"; 134 NOTIMPLEMENTED() << "Ignoring message of UNKNOWN type";
134 break; 135 break;
136 case cc::proto::CompositorMessageToImpl::START_COMMIT:
137 UMA_HISTOGRAM_MEMORY_KB("Blimp.Compositor.CommitSizeKb",
138 (float)message->ByteSize() / 1024);
135 default: 139 default:
136 // We should have a receiver if we're getting compositor messages that 140 // We should have a receiver if we're getting compositor messages that
137 // are not INITIALIZE_IMPL or CLOSE_IMPL. 141 // are not INITIALIZE_IMPL or CLOSE_IMPL.
138 DCHECK(remote_proto_channel_receiver_); 142 DCHECK(remote_proto_channel_receiver_);
139 remote_proto_channel_receiver_->OnProtoReceived(std::move(message)); 143 remote_proto_channel_receiver_->OnProtoReceived(std::move(message));
140 } 144 }
141 } 145 }
142 146
143 void BlimpCompositor::OnContextProvidersCreated( 147 void BlimpCompositor::OnContextProvidersCreated(
144 const scoped_refptr<cc::ContextProvider>& compositor_context_provider, 148 const scoped_refptr<cc::ContextProvider>& compositor_context_provider,
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 // Cancel any outstanding OutputSurface requests. That way if we get an async 309 // Cancel any outstanding OutputSurface requests. That way if we get an async
306 // callback related to the old request we know to drop it. 310 // callback related to the old request we know to drop it.
307 output_surface_request_pending_ = false; 311 output_surface_request_pending_ = false;
308 312
309 // Make sure we don't have a receiver at this point. 313 // Make sure we don't have a receiver at this point.
310 DCHECK(!remote_proto_channel_receiver_); 314 DCHECK(!remote_proto_channel_receiver_);
311 } 315 }
312 316
313 } // namespace client 317 } // namespace client
314 } // namespace blimp 318 } // namespace blimp
OLDNEW
« no previous file with comments | « blimp/client/core/blimp_client_context_impl.cc ('k') | blimp/client/core/contents/blimp_contents_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698