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

Unified Diff: cc/trees/layer_tree_host.cc

Issue 16848010: Add LayerTreeHostClient::{will,did}UpdateLayer, report layer updates to DevTools (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: pass tree id to devtools, not vice versa Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: cc/trees/layer_tree_host.cc
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index 25366468f7d94cb79e7684661397e9aff288301f..f73e298a9f604ed7bd543e0b0deee9c8e5d8fdd9 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -17,6 +17,7 @@
#include "cc/animation/animation_registrar.h"
#include "cc/animation/layer_animation_controller.h"
#include "cc/base/math_util.h"
+#include "cc/debug/devtools_instrumentation.h"
#include "cc/debug/overdraw_metrics.h"
#include "cc/debug/rendering_stats_instrumentation.h"
#include "cc/input/top_controls_manager.h"
@@ -96,7 +97,8 @@ LayerTreeHost::LayerTreeHost(LayerTreeHostClient* client,
has_transparent_background_(false),
partial_texture_update_requests_(0),
in_paint_layer_contents_(false),
- total_frames_used_for_lcd_text_metrics_(0) {
+ total_frames_used_for_lcd_text_metrics_(0),
+ instrumentation_cookie_(0) {
nduca 2013/06/26 05:08:46 do you still need the cookie init now?
if (settings_.accelerated_animation_enabled)
animation_registrar_ = AnimationRegistrar::Create();
s_num_layer_tree_instances++;
@@ -946,6 +948,8 @@ bool LayerTreeHost::PaintLayerContents(
it->render_surface()->draw_opacity_is_animating());
need_more_updates |= PaintMasksForRenderSurface(*it, queue, stats_ptr);
} else if (it.represents_itself()) {
+ devtools_instrumentation::ScopedLayerTreeTask
+ update_layer(devtools_instrumentation::kUpdateLayer, it->id(), id());
DCHECK(!it->paint_properties().bounds.IsEmpty());
it->Update(queue, &occlusion_tracker, stats_ptr);
need_more_updates |= it->NeedMoreUpdates();

Powered by Google App Engine
This is Rietveld 408576698