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

Unified Diff: cc/heads_up_display_layer_impl.cc

Issue 11360010: cc: Pass gfx::Size type to FontAtlas drawText() function. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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/font_atlas.cc ('k') | no next file » | 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 381fff569178f1bd01fadcd38180f3e4fd87cad4..873cf754742eec9654f1cab6b2936a671500ef7c 100644
--- a/cc/heads_up_display_layer_impl.cc
+++ b/cc/heads_up_display_layer_impl.cc
@@ -157,7 +157,8 @@ void HeadsUpDisplayLayerImpl::drawHudContents(SkCanvas* canvas)
if (settings.showPlatformLayerTree && m_fontAtlas.get()) {
std::string layerTree = layerTreeHostImpl()->layerTreeAsText();
- m_fontAtlas->drawText(canvas, createPaint(), layerTree, gfx::Point(2, platformLayerTreeTop), bounds());
+ gfx::Size clip_bounds(bounds().width(), bounds().height());
+ m_fontAtlas->drawText(canvas, createPaint(), layerTree, gfx::Point(2, platformLayerTreeTop), clip_bounds);
danakj 2012/10/31 16:29:30 Shouldn't need this bit. Just pass bounds() direct
tfarina 2012/10/31 16:32:23 Ah, nice! Didn't know that. Done.
}
if (settings.showDebugRects())
@@ -232,7 +233,7 @@ void HeadsUpDisplayLayerImpl::drawFPSCounterText(SkCanvas* canvas, FrameRateCoun
// Draw FPS text.
if (m_fontAtlas.get())
- m_fontAtlas->drawText(canvas, createPaint(), base::StringPrintf("FPS: %4.1f +/- %3.1f", averageFPS, stdDeviation), gfx::Point(10, height / 3), IntSize(width, height));
+ m_fontAtlas->drawText(canvas, createPaint(), base::StringPrintf("FPS: %4.1f +/- %3.1f", averageFPS, stdDeviation), gfx::Point(10, height / 3), gfx::Size(width, height));
}
void HeadsUpDisplayLayerImpl::drawDebugRects(SkCanvas* canvas, DebugRectHistory* debugRectHistory)
« no previous file with comments | « cc/font_atlas.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698