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

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: fixing tests 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
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..2b0ea1e430430c28cc285d0ce517f991a9b6609c 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.get()) {
danakj 2012/11/27 20:23:15 drop the .get() while we're here
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());
}

Powered by Google App Engine
This is Rietveld 408576698