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

Unified Diff: cc/layers/picture_layer_impl.cc

Issue 275173002: cc: Add a checkerboard trace event instant to picture layer impl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/picture_layer_impl.cc
diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc
index bd3b9dc590e413bf998aa6325f95d8fd36386239..9ebdc07d707abc9a479be553ea49598f7ad90b9d 100644
--- a/cc/layers/picture_layer_impl.cc
+++ b/cc/layers/picture_layer_impl.cc
@@ -237,6 +237,7 @@ void PictureLayerImpl::AppendQuads(QuadSink* quad_sink,
// unused can be considered for removal.
std::vector<PictureLayerTiling*> seen_tilings;
+ bool had_checkerboard_quads = false;
for (PictureLayerTilingSet::CoverageIterator iter(
tilings_.get(), contents_scale_x(), rect, ideal_contents_scale_);
iter;
@@ -251,6 +252,7 @@ void PictureLayerImpl::AppendQuads(QuadSink* quad_sink,
visible_geometry_rect.width() * visible_geometry_rect.height();
if (!*iter || !iter->IsReadyToDraw()) {
+ had_checkerboard_quads = true;
if (draw_checkerboard_for_missing_tiles()) {
scoped_ptr<CheckerboardDrawQuad> quad = CheckerboardDrawQuad::Create();
SkColor color = DebugColors::DefaultCheckerboardColor();
@@ -346,6 +348,12 @@ void PictureLayerImpl::AppendQuads(QuadSink* quad_sink,
seen_tilings.push_back(iter.CurrentTiling());
}
+ if (had_checkerboard_quads) {
+ TRACE_EVENT_INSTANT0("cc",
+ "PictureLayerImpl::AppendQuads checkerboard",
+ TRACE_EVENT_SCOPE_THREAD);
+ }
+
// Aggressively remove any tilings that are not seen to save memory. Note
// that this is at the expense of doing cause more frequent re-painting. A
// better scheme would be to maintain a tighter visible_content_rect for the
« 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