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

Unified Diff: cc/heads_up_display_layer_impl.cc

Issue 11414017: cc: handling debug settings in new LayerTreeDebugState structure (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase to 170216 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/heads_up_display_layer_impl.h ('k') | cc/heads_up_display_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/heads_up_display_layer_impl.cc
diff --git a/cc/heads_up_display_layer_impl.cc b/cc/heads_up_display_layer_impl.cc
index 4faf68246e7f44d88531ae0cb8c19aa6f1bad2c6..fd57449e64ff5f2cde1f418130f6bea882dae56f 100644
--- a/cc/heads_up_display_layer_impl.cc
+++ b/cc/heads_up_display_layer_impl.cc
@@ -49,7 +49,6 @@ HeadsUpDisplayLayerImpl::HeadsUpDisplayLayerImpl(int id)
, m_averageFPS(0)
, m_minFPS(0)
, m_maxFPS(0)
- , m_showFPSCounter(false)
{
}
@@ -62,11 +61,6 @@ void HeadsUpDisplayLayerImpl::setFontAtlas(scoped_ptr<FontAtlas> fontAtlas)
m_fontAtlas = fontAtlas.Pass();
}
-void HeadsUpDisplayLayerImpl::setShowFPSCounter(bool show)
-{
- m_showFPSCounter = show;
-}
-
void HeadsUpDisplayLayerImpl::willDraw(ResourceProvider* resourceProvider)
{
LayerImpl::willDraw(resourceProvider);
@@ -150,9 +144,9 @@ bool HeadsUpDisplayLayerImpl::layerIsAlwaysDamaged() const
void HeadsUpDisplayLayerImpl::drawHudContents(SkCanvas* canvas)
{
- const LayerTreeSettings& settings = layerTreeHostImpl()->settings();
+ const LayerTreeDebugState& debugState = layerTreeHostImpl()->debugState();
- if (settings.showPlatformLayerTree) {
+ if (debugState.showPlatformLayerTree) {
SkPaint paint = createPaint();
paint.setColor(SkColorSetARGB(192, 0, 0, 0));
canvas->drawRect(SkRect::MakeXYWH(0, 0, bounds().width(), bounds().height()), paint);
@@ -160,15 +154,15 @@ void HeadsUpDisplayLayerImpl::drawHudContents(SkCanvas* canvas)
int platformLayerTreeTop = 0;
- if (m_showFPSCounter)
+ if (debugState.showFPSCounter)
platformLayerTreeTop = drawFPSCounter(canvas, layerTreeHostImpl()->fpsCounter());
- if (settings.showPlatformLayerTree && m_fontAtlas.get()) {
+ if (debugState.showPlatformLayerTree && m_fontAtlas) {
std::string layerTree = layerTreeHostImpl()->layerTreeAsText();
m_fontAtlas->drawText(canvas, createPaint(), layerTree, gfx::Point(2, platformLayerTreeTop), bounds());
}
- if (settings.showDebugRects())
+ if (debugState.showHudRects())
drawDebugRects(canvas, layerTreeHostImpl()->debugRectHistory());
}
« no previous file with comments | « cc/heads_up_display_layer_impl.h ('k') | cc/heads_up_display_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698