| Index: chrome/browser/android/vr_shell/ui_elements/ui_element.h
|
| diff --git a/chrome/browser/android/vr_shell/ui_elements/ui_element.h b/chrome/browser/android/vr_shell/ui_elements/ui_element.h
|
| index da5d829c4cab8cf7bf62d7f299cf9c309f05d8e4..5948fea688c2ab39493b281f8b44407a27d2e6a2 100644
|
| --- a/chrome/browser/android/vr_shell/ui_elements/ui_element.h
|
| +++ b/chrome/browser/android/vr_shell/ui_elements/ui_element.h
|
| @@ -20,6 +20,7 @@ namespace vr_shell {
|
|
|
| class Animation;
|
| class VrShellRenderer;
|
| +class VrSurfaceProvider;
|
|
|
| enum XAnchoring {
|
| XNONE = 0,
|
| @@ -104,7 +105,7 @@ class UiElement : public WorldRectangle {
|
| virtual void Render(VrShellRenderer* renderer,
|
| vr::Mat4f view_proj_matrix) const;
|
|
|
| - virtual void Initialize();
|
| + void Initialize(VrSurfaceProvider* provider);
|
|
|
| // Controller interaction methods.
|
| virtual void OnHoverEnter();
|
| @@ -219,6 +220,12 @@ class UiElement : public WorldRectangle {
|
| bool dirty() const { return dirty_; }
|
| void set_dirty(bool dirty) { dirty_ = dirty; }
|
|
|
| + protected:
|
| + virtual void Initialize();
|
| +
|
| + // This obtains a GPU-backed surface. Only valid after initialized.
|
| + VrSurfaceProvider* surface_provider() { return surface_provider_; }
|
| +
|
| private:
|
| // Valid IDs are non-negative.
|
| int id_ = -1;
|
| @@ -285,6 +292,8 @@ class UiElement : public WorldRectangle {
|
|
|
| Transform transform_;
|
|
|
| + VrSurfaceProvider* surface_provider_ = nullptr;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(UiElement);
|
| };
|
|
|
|
|