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

Side by Side 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, 4 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 unified diff | Download patch
OLDNEW
(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_CORE_H_
6 #define REMOTING_CLIENT_GL_RENDERER_CORE_H_
7
8 #include <array>
9 #include <memory>
10
11 namespace webrtc {
12 class DesktopFrame;
13 } // namespace webrtc
14
15 namespace remoting {
16
17 namespace protocol {
18 class CursorShapeInfo;
19 } // namespace protocol
20
21 // Interface for logics that render host desktop through OpenGL.
22 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
23 public:
24 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.
25 virtual ~GlRendererCore() {}
26 virtual void CreateCanvas(int gl_version) = 0;
27 virtual void DestroyCanvas() = 0;
28
29 // Returns true if there is an ongoing animation handled by the OpenGL
30 // renderer.
31 virtual bool DrawFrame() = 0;
32
33 virtual void SetPixelTransformation(const std::array<float, 9>& matrix) = 0;
34 virtual void MoveCursor(int x, int y) = 0;
35 virtual void StartFeedbackAnimation(int x, int y, float diameter) = 0;
36 virtual void SetCursorVisibility(bool visible) = 0;
37 virtual void SetDesktopFrame(const webrtc::DesktopFrame& frame) = 0;
38 virtual void SetCursorShape(const protocol::CursorShapeInfo& shape) = 0;
39 virtual void SetViewSize(int width, int height) = 0;
40 virtual void SetCanvasSize(int width, int height) = 0;
41 virtual int GetCanvasWidth() const = 0;
42 virtual int GetCanvasHeight() const = 0;
43
44 protected:
45 GlRendererCore() {}
46 };
47
48 } // namespace remoting
49 #endif // REMOTING_CLIENT_GL_RENDERER_CORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698