| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef REMOTING_CLIENT_GL_RENDERER_H_ | 5 #ifndef REMOTING_CLIENT_GL_RENDERER_H_ |
| 6 #define REMOTING_CLIENT_GL_RENDERER_H_ | 6 #define REMOTING_CLIENT_GL_RENDERER_H_ |
| 7 | 7 |
| 8 #include <queue> | 8 #include <queue> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 // 3 by 3 transformation matrix, [ m0, m1, m2, m3, m4, m5, m6, m7, m8 ]. | 55 // 3 by 3 transformation matrix, [ m0, m1, m2, m3, m4, m5, m6, m7, m8 ]. |
| 56 // | 56 // |
| 57 // | m0, m1, m2, | | x | | 57 // | m0, m1, m2, | | x | |
| 58 // | m3, m4, m5, | * | y | | 58 // | m3, m4, m5, | * | y | |
| 59 // | m6, m7, m8 | | 1 | | 59 // | m6, m7, m8 | | 1 | |
| 60 // | 60 // |
| 61 // The final size of the canvas will be (m0*canvas_width, m4*canvas_height) | 61 // The final size of the canvas will be (m0*canvas_width, m4*canvas_height) |
| 62 // and the top-left corner will be (m2, m5) in pixel coordinates. | 62 // and the top-left corner will be (m2, m5) in pixel coordinates. |
| 63 void OnPixelTransformationChanged(const std::array<float, 9>& matrix); | 63 void OnPixelTransformationChanged(const std::array<float, 9>& matrix); |
| 64 | 64 |
| 65 void OnCursorMoved(int x, int y); | 65 void OnCursorMoved(float x, float y); |
| 66 | 66 |
| 67 void OnCursorInputFeedback(int x, int y, float diameter); | 67 void OnCursorInputFeedback(float x, float y, float diameter); |
| 68 | 68 |
| 69 void OnCursorVisibilityChanged(bool visible); | 69 void OnCursorVisibilityChanged(bool visible); |
| 70 | 70 |
| 71 // Called when a desktop frame is received. | 71 // Called when a desktop frame is received. |
| 72 // The size of the canvas is determined by the dimension of the desktop frame. | 72 // The size of the canvas is determined by the dimension of the desktop frame. |
| 73 // |done| will be queued up and called on the display thread after the actual | 73 // |done| will be queued up and called on the display thread after the actual |
| 74 // rendering happens. | 74 // rendering happens. |
| 75 void OnFrameReceived(std::unique_ptr<webrtc::DesktopFrame> frame, | 75 void OnFrameReceived(std::unique_ptr<webrtc::DesktopFrame> frame, |
| 76 const base::Closure& done); | 76 const base::Closure& done); |
| 77 | 77 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 base::ThreadChecker thread_checker_; | 128 base::ThreadChecker thread_checker_; |
| 129 base::WeakPtr<GlRenderer> weak_ptr_; | 129 base::WeakPtr<GlRenderer> weak_ptr_; |
| 130 base::WeakPtrFactory<GlRenderer> weak_factory_; | 130 base::WeakPtrFactory<GlRenderer> weak_factory_; |
| 131 | 131 |
| 132 DISALLOW_COPY_AND_ASSIGN(GlRenderer); | 132 DISALLOW_COPY_AND_ASSIGN(GlRenderer); |
| 133 }; | 133 }; |
| 134 | 134 |
| 135 } // namespace remoting | 135 } // namespace remoting |
| 136 | 136 |
| 137 #endif // REMOTING_CLIENT_GL_RENDERER_H_ | 137 #endif // REMOTING_CLIENT_GL_RENDERER_H_ |
| OLD | NEW |