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

Side by Side Diff: chrome/browser/android/vr_shell/ui_elements/textured_element.h

Issue 2950173002: VR: System indicator rework. (Closed)
Patch Set: Address comments; increase size slightly for readability, now that position is dynamic. Created 3 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_TEXTURED_ELEMENT_H_ 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_TEXTURED_ELEMENT_H_
6 #define CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_TEXTURED_ELEMENT_H_ 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_TEXTURED_ELEMENT_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "chrome/browser/android/vr_shell/ui_elements/ui_element.h" 9 #include "chrome/browser/android/vr_shell/ui_elements/ui_element.h"
10 #include "ui/gfx/geometry/size.h" 10 #include "ui/gfx/geometry/size.h"
(...skipping 15 matching lines...) Expand all
26 26
27 void Initialize() final; 27 void Initialize() final;
28 28
29 // UiElement interface. 29 // UiElement interface.
30 void Render(UiElementRenderer* renderer, 30 void Render(UiElementRenderer* renderer,
31 gfx::Transform view_proj_matrix) const final; 31 gfx::Transform view_proj_matrix) const final;
32 32
33 protected: 33 protected:
34 virtual UiTexture* GetTexture() const = 0; 34 virtual UiTexture* GetTexture() const = 0;
35 virtual void UpdateTexture(); 35 virtual void UpdateTexture();
36 virtual void UpdateElementSize();
36 37
37 private: 38 private:
38 void Flush(SkSurface* surface); 39 void Flush(SkSurface* surface);
39 void OnSetMode() override; 40 void OnSetMode() override;
40 41
41 gfx::Size texture_size_; 42 gfx::Size texture_size_;
42 GLuint texture_handle_; 43 GLuint texture_handle_;
43 int maximum_width_; 44 int maximum_width_;
44 bool initialized_ = false; 45 bool initialized_ = false;
45 46
46 DISALLOW_COPY_AND_ASSIGN(TexturedElement); 47 DISALLOW_COPY_AND_ASSIGN(TexturedElement);
47 }; 48 };
48 49
49 } // namespace vr_shell 50 } // namespace vr_shell
50 51
51 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_TEXTURED_ELEMENT_H_ 52 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_TEXTURED_ELEMENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698