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

Unified Diff: remoting/client/gl_desktop.h

Issue 2045963004: [Remoting] OpenGL Rendering Layer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reviewer's Feedback 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
« no previous file with comments | « remoting/client/gl_canvas.cc ('k') | remoting/client/gl_desktop.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/gl_desktop.h
diff --git a/remoting/client/gl_desktop.h b/remoting/client/gl_desktop.h
new file mode 100644
index 0000000000000000000000000000000000000000..afdf0ebcdd62ce51737a2c1fbafa3be89b26e54a
--- /dev/null
+++ b/remoting/client/gl_desktop.h
@@ -0,0 +1,47 @@
+// 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_OPENGL_GL_DESKTOP_H_
+#define REMOTING_CLIENT_OPENGL_GL_DESKTOP_H_
+
+#include <memory>
+
+#include "base/macros.h"
+
+namespace webrtc {
+class DesktopFrame;
+class DesktopRegion;
+} // namespace webrtc
+
+namespace remoting {
+
+class GlCanvas;
+class GlRenderLayer;
+
+// This class draws the desktop on the canvas.
+class GlDesktop {
+ public:
+ GlDesktop();
+ virtual ~GlDesktop();
+
+ void SetVideoFrame(std::unique_ptr<webrtc::DesktopFrame> frame);
+
+ // Sets the canvas on which the desktop will be drawn. Resumes the current
+ // state of the desktop to the context of the new canvas.
+ // If |canvas| is nullptr, nothing will happen when calling Draw().
+ void SetCanvas(GlCanvas* canvas);
+
+ // Draws the desktop on the canvas.
+ void Draw();
+
+ private:
+ std::unique_ptr<GlRenderLayer> layer_;
+ std::unique_ptr<webrtc::DesktopFrame> last_frame_;
+
+ DISALLOW_COPY_AND_ASSIGN(GlDesktop);
+};
+
+} // namespace remoting
+
+#endif // REMOTING_CLIENT_OPENGL_GL_DESKTOP_H_
« no previous file with comments | « remoting/client/gl_canvas.cc ('k') | remoting/client/gl_desktop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698