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

Unified Diff: cc/layers/heads_up_display_layer_impl.cc

Issue 634683003: Converted LayerImpl::bounds() to return SizeF. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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/layers/delegated_renderer_layer_impl.cc ('k') | cc/layers/layer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/heads_up_display_layer_impl.cc
diff --git a/cc/layers/heads_up_display_layer_impl.cc b/cc/layers/heads_up_display_layer_impl.cc
index ab9e8a460deab7e30949059608975800a0260794..7272725dc1a746ca14efbb8c3b05d9654f2d60e7 100644
--- a/cc/layers/heads_up_display_layer_impl.cc
+++ b/cc/layers/heads_up_display_layer_impl.cc
@@ -360,7 +360,7 @@ SkRect HeadsUpDisplayLayerImpl::DrawFPSDisplay(
int width = kGraphWidth + kHistogramWidth + 4 * kPadding;
int height = kFontHeight + kGraphHeight + 4 * kPadding + 2;
- int left = bounds().width() - width - right;
+ int left = ceil(bounds().width()) - width - right;
SkRect area = SkRect::MakeXYWH(left, top, width, height);
SkPaint paint = CreatePaint();
@@ -492,7 +492,7 @@ SkRect HeadsUpDisplayLayerImpl::DrawMemoryDisplay(SkCanvas* canvas,
const int kFontHeight = 13;
const int height = 3 * kFontHeight + 4 * kPadding;
- const int left = bounds().width() - width - right;
+ const int left = ceil(bounds().width()) - width - right;
const SkRect area = SkRect::MakeXYWH(left, top, width, height);
const double megabyte = 1024.0 * 1024.0;
@@ -547,7 +547,7 @@ SkRect HeadsUpDisplayLayerImpl::DrawPaintTimeDisplay(
const int width = kGraphWidth + 2 * kPadding;
const int height =
kFontHeight + kGraphHeight + 4 * kPadding + 2 + kFontHeight + kPadding;
- const int left = bounds().width() - width - right;
+ const int left = ceil(bounds().width()) - width - right;
const SkRect area = SkRect::MakeXYWH(left, top, width, height);
« no previous file with comments | « cc/layers/delegated_renderer_layer_impl.cc ('k') | cc/layers/layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698