OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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_IOS_DISPLAY_GL_DEMO_SCREEN_H_ |
| 6 #define REMOTING_CLIENT_IOS_DISPLAY_GL_DEMO_SCREEN_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "base/threading/thread_checker.h" |
| 10 #include "remoting/client/display/drawable.h" |
| 11 #include "remoting/client/display/sys_opengl.h" |
| 12 |
| 13 namespace remoting { |
| 14 |
| 15 // This class draws the desktop on the canvas. |
| 16 class GlDemoScreen : public Drawable { |
| 17 public: |
| 18 GlDemoScreen(); |
| 19 ~GlDemoScreen() override; |
| 20 |
| 21 // Drawable implementation. |
| 22 void SetCanvas(base::WeakPtr<Canvas> canvas) override; |
| 23 bool Draw() override; |
| 24 base::WeakPtr<Drawable> GetWeakPtr() override; |
| 25 int GetZIndex() override; |
| 26 |
| 27 private: |
| 28 base::WeakPtr<Canvas> canvas_; |
| 29 int square_size_ = 0; |
| 30 GLuint program_; |
| 31 |
| 32 base::ThreadChecker thread_checker_; |
| 33 base::WeakPtrFactory<Drawable> weak_factory_; |
| 34 |
| 35 DISALLOW_COPY_AND_ASSIGN(GlDemoScreen); |
| 36 }; |
| 37 |
| 38 } // namespace remoting |
| 39 |
| 40 #endif // REMOTING_CLIENT_IOS_DISPLAY_GL_DEMO_SCREEN_H_ |
OLD | NEW |