| OLD | NEW | 
|---|
| 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_GL_UTIL_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_GL_UTIL_H_ | 
| 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_GL_UTIL_H_ | 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_GL_UTIL_H_ | 
| 7 | 7 | 
| 8 #include <array> | 8 #include <array> | 
| 9 #include <string> | 9 #include <string> | 
| 10 | 10 | 
| 11 #include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/
    gvr_types.h" | 11 #include "device/vr/vr_types.h" | 
| 12 #include "ui/gl/gl_bindings.h" | 12 #include "ui/gl/gl_bindings.h" | 
| 13 | 13 | 
| 14 namespace vr_shell { | 14 namespace vr_shell { | 
| 15 | 15 | 
| 16 std::array<float, 16> MatrixToGLArray(const gvr::Mat4f& matrix); | 16 std::array<float, 16> MatrixToGLArray(const vr::Mat4f& matrix); | 
| 17 | 17 | 
| 18 gvr::Rectf ModulateRect(const gvr::Rectf& rect, float width, float height); | 18 gfx::Rect CalculatePixelSpaceRect(const gfx::Size& texture_size, | 
| 19 | 19                                   const gfx::RectF& texture_rect); | 
| 20 gvr::Recti CalculatePixelSpaceRect(const gvr::Sizei& texture_size, |  | 
| 21                                    const gvr::Rectf& texture_rect); |  | 
| 22 | 20 | 
| 23 // Compile a shader. | 21 // Compile a shader. | 
| 24 GLuint CompileShader(GLenum shader_type, | 22 GLuint CompileShader(GLenum shader_type, | 
| 25                      const GLchar* shader_source, | 23                      const GLchar* shader_source, | 
| 26                      std::string& error); | 24                      std::string& error); | 
| 27 | 25 | 
| 28 // Compile and link a program. | 26 // Compile and link a program. | 
| 29 GLuint CreateAndLinkProgram(GLuint vertex_shader_handle, | 27 GLuint CreateAndLinkProgram(GLuint vertex_shader_handle, | 
| 30                             GLuint fragment_shader_handle, | 28                             GLuint fragment_shader_handle, | 
| 31                             std::string& error); | 29                             std::string& error); | 
| 32 | 30 | 
| 33 }  // namespace vr_shell | 31 }  // namespace vr_shell | 
| 34 | 32 | 
| 35 #endif  // CHROME_BROWSER_ANDROID_VR_SHELL_VR_GL_UTIL_H_ | 33 #endif  // CHROME_BROWSER_ANDROID_VR_SHELL_VR_GL_UTIL_H_ | 
| OLD | NEW | 
|---|