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

Unified Diff: ui/aura/root_window.cc

Issue 11275089: SkRect to gfx::Rect type conversions. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
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
Index: ui/aura/root_window.cc
diff --git a/ui/aura/root_window.cc b/ui/aura/root_window.cc
index d9e70eada851c636bd0249a53408ee447cfe7d0c..f3218c5466dae53e76e7efdd10859c1997b264b0 100644
--- a/ui/aura/root_window.cc
+++ b/ui/aura/root_window.cc
@@ -39,6 +39,8 @@
#include "ui/gfx/display.h"
#include "ui/gfx/point3_f.h"
#include "ui/gfx/point_conversions.h"
+#include "ui/gfx/rect_f.h"
+#include "ui/gfx/rect_conversions.h"
#include "ui/gfx/screen.h"
using std::vector;
@@ -921,9 +923,9 @@ void RootWindow::OnHostResized(const gfx::Size& size) {
gfx::Size old(bounds().size());
// The layer, and all the observers should be notified of the
// transformed size of the root window.
- gfx::Rect bounds(ui::ConvertSizeToDIP(layer(), size));
+ gfx::RectF bounds(ui::ConvertSizeToDIP(layer(), size));
layer()->transform().TransformRect(&bounds);
- SetBounds(bounds);
+ SetBounds(gfx::ToEnclosingRect(bounds));
FOR_EACH_OBSERVER(RootWindowObserver, observers_,
OnRootWindowResized(this, old));
}

Powered by Google App Engine
This is Rietveld 408576698