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

Unified Diff: remoting/client/display/gl_canvas.cc

Issue 2614443003: Moving the GL implementation details into a sub folder for client display. (Closed)
Patch Set: Adding deps restriction on r/c/display; Moving sys_opengl.h 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/client/display/gl_canvas.h ('k') | remoting/client/display/gl_cursor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/display/gl_canvas.cc
diff --git a/remoting/client/gl_canvas.cc b/remoting/client/display/gl_canvas.cc
similarity index 91%
rename from remoting/client/gl_canvas.cc
rename to remoting/client/display/gl_canvas.cc
index 0a49f13ec26b8f404700d8aa31a9cbf5605f2fed..31d6b959e7dc4f20e0ded8f9f3eca18c40c65356 100644
--- a/remoting/client/gl_canvas.cc
+++ b/remoting/client/display/gl_canvas.cc
@@ -2,11 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "remoting/client/gl_canvas.h"
+#include "remoting/client/display/gl_canvas.h"
#include "base/logging.h"
-#include "remoting/client/gl_helpers.h"
-#include "remoting/client/gl_math.h"
+#include "remoting/client/display/gl_helpers.h"
+#include "remoting/client/display/gl_math.h"
namespace {
@@ -37,15 +37,15 @@ const char kTexCoordToViewVert[] =
"void main() {\n"
" v_texCoord = a_texCoord;\n"
- // Transforms coordinates related to the canvas to coordinates
- // related to the view.
+ // Transforms coordinates related to the canvas to coordinates
+ // related to the view.
" vec3 trans_position = u_transform * vec3(a_position, 1.0);\n"
- // Normalize the position by the size of the view.
+ // Normalize the position by the size of the view.
" trans_position.xy /= u_viewSize;\n"
- // Transforms texture coordinates to view coordinates and adds
- // projection component 1.
+ // Transforms texture coordinates to view coordinates and adds
+ // projection component 1.
" gl_Position = vec4(tex_to_view * trans_position, 1.0);\n"
"}";
@@ -108,7 +108,7 @@ void GlCanvas::SetTransformationMatrix(const std::array<float, 9>& matrix) {
void GlCanvas::SetViewSize(int width, int height) {
DCHECK(width > 0 && height > 0);
glViewport(0, 0, width, height);
- float view_size[2] {width, height};
+ float view_size[2]{width, height};
glUniform2fv(view_size_location_, 1, view_size);
view_size_set_ = true;
}
« no previous file with comments | « remoting/client/display/gl_canvas.h ('k') | remoting/client/display/gl_cursor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698