Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef REMOTING_CLIENT_GL_RENDERER_DELEGATE_H_ | |
| 6 #define REMOTING_CLIENT_GL_RENDERER_DELEGATE_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 | |
| 10 namespace remoting { | |
| 11 | |
| 12 // Interface to interact with GlRenderer. All functions will be called on the | |
| 13 // display thread. | |
| 14 class GlRendererDelegate { | |
|
Sergey Ulanov
2016/07/27 17:45:33
Add private virtual destructor.
Yuwei
2016/07/27 18:23:11
Done. I think you mean protected?
Sergey Ulanov
2016/07/27 18:36:41
yes
| |
| 15 public: | |
| 16 // Called when GlRenderer is about to render a frame on current OpenGL | |
| 17 // surface. Return true if GlRenderer can continue the render process. | |
| 18 virtual bool CanRenderFrame() = 0; | |
| 19 | |
| 20 // Called after GlRenderer has successfully rendered a frame on current OpenGL | |
| 21 // surface. | |
| 22 virtual void OnFrameRendered() = 0; | |
| 23 | |
| 24 // Called when the size of the canvas (= size of desktop frame) is changed. | |
| 25 virtual void OnSizeChanged(int width, int height) = 0; | |
| 26 }; | |
| 27 | |
| 28 } // namespace remoting | |
| 29 #endif // REMOTING_CLIENT_GL_RENDERER_DELEGATE_H_ | |
| OLD | NEW |