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

Side by Side Diff: cc/layers/content_layer.cc

Issue 16903005: Add layer name into frame viewer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move pulling name to Update Created 7 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
OLDNEW
1 // Copyright 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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/layers/content_layer.h" 5 #include "cc/layers/content_layer.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/debug/trace_event.h"
8 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
9 #include "base/time.h" 10 #include "base/time.h"
10 #include "cc/layers/content_layer_client.h" 11 #include "cc/layers/content_layer_client.h"
11 #include "cc/resources/bitmap_content_layer_updater.h" 12 #include "cc/resources/bitmap_content_layer_updater.h"
12 #include "cc/resources/bitmap_skpicture_content_layer_updater.h" 13 #include "cc/resources/bitmap_skpicture_content_layer_updater.h"
13 #include "cc/resources/layer_painter.h" 14 #include "cc/resources/layer_painter.h"
14 #include "cc/trees/layer_tree_host.h" 15 #include "cc/trees/layer_tree_host.h"
15 16
16 namespace cc { 17 namespace cc {
17 18
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 const OcclusionTracker* occlusion, 72 const OcclusionTracker* occlusion,
72 RenderingStats* stats) { 73 RenderingStats* stats) {
73 { 74 {
74 base::AutoReset<bool> ignore_set_needs_commit(&ignore_set_needs_commit_, 75 base::AutoReset<bool> ignore_set_needs_commit(&ignore_set_needs_commit_,
75 true); 76 true);
76 77
77 CreateUpdaterIfNeeded(); 78 CreateUpdaterIfNeeded();
78 UpdateCanUseLCDText(); 79 UpdateCanUseLCDText();
79 } 80 }
80 81
82 bool is_tracing;
83 TRACE_EVENT_CATEGORY_GROUP_ENABLED("cc", &is_tracing);
84 if (is_tracing)
85 SetDebugName(DebugName());
86 else
87 SetDebugName(std::string());
88
81 TiledLayer::Update(queue, occlusion, stats); 89 TiledLayer::Update(queue, occlusion, stats);
82 needs_display_ = false; 90 needs_display_ = false;
83 } 91 }
84 92
85 bool ContentLayer::NeedMoreUpdates() { 93 bool ContentLayer::NeedMoreUpdates() {
86 return NeedsIdlePaint(); 94 return NeedsIdlePaint();
87 } 95 }
88 96
89 LayerUpdater* ContentLayer::Updater() const { 97 LayerUpdater* ContentLayer::Updater() const {
90 return updater_.get(); 98 return updater_.get();
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 133
126 can_use_lcd_text_last_frame_ = can_use_lcd_text(); 134 can_use_lcd_text_last_frame_ = can_use_lcd_text();
127 if (client_) 135 if (client_)
128 client_->DidChangeLayerCanUseLCDText(); 136 client_->DidChangeLayerCanUseLCDText();
129 } 137 }
130 138
131 bool ContentLayer::SupportsLCDText() const { 139 bool ContentLayer::SupportsLCDText() const {
132 return true; 140 return true;
133 } 141 }
134 142
143 std::string ContentLayer::DebugName() {
144 return client_->DebugName();
145 }
146
135 } // namespace cc 147 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698