Chromium Code Reviews| Index: remoting/client/display/gl_render_layer.h |
| diff --git a/remoting/client/display/gl_render_layer.h b/remoting/client/display/gl_render_layer.h |
| index 153e2e3e4644ab578d1feaadd7b076a3484235c9..7e37d3dbd4b921aec23ef5a59a1a55129d48ccc6 100644 |
| --- a/remoting/client/display/gl_render_layer.h |
| +++ b/remoting/client/display/gl_render_layer.h |
| @@ -9,11 +9,12 @@ |
| #include <memory> |
| #include "base/macros.h" |
| +#include "base/memory/weak_ptr.h" |
| #include "base/threading/thread_checker.h" |
| #include "remoting/client/display/sys_opengl.h" |
| namespace remoting { |
| -class GlCanvas; |
| +class Canvas; |
|
Sergey Ulanov
2017/01/11 22:47:31
nit: add empty line after namespace
nicholss
2017/01/11 23:43:25
Done.
|
| // This class is for drawing a texture on the canvas. Must be deleted before the |
| // canvas is deleted. |
| @@ -23,7 +24,7 @@ class GlRenderLayer { |
| // texture_id: An integer in range [0, GL_MAX_TEXTURE_IMAGE_UNITS], defining |
| // which slot to store the texture. |
| - GlRenderLayer(int texture_id, GlCanvas* canvas); |
| + GlRenderLayer(int texture_id, base::WeakPtr<Canvas> canvas); |
| ~GlRenderLayer(); |
| // Sets the texture (RGBA 8888) to be drawn. Please use UpdateTexture() if the |
| @@ -78,7 +79,7 @@ class GlRenderLayer { |
| bool* should_reset_row_length); |
| int texture_id_; |
| - GlCanvas* canvas_; |
| + base::WeakPtr<Canvas> canvas_; |
| GLuint texture_handle_; |
| GLuint buffer_handle_; |