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_GL_CURSOR_FEEDBACK_TEXTURE_H_ |
| 6 #define REMOTING_CLIENT_GL_CURSOR_FEEDBACK_TEXTURE_H_ |
| 7 |
| 8 #include <vector> |
| 9 |
| 10 #include "base/macros.h" |
| 11 #include "base/memory/singleton.h" |
| 12 |
| 13 namespace remoting { |
| 14 |
| 15 // This is a singleton for generating and holding the the cursor feedback |
| 16 // texture. |
| 17 class GlCursorFeedbackTexture { |
| 18 public: |
| 19 static const int kTextureWidth; |
| 20 |
| 21 static GlCursorFeedbackTexture* GetInstance(); |
| 22 |
| 23 const std::vector<uint8_t>& GetTexture() const; |
| 24 |
| 25 private: |
| 26 GlCursorFeedbackTexture(); |
| 27 ~GlCursorFeedbackTexture(); |
| 28 |
| 29 friend struct base::DefaultSingletonTraits<GlCursorFeedbackTexture>; |
| 30 |
| 31 std::vector<uint8_t> texture_; |
| 32 |
| 33 DISALLOW_COPY_AND_ASSIGN(GlCursorFeedbackTexture); |
| 34 }; |
| 35 |
| 36 } // namespace remoting |
| 37 #endif // REMOTING_CLIENT_GL_CURSOR_FEEDBACK_TEXTURE_H_ |
OLD | NEW |