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

Side by Side Diff: remoting/client/gl_canvas.h

Issue 2175963002: [Chromoting] Implement GlRenderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix glUniformMatrix3fv bug in OpenGL ES 2 environment Created 4 years, 4 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
« no previous file with comments | « no previous file | remoting/client/gl_canvas.cc » ('j') | remoting/client/gl_canvas.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 REMOTING_CLIENT_OPENGL_GL_CANVAS_H_ 5 #ifndef REMOTING_CLIENT_OPENGL_GL_CANVAS_H_
6 #define REMOTING_CLIENT_OPENGL_GL_CANVAS_H_ 6 #define REMOTING_CLIENT_OPENGL_GL_CANVAS_H_
7 7
8 #include <array> 8 #include <array>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 12 matching lines...) Expand all
23 // with the origin at the upper-left corner of the canvas. 23 // with the origin at the upper-left corner of the canvas.
24 class GlCanvas { 24 class GlCanvas {
25 public: 25 public:
26 // gl_version: version number of the OpenGL ES context. Either 2 or 3. 26 // gl_version: version number of the OpenGL ES context. Either 2 or 3.
27 GlCanvas(int gl_version); 27 GlCanvas(int gl_version);
28 28
29 ~GlCanvas(); 29 ~GlCanvas();
30 30
31 // Sets the normalized transformation matrix. This matrix defines how the 31 // Sets the normalized transformation matrix. This matrix defines how the
32 // canvas should be shown on the view. 32 // canvas should be shown on the view.
33 // 3 by 3 transformation matrix, [ m0, m1, m2, m3, m4, m5, m6, m7, m8 ]. 33 // 3 by 3 transformation matrix **in column-major order**, i. e.
34 // [ m0, m3, m6, m1, m4, m7, m2, m5, m8 ].
34 // The matrix will be multiplied with the positions (with projective space, 35 // The matrix will be multiplied with the positions (with projective space,
35 // (x, y, 1)) to draw the textures with the right zoom and pan configuration. 36 // (x, y, 1)) to draw the textures with the right zoom and pan configuration.
36 // 37 //
37 // | m0, m1, m2, | | x | 38 // | m0, m1, m2, | | x |
38 // | m3, m4, m5, | * | y | 39 // | m3, m4, m5, | * | y |
39 // | m6, m7, m8 | | 1 | 40 // | m6, m7, m8 | | 1 |
40 // 41 //
41 // For a typical transformation matrix such that m1=m3=m6=m7=0 and m8=1, m0 42 // For a typical transformation matrix such that m1=m3=m6=m7=0 and m8=1, m0
42 // and m4 defines the ratio of canvas width or height over view width or 43 // and m4 defines the ratio of canvas width or height over view width or
43 // height. m2 and m5 defines the offset of the upper-left corner in percentage 44 // height. m2 and m5 defines the offset of the upper-left corner in percentage
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 GLuint tex_cord_location_; 81 GLuint tex_cord_location_;
81 82
82 base::ThreadChecker thread_checker_; 83 base::ThreadChecker thread_checker_;
83 84
84 DISALLOW_COPY_AND_ASSIGN(GlCanvas); 85 DISALLOW_COPY_AND_ASSIGN(GlCanvas);
85 }; 86 };
86 87
87 } // namespace remoting 88 } // namespace remoting
88 89
89 #endif // REMOTING_CLIENT_OPENGL_GL_CANVAS_H_ 90 #endif // REMOTING_CLIENT_OPENGL_GL_CANVAS_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/client/gl_canvas.cc » ('j') | remoting/client/gl_canvas.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698