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

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: compilefix Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layers/picture_layer.h ('k') | cc/layers/picture_layer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/picture_layer.cc
diff --git a/cc/layers/picture_layer.cc b/cc/layers/picture_layer.cc
index d175a57c799feabbdddc124e65ea4ad21cdcc47f..30e7e2d3547ae6be615d97245f60b4e872cbd26d 100644
--- a/cc/layers/picture_layer.cc
+++ b/cc/layers/picture_layer.cc
@@ -5,6 +5,7 @@
#include "cc/layers/picture_layer.h"
#include "base/auto_reset.h"
+#include "cc/debug/debug_rect_history.h"
#include "cc/layers/content_layer_client.h"
#include "cc/layers/picture_layer_impl.h"
#include "cc/trees/layer_tree_impl.h"
@@ -21,6 +22,8 @@ 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()) {
}
@@ -53,6 +56,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->debug_invalidation_.clear();
+ layer_impl->debug_invalidation_.swap(debug_invalidation_);
layer_impl->pile_ = PicturePileImpl::CreateFromOther(pile_.get());
}
@@ -110,6 +115,18 @@ 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()) {
+ scoped_refptr<LayerDebugInfo> debug_info = TakeDebugInfo();
+ if (debug_info.get()) {
+ debug_invalidation_ = debug_info->GetInvalidationRects(this);
+ }
+ }
+
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.
« no previous file with comments | « cc/layers/picture_layer.h ('k') | cc/layers/picture_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698