Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(293)

Side by Side Diff: remoting/client/gl_renderer.cc

Issue 2255663002: [Remoting Android] Use floating point coords for rendering the cursor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge ToT Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « remoting/client/gl_renderer.h ('k') | remoting/client/jni/jni_gl_display_handler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « remoting/client/gl_renderer.h ('k') | remoting/client/jni/jni_gl_display_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698