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

Unified Diff: services/ui/ws/viewport_metrics.h

Issue 2356913002: Pass device scale factor from display to ws. (Closed)
Patch Set: Created 4 years, 3 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: services/ui/ws/viewport_metrics.h
diff --git a/services/ui/ws/viewport_metrics.h b/services/ui/ws/viewport_metrics.h
new file mode 100644
index 0000000000000000000000000000000000000000..073688882e67a956683af4989c06489f955bd407
--- /dev/null
+++ b/services/ui/ws/viewport_metrics.h
@@ -0,0 +1,23 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SERVICES_UI_WS_VIEWPORT_METRICS_H_
+#define SERVICES_UI_WS_VIEWPORT_METRICS_H_
+
+#include "ui/gfx/geometry/rect.h"
+#include "ui/gfx/geometry/size.h"
+
+namespace ui {
+namespace ws {
+
+struct ViewportMetrics {
+ gfx::Rect bounds; // DIP.
+ gfx::Size pixel_size; // DDP
+ float device_scale_factor = 0.0f;
rjkroege 2016/09/21 13:23:47 see previous blither. cheaper to recompute from th
kylechar 2016/09/21 16:31:13 See my reply in other comment.
+};
+
+} // namespace ws
+} // namespace ui
+
+#endif // SERVICES_UI_WS_VIEWPORT_METRICS_H_

Powered by Google App Engine
This is Rietveld 408576698