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

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

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.h
diff --git a/remoting/client/display/gl_canvas.h b/remoting/client/display/gl_canvas.h
index 975d79bc9f981b0b691fa91ca846b11b877be416..a7b8d60e46802986e42eecb68ee9e1e1ac87c49b 100644
--- a/remoting/client/display/gl_canvas.h
+++ b/remoting/client/display/gl_canvas.h
@@ -9,6 +9,7 @@
#include "base/macros.h"
#include "base/threading/thread_checker.h"
+#include "remoting/client/display/canvas.h"
#include "remoting/client/display/sys_opengl.h"
namespace remoting {
@@ -17,12 +18,14 @@ namespace remoting {
// draw textures on the canvas.
// Must be constructed after the OpenGL surface is created and destroyed before
// the surface is destroyed.
-class GlCanvas {
+class GlCanvas : public Canvas {
public:
// gl_version: version number of the OpenGL ES context. Either 2 or 3.
GlCanvas(int gl_version);
- ~GlCanvas();
+ ~GlCanvas() override;
+
+ void Clear() override;
// Sets the transformation matrix. This matrix defines how the canvas should
// be shown on the view.
@@ -37,10 +40,10 @@ class GlCanvas {
// For a typical transformation matrix such that m1=m3=m6=m7=0 and m8=1, m0
// and m4 defines the scaling factor of the canvas and m2 and m5 defines the
// offset of the upper-left corner in pixel.
joedow 2017/01/10 00:19:44 Since this class now implements the Canvas interfa
nicholss 2017/01/10 16:58:34 I will remove the override but I would think the o
joedow 2017/01/10 18:49:27 Thatcommenting style is used throughout the Chromo
nicholss 2017/01/10 21:43:10 Done.
- void SetTransformationMatrix(const std::array<float, 9>& matrix);
+ void SetTransformationMatrix(const std::array<float, 9>& matrix) override;
// Sets the size of the view in pixels.
- void SetViewSize(int width, int height);
+ void SetViewSize(int width, int height) override;
// Draws the texture on the canvas. Nothing will happen if
// SetNormalizedTransformation() has not been called.
@@ -55,14 +58,14 @@ class GlCanvas {
void DrawTexture(int texture_id,
GLuint texture_handle,
GLuint vertex_buffer,
- float alpha_multiplier);
+ float alpha_multiplier) override;
// Returns the version number of current OpenGL ES context. Either 2 or 3.
- int GetGlVersion() const;
+ int GetVersion() const override;
// Returns the maximum texture resolution limitation. Neither the width nor
// the height of the texture can exceed this limitation.
- int GetMaxTextureSize() const;
+ int GetMaxTextureSize() const override;
private:
int gl_version_;

Powered by Google App Engine
This is Rietveld 408576698