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

Unified Diff: cc/debug_rect_history.cc

Issue 11377122: cc: Visualize non-occluding rects in composited layers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 1 month 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/debug_rect_history.h ('k') | cc/heads_up_display_layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/debug_rect_history.cc
diff --git a/cc/debug_rect_history.cc b/cc/debug_rect_history.cc
index 02ece2cff7266520ea6314dcf605268bc2dbedfc..6d7fa8aca2b93d37c2ba24b2835aa37a5a39ae13 100644
--- a/cc/debug_rect_history.cc
+++ b/cc/debug_rect_history.cc
@@ -24,7 +24,7 @@ DebugRectHistory::~DebugRectHistory()
{
}
-void DebugRectHistory::saveDebugRectsForCurrentFrame(LayerImpl* rootLayer, const std::vector<LayerImpl*>& renderSurfaceLayerList, const std::vector<gfx::Rect>& occludingScreenSpaceRects, const LayerTreeSettings& settings)
+void DebugRectHistory::saveDebugRectsForCurrentFrame(LayerImpl* rootLayer, const std::vector<LayerImpl*>& renderSurfaceLayerList, const std::vector<gfx::Rect>& occludingScreenSpaceRects, const std::vector<gfx::Rect>& nonOccludingScreenSpaceRects, const LayerTreeSettings& settings)
{
// For now, clear all rects from previous frames. In the future we may want to store
// all debug rects for a history of many frames.
@@ -44,6 +44,9 @@ void DebugRectHistory::saveDebugRectsForCurrentFrame(LayerImpl* rootLayer, const
if (settings.showOccludingRects)
saveOccludingRects(occludingScreenSpaceRects);
+
+ if (settings.showNonOccludingRects)
+ saveNonOccludingRects(nonOccludingScreenSpaceRects);
}
@@ -118,4 +121,10 @@ void DebugRectHistory::saveOccludingRects(const std::vector<gfx::Rect>& occludin
m_debugRects.push_back(DebugRect(OccludingRectType, occludingRects[i]));
}
+void DebugRectHistory::saveNonOccludingRects(const std::vector<gfx::Rect>& nonOccludingRects)
+{
+ for (size_t i = 0; i < nonOccludingRects.size(); ++i)
+ m_debugRects.push_back(DebugRect(NonOccludingRectType, nonOccludingRects[i]));
+}
+
} // namespace cc
« no previous file with comments | « cc/debug_rect_history.h ('k') | cc/heads_up_display_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698