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_OPENGL_GL_DESKTOP_H_ | |
| 6 #define REMOTING_CLIENT_OPENGL_GL_DESKTOP_H_ | |
| 7 | |
| 8 #include <memory> | |
| 9 | |
| 10 #include "base/macros.h" | |
| 11 | |
| 12 namespace webrtc { | |
| 13 class DesktopFrame; | |
| 14 } // namespace webrtc | |
| 15 | |
| 16 namespace remoting { | |
| 17 class GlCanvas; | |
|
Sergey Ulanov
2016/06/27 23:15:29
add empty line here.
Yuwei
2016/06/28 22:51:11
Done.
| |
| 18 class GlRenderLayer; | |
| 19 | |
| 20 // This class draws the desktop on the canvas. | |
| 21 class GlDesktop { | |
| 22 public: | |
| 23 GlDesktop(); | |
| 24 virtual ~GlDesktop(); | |
| 25 | |
| 26 void SetVideoFrame(std::unique_ptr<webrtc::DesktopFrame> frame); | |
| 27 | |
| 28 // Sets the canvas on which the desktop will be drawn. Resumes the current | |
| 29 // state of the desktop to the context of the new canvas. | |
| 30 // If |canvas| is nullptr, nothing will happen when calling Draw(). | |
| 31 void SetCanvas(GlCanvas* canvas); | |
| 32 | |
| 33 // Draws the desktop on the canvas. | |
| 34 void Draw(); | |
| 35 | |
| 36 private: | |
| 37 std::unique_ptr<GlRenderLayer> layer_; | |
| 38 std::unique_ptr<webrtc::DesktopFrame> last_frame_; | |
| 39 | |
| 40 DISALLOW_COPY_AND_ASSIGN(GlDesktop); | |
| 41 }; | |
| 42 | |
| 43 } // namespace remoting | |
| 44 | |
| 45 #endif // REMOTING_CLIENT_OPENGL_GL_DESKTOP_H_ | |
| OLD | NEW |