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

Unified Diff: ui/aura/window_tree_host.cc

Issue 2524873002: Rename WindowTreeHost G|SetBounds to indicate they are in pixels. (Closed)
Patch Set: rebase Created 4 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 | « ui/aura/window_tree_host.h ('k') | ui/aura/window_tree_host_platform.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/window_tree_host.cc
diff --git a/ui/aura/window_tree_host.cc b/ui/aura/window_tree_host.cc
index ef626257d735d2d0a96387217a894573dfe41d8b..d582543b0b94d891c0146c52b1d6c5e99c4776ef 100644
--- a/ui/aura/window_tree_host.cc
+++ b/ui/aura/window_tree_host.cc
@@ -61,14 +61,14 @@ WindowTreeHost* WindowTreeHost::GetForAcceleratedWidget(
void WindowTreeHost::InitHost() {
InitCompositor();
- UpdateRootWindowSize(GetBounds().size());
+ UpdateRootWindowSize(GetBoundsInPixels().size());
Env::GetInstance()->NotifyHostInitialized(this);
window()->Show();
}
void WindowTreeHost::InitCompositor() {
compositor_->SetScaleAndSize(GetDeviceScaleFactorFromDisplay(window()),
- GetBounds().size());
+ GetBoundsInPixels().size());
compositor_->SetRootLayer(window()->layer());
compositor_->SetDisplayColorSpace(
GetICCProfileForCurrentDisplay().GetColorSpace());
@@ -96,7 +96,7 @@ gfx::Transform WindowTreeHost::GetRootTransform() const {
void WindowTreeHost::SetRootTransform(const gfx::Transform& transform) {
window()->SetTransform(transform);
- UpdateRootWindowSize(GetBounds().size());
+ UpdateRootWindowSize(GetBoundsInPixels().size());
}
gfx::Transform WindowTreeHost::GetInverseRootTransform() const {
@@ -112,7 +112,7 @@ void WindowTreeHost::SetOutputSurfacePadding(const gfx::Insets& padding) {
return;
output_surface_padding_ = padding;
- OnHostResized(GetBounds().size());
+ OnHostResized(GetBoundsInPixels().size());
}
void WindowTreeHost::UpdateRootWindowSize(const gfx::Size& host_size) {
@@ -285,7 +285,7 @@ void WindowTreeHost::OnHostResized(const gfx::Size& new_size) {
compositor_->SetScaleAndSize(GetDeviceScaleFactorFromDisplay(window()),
adjusted_size);
- gfx::Size layer_size = GetBounds().size();
+ gfx::Size layer_size = GetBoundsInPixels().size();
// The layer, and the observers should be notified of the
// transformed size of the root window.
UpdateRootWindowSize(layer_size);
« no previous file with comments | « ui/aura/window_tree_host.h ('k') | ui/aura/window_tree_host_platform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698