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

Unified Diff: sky/engine/core/view/View.h

Issue 1139823010: Plumb display metrics into SkyView (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 7 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 | « no previous file | sky/engine/core/view/View.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/view/View.h
diff --git a/sky/engine/core/view/View.h b/sky/engine/core/view/View.h
index 756874c3b3e21e231a75f8a58fa1d0a14ab1fd16..f1306ee02c92c2db7d913cbaf31f12e65181f071 100644
--- a/sky/engine/core/view/View.h
+++ b/sky/engine/core/view/View.h
@@ -7,6 +7,7 @@
#include "base/callback.h"
#include "sky/engine/core/painting/Picture.h"
+#include "sky/engine/public/platform/sky_display_metrics.h"
#include "sky/engine/tonic/dart_wrappable.h"
#include "sky/engine/wtf/PassRefPtr.h"
#include "sky/engine/wtf/RefCounted.h"
@@ -19,15 +20,22 @@ public:
~View() override;
static PassRefPtr<View> create(const base::Closure& schedulePaintCallback);
+ double devicePixelRatio() const { return m_displayMetrics.device_pixel_ratio; }
+ double width() const;
eseidel 2015/05/19 21:51:53 We're going to want a Size object. @mpcomplete.
+ double height() const;
+
Picture* picture() const { return m_picture.get(); }
void setPicture(Picture* picture) { m_picture = picture; }
void schedulePaint();
+ void setDisplayMetrics(const SkyDisplayMetrics& metrics);
+
private:
explicit View(const base::Closure& schedulePaintCallback);
base::Closure m_schedulePaintCallback;
+ SkyDisplayMetrics m_displayMetrics;
RefPtr<Picture> m_picture;
};
« no previous file with comments | « no previous file | sky/engine/core/view/View.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698