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; |
}; |