Index: sky/engine/core/view/View.h |
diff --git a/sky/engine/core/view/View.h b/sky/engine/core/view/View.h |
index edb3d567bece2498ba9513ba063c6fb9038792d7..e06c02618c500071a465ac488549872bfc7cbd1d 100644 |
--- a/sky/engine/core/view/View.h |
+++ b/sky/engine/core/view/View.h |
@@ -6,7 +6,9 @@ |
#define SKY_ENGINE_CORE_VIEW_VIEW_H_ |
#include "base/callback.h" |
+#include "base/time/time.h" |
#include "sky/engine/core/painting/Picture.h" |
+#include "sky/engine/core/view/BeginFrameCallback.h" |
#include "sky/engine/core/view/EventCallback.h" |
#include "sky/engine/public/platform/sky_display_metrics.h" |
#include "sky/engine/tonic/dart_wrappable.h" |
@@ -19,7 +21,7 @@ class View : public RefCounted<View>, public DartWrappable { |
DEFINE_WRAPPERTYPEINFO(); |
public: |
~View() override; |
- static PassRefPtr<View> create(const base::Closure& schedulePaintCallback); |
+ static PassRefPtr<View> create(const base::Closure& scheduleFrameCallback); |
double devicePixelRatio() const { return m_displayMetrics.device_pixel_ratio; } |
double width() const; |
@@ -30,17 +32,20 @@ public: |
void setEventCallback(PassOwnPtr<EventCallback> callback); |
- void schedulePaint(); |
+ void setBeginFrameCallback(PassOwnPtr<BeginFrameCallback> callback); |
+ void scheduleFrame(); |
void setDisplayMetrics(const SkyDisplayMetrics& metrics); |
bool handleInputEvent(PassRefPtr<Event> event); |
+ void beginFrame(base::TimeTicks frameTime); |
private: |
- explicit View(const base::Closure& schedulePaintCallback); |
+ explicit View(const base::Closure& scheduleFrameCallback); |
- base::Closure m_schedulePaintCallback; |
+ base::Closure m_scheduleFrameCallback; |
SkyDisplayMetrics m_displayMetrics; |
OwnPtr<EventCallback> m_eventCallback; |
+ OwnPtr<BeginFrameCallback> m_beginFrameCallback; |
RefPtr<Picture> m_picture; |
}; |