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

Unified Diff: cc/layers/picture_layer.cc

Issue 474783002: HUD: Show first paint invalidation in red (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update only when needed Created 6 years, 4 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/layers/picture_layer.cc
diff --git a/cc/layers/picture_layer.cc b/cc/layers/picture_layer.cc
index 8b8558ce7f4e59654cd85c257b19755ec04c469e..361a5857624a1df3fbdce0338913fb4da0037745 100644
--- a/cc/layers/picture_layer.cc
+++ b/cc/layers/picture_layer.cc
@@ -21,6 +21,7 @@ PictureLayer::PictureLayer(ContentLayerClient* client)
: client_(client),
pile_(make_scoped_refptr(new PicturePile())),
instrumentation_object_tracker_(id()),
+ includes_first_paint_invalidation_(false),
is_mask_(false),
update_source_frame_number_(-1),
can_use_lcd_text_last_frame_(can_use_lcd_text()) {
@@ -56,6 +57,8 @@ void PictureLayer::PushPropertiesTo(LayerImpl* base_layer) {
// See PictureLayerImpl::PushPropertiesTo for more details.
layer_impl->invalidation_.Clear();
layer_impl->invalidation_.Swap(&pile_invalidation_);
+ layer_impl->SetIncludesFirstPaintInvalidation(
+ includes_first_paint_invalidation_);
layer_impl->pile_ = PicturePileImpl::CreateFromOther(pile_.get());
}
@@ -113,6 +116,19 @@ bool PictureLayer::Update(ResourceUpdateQueue* queue,
pending_invalidation_.Swap(&pile_invalidation_);
pending_invalidation_.Clear();
+ bool is_tracing;
+ TRACE_EVENT_CATEGORY_GROUP_ENABLED(
+ TRACE_DISABLED_BY_DEFAULT("cc.debug") "," TRACE_DISABLED_BY_DEFAULT(
+ "devtools.timeline.layers"),
+ &is_tracing);
+ if (is_tracing || layer_tree_host()->debug_state().ShowHudInfo()) {
+ includes_first_paint_invalidation_ = false;
+ if (scoped_refptr<LayerDebugInfo> debug_info = TakeDebugInfo()) {
+ includes_first_paint_invalidation_ =
+ debug_info->IncludesFirstPaintInvalidation();
+ }
+ }
+
if (layer_tree_host()->settings().record_full_layer) {
// Workaround for http://crbug.com/235910 - to retain backwards compat
// the full page content must always be provided in the picture layer.

Powered by Google App Engine
This is Rietveld 408576698