Chromium Code Reviews| Index: remoting/client/gl_renderer_core.h |
| diff --git a/remoting/client/gl_renderer_core.h b/remoting/client/gl_renderer_core.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..a8eb4d0158c9757fd14e90bcc9b38b04560ef783 |
| --- /dev/null |
| +++ b/remoting/client/gl_renderer_core.h |
| @@ -0,0 +1,49 @@ |
| +// 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_CORE_H_ |
| +#define REMOTING_CLIENT_GL_RENDERER_CORE_H_ |
| + |
| +#include <array> |
| +#include <memory> |
| + |
| +namespace webrtc { |
| +class DesktopFrame; |
| +} // namespace webrtc |
| + |
| +namespace remoting { |
| + |
| +namespace protocol { |
| +class CursorShapeInfo; |
| +} // namespace protocol |
| + |
| +// Interface for logics that render host desktop through OpenGL. |
| +class GlRendererCore { |
|
Sergey Ulanov
2016/08/01 21:33:05
With this change GlRenderer becomes just a think w
Yuwei
2016/08/01 22:04:39
My initial thought was to test the delegate calls
|
| + public: |
| + static std::unique_ptr<GlRendererCore> CreateCore(); |
|
Sergey Ulanov
2016/08/01 21:33:05
We use static interface constructors like this for
Yuwei
2016/08/02 00:13:10
Obsolete.
|
| + virtual ~GlRendererCore() {} |
| + virtual void CreateCanvas(int gl_version) = 0; |
| + virtual void DestroyCanvas() = 0; |
| + |
| + // Returns true if there is an ongoing animation handled by the OpenGL |
| + // renderer. |
| + virtual bool DrawFrame() = 0; |
| + |
| + virtual void SetPixelTransformation(const std::array<float, 9>& matrix) = 0; |
| + virtual void MoveCursor(int x, int y) = 0; |
| + virtual void StartFeedbackAnimation(int x, int y, float diameter) = 0; |
| + virtual void SetCursorVisibility(bool visible) = 0; |
| + virtual void SetDesktopFrame(const webrtc::DesktopFrame& frame) = 0; |
| + virtual void SetCursorShape(const protocol::CursorShapeInfo& shape) = 0; |
| + virtual void SetViewSize(int width, int height) = 0; |
| + virtual void SetCanvasSize(int width, int height) = 0; |
| + virtual int GetCanvasWidth() const = 0; |
| + virtual int GetCanvasHeight() const = 0; |
| + |
| + protected: |
| + GlRendererCore() {} |
| +}; |
| + |
| +} // namespace remoting |
| +#endif // REMOTING_CLIENT_GL_RENDERER_CORE_H_ |