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 #include "remoting/client/gl_renderer.h" | 5 #include "remoting/client/gl_renderer.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/threading/thread_task_runner_handle.h" | 9 #include "base/threading/thread_task_runner_handle.h" |
10 #include "remoting/client/gl_canvas.h" | 10 #include "remoting/client/gl_canvas.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 } | 36 } |
37 } | 37 } |
38 | 38 |
39 void GlRenderer::OnPixelTransformationChanged( | 39 void GlRenderer::OnPixelTransformationChanged( |
40 const std::array<float, 9>& matrix) { | 40 const std::array<float, 9>& matrix) { |
41 DCHECK(thread_checker_.CalledOnValidThread()); | 41 DCHECK(thread_checker_.CalledOnValidThread()); |
42 canvas_->SetTransformationMatrix(matrix); | 42 canvas_->SetTransformationMatrix(matrix); |
43 RequestRender(); | 43 RequestRender(); |
44 } | 44 } |
45 | 45 |
46 void GlRenderer::OnCursorMoved(int x, int y) { | 46 void GlRenderer::OnCursorMoved(float x, float y) { |
47 DCHECK(thread_checker_.CalledOnValidThread()); | 47 DCHECK(thread_checker_.CalledOnValidThread()); |
48 cursor_.SetCursorPosition(x, y); | 48 cursor_.SetCursorPosition(x, y); |
49 RequestRender(); | 49 RequestRender(); |
50 } | 50 } |
51 | 51 |
52 void GlRenderer::OnCursorInputFeedback(int x, int y, float diameter) { | 52 void GlRenderer::OnCursorInputFeedback(float x, float y, float diameter) { |
53 DCHECK(thread_checker_.CalledOnValidThread()); | 53 DCHECK(thread_checker_.CalledOnValidThread()); |
54 cursor_feedback_.StartAnimation(x, y, diameter); | 54 cursor_feedback_.StartAnimation(x, y, diameter); |
55 RequestRender(); | 55 RequestRender(); |
56 } | 56 } |
57 | 57 |
58 void GlRenderer::OnCursorVisibilityChanged(bool visible) { | 58 void GlRenderer::OnCursorVisibilityChanged(bool visible) { |
59 DCHECK(thread_checker_.CalledOnValidThread()); | 59 DCHECK(thread_checker_.CalledOnValidThread()); |
60 cursor_.SetCursorVisible(visible); | 60 cursor_.SetCursorVisible(visible); |
61 RequestRender(); | 61 RequestRender(); |
62 } | 62 } |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 | 141 |
142 delegate_->OnFrameRendered(); | 142 delegate_->OnFrameRendered(); |
143 | 143 |
144 while (!pending_done_callbacks_.empty()) { | 144 while (!pending_done_callbacks_.empty()) { |
145 pending_done_callbacks_.front().Run(); | 145 pending_done_callbacks_.front().Run(); |
146 pending_done_callbacks_.pop(); | 146 pending_done_callbacks_.pop(); |
147 } | 147 } |
148 } | 148 } |
149 | 149 |
150 } // namespace remoting | 150 } // namespace remoting |
OLD | NEW |