Index: remoting/client/gl_renderer_delegate.h |
diff --git a/remoting/client/gl_renderer_delegate.h b/remoting/client/gl_renderer_delegate.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..3f41a4b35b1a2a2f85b06bd199e58c4f8069e503 |
--- /dev/null |
+++ b/remoting/client/gl_renderer_delegate.h |
@@ -0,0 +1,29 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef REMOTING_CLIENT_GL_RENDERER_DELEGATE_H_ |
+#define REMOTING_CLIENT_GL_RENDERER_DELEGATE_H_ |
+ |
+#include "base/macros.h" |
+ |
+namespace remoting { |
+ |
+// Interface to interact with GlRenderer. All functions will be called on the |
+// display thread. |
+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
|
+ public: |
+ // Called when GlRenderer is about to render a frame on current OpenGL |
+ // surface. Return true if GlRenderer can continue the render process. |
+ virtual bool CanRenderFrame() = 0; |
+ |
+ // Called after GlRenderer has successfully rendered a frame on current OpenGL |
+ // surface. |
+ virtual void OnFrameRendered() = 0; |
+ |
+ // Called when the size of the canvas (= size of desktop frame) is changed. |
+ virtual void OnSizeChanged(int width, int height) = 0; |
+}; |
+ |
+} // namespace remoting |
+#endif // REMOTING_CLIENT_GL_RENDERER_DELEGATE_H_ |