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

Side by Side Diff: chrome/browser/android/vr_shell/vr_shell_renderer.h

Issue 2624243002: VrShell: Allow native control of UI element opacity. (Closed)
Patch Set: for (auto nit : nits) nit.fix(); Created 3 years, 11 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_VR_SHELL_RENDERER_H_ 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_RENDERER_H_
6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_RENDERER_H_ 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_RENDERER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 DISALLOW_COPY_AND_ASSIGN(BaseRenderer); 46 DISALLOW_COPY_AND_ASSIGN(BaseRenderer);
47 }; 47 };
48 48
49 class TexturedQuadRenderer : public BaseRenderer { 49 class TexturedQuadRenderer : public BaseRenderer {
50 public: 50 public:
51 TexturedQuadRenderer(); 51 TexturedQuadRenderer();
52 ~TexturedQuadRenderer() override; 52 ~TexturedQuadRenderer() override;
53 53
54 // Draw the content rect in the texture quad. 54 // Draw the content rect in the texture quad.
55 void Draw(int texture_data_handle, const gvr::Mat4f& combined_matrix, 55 void Draw(int texture_data_handle, const gvr::Mat4f& combined_matrix,
56 const Rectf& copy_rect); 56 const Rectf& copy_rect, float opacity);
57 57
58 private: 58 private:
59 GLuint combined_matrix_handle_; 59 GLuint combined_matrix_handle_;
60 GLuint copy_rect_uniform_handle_; 60 GLuint copy_rect_uniform_handle_;
61 GLuint tex_uniform_handle_; 61 GLuint tex_uniform_handle_;
62 GLuint opacity_handle_;
62 63
63 DISALLOW_COPY_AND_ASSIGN(TexturedQuadRenderer); 64 DISALLOW_COPY_AND_ASSIGN(TexturedQuadRenderer);
64 }; 65 };
65 66
66 // Renders a page-generated stereo VR view. 67 // Renders a page-generated stereo VR view.
67 class WebVrRenderer : public BaseRenderer { 68 class WebVrRenderer : public BaseRenderer {
68 public: 69 public:
69 WebVrRenderer(); 70 WebVrRenderer();
70 ~WebVrRenderer() override; 71 ~WebVrRenderer() override;
71 72
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 std::unique_ptr<WebVrRenderer> webvr_renderer_; 147 std::unique_ptr<WebVrRenderer> webvr_renderer_;
147 std::unique_ptr<ReticleRenderer> reticle_renderer_; 148 std::unique_ptr<ReticleRenderer> reticle_renderer_;
148 std::unique_ptr<LaserRenderer> laser_renderer_; 149 std::unique_ptr<LaserRenderer> laser_renderer_;
149 150
150 DISALLOW_COPY_AND_ASSIGN(VrShellRenderer); 151 DISALLOW_COPY_AND_ASSIGN(VrShellRenderer);
151 }; 152 };
152 153
153 } // namespace vr_shell 154 } // namespace vr_shell
154 155
155 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_RENDERER_H_ 156 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_RENDERER_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/vr_shell_gl.cc ('k') | chrome/browser/android/vr_shell/vr_shell_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698