Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(203)

Unified Diff: remoting/client/gl_renderer_core.h

Issue 2196493002: [Chromoting] Unit Tests for GlRenderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add unittest Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698