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

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

Issue 2591363002: Adding drawable to CRD andorid and iOS gl rendering pipeline. (Closed)
Patch Set: Trying to fix android. 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
Index: remoting/client/display/gl_canvas.cc
diff --git a/remoting/client/display/gl_canvas.cc b/remoting/client/display/gl_canvas.cc
index 31d6b959e7dc4f20e0ded8f9f3eca18c40c65356..b8cfc3fa4cef8e2361a75e90ed8a04b24a23effe 100644
--- a/remoting/client/display/gl_canvas.cc
+++ b/remoting/client/display/gl_canvas.cc
@@ -96,6 +96,17 @@ GlCanvas::~GlCanvas() {
glDeleteShader(fragment_shader_);
}
+void GlCanvas::Clear() {
+#ifndef NDEBUG
+ // Set the background clear color to bright green for debugging purposes.
+ glClearColor(0.0f, 1.0f, 0.0f, 1.0f);
+#else
+ // Set the background clear color to black.
+ glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
+#endif
+ glClear(GL_COLOR_BUFFER_BIT);
+}
+
void GlCanvas::SetTransformationMatrix(const std::array<float, 9>& matrix) {
DCHECK(thread_checker_.CalledOnValidThread());
std::array<float, 9> transposed_matrix = matrix;
@@ -137,7 +148,7 @@ void GlCanvas::DrawTexture(int texture_id,
glBindTexture(GL_TEXTURE_2D, 0);
}
-int GlCanvas::GetGlVersion() const {
+int GlCanvas::GetVersion() const {
return gl_version_;
}

Powered by Google App Engine
This is Rietveld 408576698