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

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

Issue 2668093002: VrShell background implemented in JS. (Closed)
Patch Set: Fixed tests Created 3 years, 10 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 #include "chrome/browser/android/vr_shell/vr_shell_renderer.h" 5 #include "chrome/browser/android/vr_shell/vr_shell_renderer.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <string> 9 #include <string>
10 10
11 #include "chrome/browser/android/vr_shell/vr_gl_util.h" 11 #include "chrome/browser/android/vr_shell/vr_gl_util.h"
12 12
13 namespace { 13 namespace {
14 14
15 #define RECTANGULAR_TEXTURE_BUFFER(left, right, bottom, top) \ 15 #define RECTANGULAR_TEXTURE_BUFFER(left, right, bottom, top) \
16 { left, bottom, left, top, right, bottom, left, top, right, top, right, \ 16 { left, bottom, left, top, right, bottom, left, top, right, top, right, \
17 bottom } 17 bottom }
18 18
19 static constexpr float kHalfHeight = 0.5f; 19 static constexpr float kHalfSize = 0.5f;
20 static constexpr float kHalfWidth = 0.5f;
21 static constexpr float kTextureQuadPosition[18] = { 20 static constexpr float kTextureQuadPosition[18] = {
22 -kHalfWidth, kHalfHeight, 0.0f, -kHalfWidth, -kHalfHeight, 0.0f, 21 -kHalfSize, kHalfSize, 0.0f, -kHalfSize, -kHalfSize, 0.0f,
23 kHalfWidth, kHalfHeight, 0.0f, -kHalfWidth, -kHalfHeight, 0.0f, 22 kHalfSize, kHalfSize, 0.0f, -kHalfSize, -kHalfSize, 0.0f,
24 kHalfWidth, -kHalfHeight, 0.0f, kHalfWidth, kHalfHeight, 0.0f}; 23 kHalfSize, -kHalfSize, 0.0f, kHalfSize, kHalfSize, 0.0f};
25 static constexpr int kPositionDataSize = 3; 24 static constexpr int kPositionDataSize = 3;
26 // Number of vertices passed to glDrawArrays(). 25 // Number of vertices passed to glDrawArrays().
27 static constexpr int kVerticesNumber = 6; 26 static constexpr int kVerticesNumber = 6;
28 27
29 static constexpr float kTexturedQuadTextureCoordinates[12] = 28 static constexpr float kTexturedQuadTextureCoordinates[12] =
30 RECTANGULAR_TEXTURE_BUFFER(0.0f, 1.0f, 0.0f, 1.0f); 29 RECTANGULAR_TEXTURE_BUFFER(0.0f, 1.0f, 0.0f, 1.0f);
31 30
32 static constexpr int kTextureCoordinateDataSize = 2; 31 static constexpr int kTextureCoordinateDataSize = 2;
33 32
34 static constexpr float kWebVrVertices[16] = { 33 static constexpr float kWebVrVertices[16] = {
(...skipping 13 matching lines...) Expand all
48 static constexpr float kMidRingOpacity = 0.22f; 47 static constexpr float kMidRingOpacity = 0.22f;
49 static constexpr float kReticleColor[] = {1.0f, 1.0f, 1.0f, 1.0f}; 48 static constexpr float kReticleColor[] = {1.0f, 1.0f, 1.0f, 1.0f};
50 49
51 // Laser constants 50 // Laser constants
52 static constexpr float kFadeEnd = 0.535; 51 static constexpr float kFadeEnd = 0.535;
53 static constexpr float kFadePoint = 0.5335; 52 static constexpr float kFadePoint = 0.5335;
54 static constexpr float kLaserColor[] = {1.0f, 1.0f, 1.0f, 0.5f}; 53 static constexpr float kLaserColor[] = {1.0f, 1.0f, 1.0f, 0.5f};
55 static constexpr int kLaserDataWidth = 48; 54 static constexpr int kLaserDataWidth = 48;
56 static constexpr int kLaserDataHeight = 1; 55 static constexpr int kLaserDataHeight = 1;
57 56
58 // Background constants.
59 static constexpr float kGroundTileSize = 2.5f;
60 static constexpr float kGroundMaxSize = 25.0f;
61 static constexpr float kGroundYPosition = -2.0f;
62
63 // Laser texture data, 48x1 RGBA. 57 // Laser texture data, 48x1 RGBA.
64 // TODO(mthiesse): As we add more resources for VR Shell, we should put them 58 // TODO(mthiesse): As we add more resources for VR Shell, we should put them
65 // in Chrome's resource files. 59 // in Chrome's resource files.
66 static const unsigned char kLaserData[] = 60 static const unsigned char kLaserData[] =
67 "\xff\xff\xff\x01\xff\xff\xff\x02\xbf\xbf\xbf\x04\xcc\xcc\xcc\x05\xdb\xdb" 61 "\xff\xff\xff\x01\xff\xff\xff\x02\xbf\xbf\xbf\x04\xcc\xcc\xcc\x05\xdb\xdb"
68 "\xdb\x07\xcc\xcc\xcc\x0a\xd8\xd8\xd8\x0d\xd2\xd2\xd2\x11\xce\xce\xce\x15" 62 "\xdb\x07\xcc\xcc\xcc\x0a\xd8\xd8\xd8\x0d\xd2\xd2\xd2\x11\xce\xce\xce\x15"
69 "\xce\xce\xce\x1a\xce\xce\xce\x1f\xcd\xcd\xcd\x24\xc8\xc8\xc8\x2a\xc9\xc9" 63 "\xce\xce\xce\x1a\xce\xce\xce\x1f\xcd\xcd\xcd\x24\xc8\xc8\xc8\x2a\xc9\xc9"
70 "\xc9\x2f\xc9\xc9\xc9\x34\xc9\xc9\xc9\x39\xc9\xc9\xc9\x3d\xc8\xc8\xc8\x41" 64 "\xc9\x2f\xc9\xc9\xc9\x34\xc9\xc9\xc9\x39\xc9\xc9\xc9\x3d\xc8\xc8\xc8\x41"
71 "\xcb\xcb\xcb\x44\xee\xee\xee\x87\xfa\xfa\xfa\xc8\xf9\xf9\xf9\xc9\xf9\xf9" 65 "\xcb\xcb\xcb\x44\xee\xee\xee\x87\xfa\xfa\xfa\xc8\xf9\xf9\xf9\xc9\xf9\xf9"
72 "\xf9\xc9\xfa\xfa\xfa\xc9\xfa\xfa\xfa\xc9\xf9\xf9\xf9\xc9\xf9\xf9\xf9\xc9" 66 "\xf9\xc9\xfa\xfa\xfa\xc9\xfa\xfa\xfa\xc9\xf9\xf9\xf9\xc9\xf9\xf9\xf9\xc9"
(...skipping 17 matching lines...) Expand all
90 uniform mat4 u_ModelViewProjMatrix; 84 uniform mat4 u_ModelViewProjMatrix;
91 attribute vec4 a_Position; 85 attribute vec4 a_Position;
92 attribute vec2 a_TexCoordinate; 86 attribute vec2 a_TexCoordinate;
93 varying vec2 v_TexCoordinate; 87 varying vec2 v_TexCoordinate;
94 88
95 void main() { 89 void main() {
96 v_TexCoordinate = a_TexCoordinate; 90 v_TexCoordinate = a_TexCoordinate;
97 gl_Position = u_ModelViewProjMatrix * a_Position; 91 gl_Position = u_ModelViewProjMatrix * a_Position;
98 } 92 }
99 /* clang-format on */); 93 /* clang-format on */);
100 case vr_shell::ShaderID::BACKGROUND_VERTEX_SHADER: 94 case vr_shell::ShaderID::GRADIENT_QUAD_VERTEX_SHADER:
95 case vr_shell::ShaderID::GRADIENT_GRID_VERTEX_SHADER:
101 return SHADER( 96 return SHADER(
102 /* clang-format off */ 97 /* clang-format off */
103 uniform mat4 u_ModelViewProjMatrix; 98 uniform mat4 u_ModelViewProjMatrix;
104 uniform float u_SceneRadius; 99 uniform float u_SceneRadius;
105 attribute vec4 a_Position; 100 attribute vec4 a_Position;
106 varying vec2 v_GridPosition; 101 varying vec2 v_GridPosition;
107 102
108 void main() { 103 void main() {
109 v_GridPosition = a_Position.xz / u_SceneRadius; 104 v_GridPosition = a_Position.xy / u_SceneRadius;
110 gl_Position = u_ModelViewProjMatrix * a_Position; 105 gl_Position = u_ModelViewProjMatrix * a_Position;
111 } 106 }
112 /* clang-format on */); 107 /* clang-format on */);
113 case vr_shell::ShaderID::TEXTURE_QUAD_FRAGMENT_SHADER: 108 case vr_shell::ShaderID::TEXTURE_QUAD_FRAGMENT_SHADER:
114 return OEIE_SHADER( 109 return OEIE_SHADER(
115 /* clang-format off */ 110 /* clang-format off */
116 precision highp float; 111 precision highp float;
117 uniform samplerExternalOES u_Texture; 112 uniform samplerExternalOES u_Texture;
118 uniform vec4 u_CopyRect; // rectangle 113 uniform vec4 u_CopyRect; // rectangle
119 varying vec2 v_TexCoordinate; 114 varying vec2 v_TexCoordinate;
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 mediump float front_fade_factor = 1.0 - 195 mediump float front_fade_factor = 1.0 -
201 clamp(1.0 - (uv.y - fade_point) / (1.0 - fade_point), 0.0, 1.0); 196 clamp(1.0 - (uv.y - fade_point) / (1.0 - fade_point), 0.0, 1.0);
202 mediump float back_fade_factor = 197 mediump float back_fade_factor =
203 clamp((uv.y - fade_point) / (fade_end - fade_point), 0.0, 1.0); 198 clamp((uv.y - fade_point) / (fade_end - fade_point), 0.0, 1.0);
204 mediump float total_fade = front_fade_factor * back_fade_factor; 199 mediump float total_fade = front_fade_factor * back_fade_factor;
205 lowp vec4 texture_color = texture2D(texture_unit, uv); 200 lowp vec4 texture_color = texture2D(texture_unit, uv);
206 lowp vec4 final_color = color * texture_color; 201 lowp vec4 final_color = color * texture_color;
207 gl_FragColor = vec4(final_color.xyz, final_color.w * total_fade); 202 gl_FragColor = vec4(final_color.xyz, final_color.w * total_fade);
208 } 203 }
209 /* clang-format on */); 204 /* clang-format on */);
210 case vr_shell::ShaderID::BACKGROUND_FRAGMENT_SHADER: 205 case vr_shell::ShaderID::GRADIENT_QUAD_FRAGMENT_SHADER:
211 return SHADER( 206 case vr_shell::ShaderID::GRADIENT_GRID_FRAGMENT_SHADER:
207 return OEIE_SHADER(
212 /* clang-format off */ 208 /* clang-format off */
213 precision highp float; 209 precision highp float;
214 varying vec2 v_GridPosition; 210 varying vec2 v_GridPosition;
215 uniform vec4 u_CenterColor; 211 uniform vec4 u_CenterColor;
216 uniform vec4 u_EdgeColor; 212 uniform vec4 u_EdgeColor;
213 uniform mediump float u_Opacity;
217 214
218 void main() { 215 void main() {
219 float edgeColorWeight = clamp(length(v_GridPosition), 0.0, 1.0); 216 float edgeColorWeight = clamp(length(v_GridPosition), 0.0, 1.0);
220 float centerColorWeight = 1.0 - edgeColorWeight; 217 float centerColorWeight = 1.0 - edgeColorWeight;
221 gl_FragColor = u_CenterColor * centerColorWeight + 218 gl_FragColor = (u_CenterColor * centerColorWeight +
222 u_EdgeColor * edgeColorWeight; 219 u_EdgeColor * edgeColorWeight) * vec4(1.0, 1.0, 1.0, u_Opacity);
223 } 220 }
224 /* clang-format on */); 221 /* clang-format on */);
225 default: 222 default:
226 LOG(ERROR) << "Shader source requested for unknown shader"; 223 LOG(ERROR) << "Shader source requested for unknown shader";
227 return ""; 224 return "";
228 } 225 }
229 } 226 }
230 227
231 #undef RECTANGULAR_TEXTURE_BUFFER 228 #undef RECTANGULAR_TEXTURE_BUFFER
232 } // namespace 229 } // namespace
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 glUniform1f(fade_end_handle_, kFadeEnd); 443 glUniform1f(fade_end_handle_, kFadeEnd);
447 444
448 glDrawArrays(GL_TRIANGLES, 0, kVerticesNumber); 445 glDrawArrays(GL_TRIANGLES, 0, kVerticesNumber);
449 446
450 glDisableVertexAttribArray(position_handle_); 447 glDisableVertexAttribArray(position_handle_);
451 glDisableVertexAttribArray(tex_coord_handle_); 448 glDisableVertexAttribArray(tex_coord_handle_);
452 } 449 }
453 450
454 LaserRenderer::~LaserRenderer() = default; 451 LaserRenderer::~LaserRenderer() = default;
455 452
456 BackgroundRenderer::BackgroundRenderer() 453 GradientQuadRenderer::GradientQuadRenderer()
457 : BaseRenderer(BACKGROUND_VERTEX_SHADER, BACKGROUND_FRAGMENT_SHADER) { 454 : BaseRenderer(GRADIENT_QUAD_VERTEX_SHADER, GRADIENT_QUAD_FRAGMENT_SHADER) {
458 model_view_proj_matrix_handle_ = 455 model_view_proj_matrix_handle_ =
459 glGetUniformLocation(program_handle_, "u_ModelViewProjMatrix"); 456 glGetUniformLocation(program_handle_, "u_ModelViewProjMatrix");
460 scene_radius_handle_ = glGetUniformLocation(program_handle_, "u_SceneRadius"); 457 scene_radius_handle_ = glGetUniformLocation(program_handle_, "u_SceneRadius");
461 center_color_handle_ = glGetUniformLocation(program_handle_, "u_CenterColor"); 458 center_color_handle_ = glGetUniformLocation(program_handle_, "u_CenterColor");
462 edge_color_handle_ = glGetUniformLocation(program_handle_, "u_EdgeColor"); 459 edge_color_handle_ = glGetUniformLocation(program_handle_, "u_EdgeColor");
463 460 opacity_handle_ = glGetUniformLocation(program_handle_, "u_Opacity");
464 // Make ground grid.
465 int groundTilesNumber = kGroundMaxSize / kGroundTileSize;
466 scene_radius_ = groundTilesNumber * kGroundTileSize * 0.5f;
467 int groundLinesNumber = 2 * (groundTilesNumber + 1);
468 ground_grid_lines_.resize(groundLinesNumber);
469
470 for (int i = 0; i < groundLinesNumber - 1; i += 2) {
471 float position =
472 -scene_radius_ + (i / 2) * scene_radius_ * 2.0f / groundTilesNumber;
473
474 // Line parallel to the z axis.
475 Line3d& zLine = ground_grid_lines_[i];
476 // Line parallel to the x axis.
477 Line3d& xLine = ground_grid_lines_[i + 1];
478
479 zLine.start.x = position;
480 zLine.start.y = kGroundYPosition;
481 zLine.start.z = -scene_radius_;
482 zLine.end.x = position;
483 zLine.end.y = kGroundYPosition;
484 zLine.end.z = scene_radius_;
485 xLine.start.x = -scene_radius_;
486 xLine.start.y = kGroundYPosition;
487 xLine.start.z = position;
488 xLine.end.x = scene_radius_;
489 xLine.end.y = kGroundYPosition;
490 xLine.end.z = position;
491 }
492
493 // Make plane for ground and ceilings.
494 // clang-format off
495 ground_ceiling_plane_positions_ = {
496 // First triangle.
497 -scene_radius_, 0.0f, scene_radius_,
498 scene_radius_, 0.0f, scene_radius_,
499 -scene_radius_, 0.0f, -scene_radius_,
500 // Second triangle.
501 -scene_radius_, 0.0f, -scene_radius_,
502 scene_radius_, 0.0f, scene_radius_,
503 scene_radius_, 0.0f, -scene_radius_};
504 // clang-format on
505
506 // Make the transform to draw the plane either on the ground or the ceiling.
507 SetIdentityM(ground_plane_transform_mat_);
508 TranslateMRight(ground_plane_transform_mat_, ground_plane_transform_mat_,
509 0.0f, kGroundYPosition - 0.1f, 0.0f);
510
511 SetIdentityM(ceiling_plane_transform_mat_);
512 gvr::Quatf rotation_quat = QuatFromAxisAngle({1.0f, 0.0f, 0.0f}, M_PI);
513 ceiling_plane_transform_mat_ =
514 MatrixMul(ceiling_plane_transform_mat_, QuatToMatrix(rotation_quat));
515 TranslateMRight(ceiling_plane_transform_mat_, ceiling_plane_transform_mat_,
516 0.0f, kGroundYPosition - 0.1f, 0.0f);
517 } 461 }
518 462
519 void BackgroundRenderer::Draw(const gvr::Mat4f& view_proj_matrix) { 463 void GradientQuadRenderer::Draw(const gvr::Mat4f& view_proj_matrix,
520 glUseProgram(program_handle_); 464 const Colorf& edge_color,
465 const Colorf& center_color,
466 float opacity) {
467 PrepareToDraw(model_view_proj_matrix_handle_, view_proj_matrix);
468
469 // Tell shader the grid size so that it can calculate the fading.
470 glUniform1f(scene_radius_handle_, kHalfSize);
471
472 // Set the edge color to the fog color so that it seems to fade out.
473 glUniform4f(edge_color_handle_, edge_color.r, edge_color.g, edge_color.b,
474 edge_color.a);
475 glUniform4f(center_color_handle_, center_color.r, center_color.g,
476 center_color.b, center_color.a);
477 glUniform1f(opacity_handle_, opacity);
478
479 glDrawArrays(GL_TRIANGLES, 0, kVerticesNumber);
480
481 glDisableVertexAttribArray(position_handle_);
482 glDisableVertexAttribArray(tex_coord_handle_);
483 }
484
485 GradientQuadRenderer::~GradientQuadRenderer() = default;
486
487 GradientGridRenderer::GradientGridRenderer()
488 : BaseRenderer(GRADIENT_QUAD_VERTEX_SHADER, GRADIENT_QUAD_FRAGMENT_SHADER) {
489 model_view_proj_matrix_handle_ =
490 glGetUniformLocation(program_handle_, "u_ModelViewProjMatrix");
491 scene_radius_handle_ = glGetUniformLocation(program_handle_, "u_SceneRadius");
492 center_color_handle_ = glGetUniformLocation(program_handle_, "u_CenterColor");
493 edge_color_handle_ = glGetUniformLocation(program_handle_, "u_EdgeColor");
494 opacity_handle_ = glGetUniformLocation(program_handle_, "u_Opacity");
495 }
496
497 void GradientGridRenderer::Draw(const gvr::Mat4f& view_proj_matrix,
498 const Colorf& edge_color,
499 const Colorf& center_color,
500 int gridline_count,
501 float opacity) {
502 // In case the tile number changed we have to regenerate the grid lines.
503 if (grid_lines_.size() != static_cast<size_t>(2 * (gridline_count + 1))) {
504 MakeGridLines(gridline_count);
505 }
521 506
522 // Pass in model view project matrix. 507 // Pass in model view project matrix.
523 glUniformMatrix4fv(model_view_proj_matrix_handle_, 1, false, 508 glUniformMatrix4fv(model_view_proj_matrix_handle_, 1, false,
524 MatrixToGLArray(view_proj_matrix).data()); 509 MatrixToGLArray(view_proj_matrix).data());
525 510
526 // Tell shader the grid size so that it can calculate the fading. 511 // Tell shader the grid size so that it can calculate the fading.
527 int groundTilesNumber = kGroundMaxSize / kGroundTileSize; 512 glUniform1f(scene_radius_handle_, kHalfSize);
528 glUniform1f(scene_radius_handle_, scene_radius_);
529 513
530 // Set the edge color to the fog color so that it seems to fade out. 514 // Set the edge color to the fog color so that it seems to fade out.
531 glUniform4f(edge_color_handle_, kFogBrightness, kFogBrightness, 515 glUniform4f(edge_color_handle_, edge_color.r, edge_color.g, edge_color.b,
532 kFogBrightness, 1.0f); 516 edge_color.a);
517 glUniform4f(center_color_handle_, center_color.r, center_color.g,
518 center_color.b, center_color.a);
519 glUniform1f(opacity_handle_, opacity);
533 520
534 // Draw the ground grid. 521 // Draw the grid.
535 glEnableVertexAttribArray(position_handle_); 522 glEnableVertexAttribArray(position_handle_);
536 glVertexAttribPointer(position_handle_, kPositionDataSize, GL_FLOAT, false, 0, 523 glVertexAttribPointer(position_handle_, kPositionDataSize, GL_FLOAT, false, 0,
537 (float*)ground_grid_lines_.data()); 524 (float*)grid_lines_.data());
538 glUniform4f(center_color_handle_, kGridBrightness, kGridBrightness, 525 int verticesNumber = 4 * (gridline_count + 1);
539 kGridBrightness, 1.0f); 526 glDrawArrays(GL_LINES, 0, verticesNumber);
540 int groundVerticesNumber = 4 * (groundTilesNumber + 1);
541 glDrawArrays(GL_LINES, 0, groundVerticesNumber);
542
543 // Draw the ground plane.
544 gvr::Mat4f transformed_matrix =
545 MatrixMul(view_proj_matrix, ground_plane_transform_mat_);
546 glUniformMatrix4fv(model_view_proj_matrix_handle_, 1, false,
547 MatrixToGLArray(transformed_matrix).data());
548 glUniform4f(center_color_handle_, kGroundCeilingBrightness,
549 kGroundCeilingBrightness, kGroundCeilingBrightness, 1.0f);
550 glVertexAttribPointer(position_handle_, kPositionDataSize, GL_FLOAT, false, 0,
551 ground_ceiling_plane_positions_.data());
552 glDrawArrays(GL_TRIANGLES, 0, kVerticesNumber);
553
554 // Draw the ceiling plane.
555 transformed_matrix =
556 MatrixMul(view_proj_matrix, ceiling_plane_transform_mat_);
557 glUniformMatrix4fv(model_view_proj_matrix_handle_, 1, false,
558 MatrixToGLArray(transformed_matrix).data());
559 glDrawArrays(GL_TRIANGLES, 0, kVerticesNumber);
560 527
561 glDisableVertexAttribArray(position_handle_); 528 glDisableVertexAttribArray(position_handle_);
562 } 529 }
563 530
564 BackgroundRenderer::~BackgroundRenderer() = default; 531 GradientGridRenderer::~GradientGridRenderer() = default;
532
533 void GradientGridRenderer::MakeGridLines(int gridline_count) {
534 int linesNumber = 2 * (gridline_count + 1);
535 grid_lines_.resize(linesNumber);
536
537 for (int i = 0; i < linesNumber - 1; i += 2) {
538 float position = -kHalfSize + (i / 2) * kHalfSize * 2.0f / gridline_count;
539
540 // Line parallel to the z axis.
541 Line3d& zLine = grid_lines_[i];
542 // Line parallel to the x axis.
543 Line3d& xLine = grid_lines_[i + 1];
544
545 zLine.start.x = position;
546 zLine.start.y = kHalfSize;
547 zLine.start.z = 0.0f;
548 zLine.end.x = position;
549 zLine.end.y = -kHalfSize;
550 zLine.end.z = 0.0f;
551 xLine.start.x = -kHalfSize;
552 xLine.start.y = -position;
553 xLine.start.z = 0.0f;
554 xLine.end.x = kHalfSize;
555 xLine.end.y = -position;
556 xLine.end.z = 0.0f;
557 }
558 }
565 559
566 VrShellRenderer::VrShellRenderer() 560 VrShellRenderer::VrShellRenderer()
567 : textured_quad_renderer_(new TexturedQuadRenderer), 561 : textured_quad_renderer_(new TexturedQuadRenderer),
568 webvr_renderer_(new WebVrRenderer), 562 webvr_renderer_(new WebVrRenderer),
569 reticle_renderer_(new ReticleRenderer), 563 reticle_renderer_(new ReticleRenderer),
570 laser_renderer_(new LaserRenderer), 564 laser_renderer_(new LaserRenderer),
571 background_renderer_(new BackgroundRenderer) {} 565 gradient_quad_renderer_(new GradientQuadRenderer),
566 gradient_grid_renderer_(new GradientGridRenderer) {}
572 567
573 VrShellRenderer::~VrShellRenderer() = default; 568 VrShellRenderer::~VrShellRenderer() = default;
574 569
575 } // namespace vr_shell 570 } // namespace vr_shell
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/vr_shell_renderer.h ('k') | chrome/browser/resources/vr_shell/vr_shell_ui.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698