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

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

Issue 290083007: Use LayerTreeHostImpl id instead of its address as id in trace events (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 settings.top_controls_height, 269 settings.top_controls_height,
270 settings.top_controls_show_threshold, 270 settings.top_controls_show_threshold,
271 settings.top_controls_hide_threshold); 271 settings.top_controls_hide_threshold);
272 } 272 }
273 273
274 SetDebugState(settings.initial_debug_state); 274 SetDebugState(settings.initial_debug_state);
275 275
276 // LTHI always has an active tree. 276 // LTHI always has an active tree.
277 active_tree_ = LayerTreeImpl::create(this); 277 active_tree_ = LayerTreeImpl::create(this);
278 TRACE_EVENT_OBJECT_CREATED_WITH_ID( 278 TRACE_EVENT_OBJECT_CREATED_WITH_ID(
279 TRACE_DISABLED_BY_DEFAULT("cc.debug"), "cc::LayerTreeHostImpl", this); 279 TRACE_DISABLED_BY_DEFAULT("cc.debug"), "cc::LayerTreeHostImpl", id_);
280 } 280 }
281 281
282 LayerTreeHostImpl::~LayerTreeHostImpl() { 282 LayerTreeHostImpl::~LayerTreeHostImpl() {
283 DCHECK(proxy_->IsImplThread()); 283 DCHECK(proxy_->IsImplThread());
284 TRACE_EVENT0("cc", "LayerTreeHostImpl::~LayerTreeHostImpl()"); 284 TRACE_EVENT0("cc", "LayerTreeHostImpl::~LayerTreeHostImpl()");
285 TRACE_EVENT_OBJECT_DELETED_WITH_ID( 285 TRACE_EVENT_OBJECT_DELETED_WITH_ID(
286 TRACE_DISABLED_BY_DEFAULT("cc.debug"), "cc::LayerTreeHostImpl", this); 286 TRACE_DISABLED_BY_DEFAULT("cc.debug"), "cc::LayerTreeHostImpl", id_);
287 287
288 if (input_handler_client_) { 288 if (input_handler_client_) {
289 input_handler_client_->WillShutdown(); 289 input_handler_client_->WillShutdown();
290 input_handler_client_ = NULL; 290 input_handler_client_ = NULL;
291 } 291 }
292 292
293 // The layer trees must be destroyed before the layer tree host. We've 293 // The layer trees must be destroyed before the layer tree host. We've
294 // made a contract with our animation controllers that the registrar 294 // made a contract with our animation controllers that the registrar
295 // will outlive them, and we must make good. 295 // will outlive them, and we must make good.
296 if (recycle_tree_) 296 if (recycle_tree_)
(...skipping 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after
1441 LayerTreeHostCommon::CallFunctionForSubtree( 1441 LayerTreeHostCommon::CallFunctionForSubtree(
1442 pending_tree_->root_layer(), 1442 pending_tree_->root_layer(),
1443 base::Bind(&LayerTreeHostImplDidBeginTracingCallback)); 1443 base::Bind(&LayerTreeHostImplDidBeginTracingCallback));
1444 } 1444 }
1445 LayerTreeHostCommon::CallFunctionForSubtree( 1445 LayerTreeHostCommon::CallFunctionForSubtree(
1446 active_tree_->root_layer(), 1446 active_tree_->root_layer(),
1447 base::Bind(&LayerTreeHostImplDidBeginTracingCallback)); 1447 base::Bind(&LayerTreeHostImplDidBeginTracingCallback));
1448 } 1448 }
1449 1449
1450 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID( 1450 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(
1451 TRACE_DISABLED_BY_DEFAULT("cc.debug") "," 1451 TRACE_DISABLED_BY_DEFAULT("cc.debug") "," TRACE_DISABLED_BY_DEFAULT(
1452 TRACE_DISABLED_BY_DEFAULT("cc.debug.quads"), "cc::LayerTreeHostImpl", 1452 "cc.debug.quads"),
1453 this, TracedValue::FromValue(AsValueWithFrame(frame).release())); 1453 "cc::LayerTreeHostImpl",
1454 id_,
1455 TracedValue::FromValue(AsValueWithFrame(frame).release()));
1454 1456
1455 // Because the contents of the HUD depend on everything else in the frame, the 1457 // Because the contents of the HUD depend on everything else in the frame, the
1456 // contents of its texture are updated as the last thing before the frame is 1458 // contents of its texture are updated as the last thing before the frame is
1457 // drawn. 1459 // drawn.
1458 if (active_tree_->hud_layer()) { 1460 if (active_tree_->hud_layer()) {
1459 TRACE_EVENT0("cc", "DrawLayers.UpdateHudTexture"); 1461 TRACE_EVENT0("cc", "DrawLayers.UpdateHudTexture");
1460 active_tree_->hud_layer()->UpdateHudTexture( 1462 active_tree_->hud_layer()->UpdateHudTexture(
1461 GetDrawMode(output_surface_.get()), resource_provider_.get()); 1463 GetDrawMode(output_surface_.get()), resource_provider_.get());
1462 } 1464 }
1463 1465
(...skipping 1657 matching lines...) Expand 10 before | Expand all | Expand 10 after
3121 swap_promise_monitor_.erase(monitor); 3123 swap_promise_monitor_.erase(monitor);
3122 } 3124 }
3123 3125
3124 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() { 3126 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() {
3125 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); 3127 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin();
3126 for (; it != swap_promise_monitor_.end(); it++) 3128 for (; it != swap_promise_monitor_.end(); it++)
3127 (*it)->OnSetNeedsRedrawOnImpl(); 3129 (*it)->OnSetNeedsRedrawOnImpl();
3128 } 3130 }
3129 3131
3130 } // namespace cc 3132 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698