Index: remoting/client/gl_cursor_feedback_texture.h |
diff --git a/remoting/client/gl_cursor_feedback_texture.h b/remoting/client/gl_cursor_feedback_texture.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d9e293dc3ea2d4d5edef9792818e680cd872a3b1 |
--- /dev/null |
+++ b/remoting/client/gl_cursor_feedback_texture.h |
@@ -0,0 +1,33 @@ |
+// 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_GL_CURSOR_FEEDBACK_TEXTURE_H_ |
+#define REMOTING_CLIENT_GL_CURSOR_FEEDBACK_TEXTURE_H_ |
+ |
+#include <memory> |
+ |
+#include "base/macros.h" |
+#include "base/memory/singleton.h" |
+ |
+namespace remoting { |
+ |
+class GlCursorFeedbackTexture { |
Sergey Ulanov
2016/07/21 19:28:48
add a comment to explain what this class is used f
Yuwei
2016/07/21 21:44:42
Done.
|
+ public: |
+ static GlCursorFeedbackTexture* GetInstance(); |
+ const uint8_t* GetTexture() const; |
Sergey Ulanov
2016/07/21 19:28:48
empty line above this one
Yuwei
2016/07/21 21:44:42
Done.
|
+ int GetTextureDiameter() const; |
Sergey Ulanov
2016/07/21 19:28:48
nit: potentially these can be static functions as
Yuwei
2016/07/21 19:53:04
Maybe just a static const?
Sergey Ulanov
2016/07/21 20:10:46
Yes. But GetTexture() cannot be static const obvio
Yuwei
2016/07/21 21:44:41
Done.
Yuwei
2016/07/21 21:44:42
Acknowledged.
|
+ |
+ private: |
+ GlCursorFeedbackTexture(); |
+ ~GlCursorFeedbackTexture(); |
+ |
+ friend struct base::DefaultSingletonTraits<GlCursorFeedbackTexture>; |
+ |
+ std::unique_ptr<uint32_t[]> texture_; |
Sergey Ulanov
2016/07/21 19:28:48
Maybe change this to std::vector<uint8_t> Then you
Yuwei
2016/07/21 21:44:41
Done.
|
+ |
+ DISALLOW_COPY_AND_ASSIGN(GlCursorFeedbackTexture); |
+}; |
+ |
+} // namespace remoting |
+#endif // REMOTING_CLIENT_GL_CURSOR_FEEDBACK_TEXTURE_H_ |