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..143050c3c01cb686ea66d910272881ad1826ec75 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. |
- 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,16 +58,17 @@ 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: |
+ GlCanvas(); |
Yuwei
2017/01/09 20:28:52
Where is this constructor used?
nicholss
2017/01/09 20:39:24
it is not, removed.
|
int gl_version_; |
int max_texture_size_ = 0; |