Index: remoting/client/ios/display/gl_demo_screen.h |
diff --git a/remoting/client/ios/display/gl_demo_screen.h b/remoting/client/ios/display/gl_demo_screen.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..244f3c6dc05ef53b3ad37fc32a417d1ab075aed9 |
--- /dev/null |
+++ b/remoting/client/ios/display/gl_demo_screen.h |
@@ -0,0 +1,44 @@ |
+// Copyright 2017 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_IOS_DISPLAY_GL_DEMO_SCREEN_H_ |
+#define REMOTING_CLIENT_IOS_DISPLAY_GL_DEMO_SCREEN_H_ |
+ |
+#include <memory> |
joedow
2017/01/25 23:16:28
I don't think this header is used so you can remov
nicholss
2017/01/26 18:00:16
Done.
|
+#include <vector> |
joedow
2017/01/25 23:16:28
AFAICT vector isn't used so you can remove it.
nicholss
2017/01/26 18:00:16
Done.
|
+ |
+#include "base/macros.h" |
+#include "base/threading/thread_checker.h" |
+#include "remoting/client/display/drawable.h" |
+#include "remoting/client/display/sys_opengl.h" |
+#include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" |
joedow
2017/01/25 23:16:28
Remove the webrtc header? I don't think it is use
nicholss
2017/01/26 18:00:16
Done.
|
+ |
+namespace remoting { |
+ |
+// This class draws the desktop on the canvas. |
+class GlDemoScreen : public Drawable { |
+ public: |
+ GlDemoScreen(); |
+ ~GlDemoScreen() override; |
+ |
+ // Drawable implementation. |
+ void SetCanvas(base::WeakPtr<Canvas> canvas) override; |
+ bool Draw() override; |
+ base::WeakPtr<Drawable> GetWeakPtr() override; |
+ int GetZIndex() override; |
+ |
+ private: |
+ base::WeakPtr<Canvas> canvas_ = nullptr; |
joedow
2017/01/25 23:16:28
You shouldn't need to assign nullptr here, WeakPtr
nicholss
2017/01/26 18:00:16
Done.
|
+ int square_size_; |
joedow
2017/01/25 23:16:28
Init this to a default value here?
nicholss
2017/01/26 18:00:16
Done.
|
+ GLuint program_; |
+ |
+ base::ThreadChecker thread_checker_; |
+ base::WeakPtrFactory<Drawable> weak_factory_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(GlDemoScreen); |
+}; |
+ |
+} // namespace remoting |
+ |
+#endif // REMOTING_CLIENT_IOS_DISPLAY_GL_DEMO_SCREEN_H_ |