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

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

Issue 2272793003: [Remoting Android] New touch feedback texture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reviewer's Feedback 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_cursor_feedback_texture.cc ('k') | no next file » | 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 125
126 void GlRenderer::OnRender() { 126 void GlRenderer::OnRender() {
127 DCHECK(thread_checker_.CalledOnValidThread()); 127 DCHECK(thread_checker_.CalledOnValidThread());
128 render_scheduled_ = false; 128 render_scheduled_ = false;
129 if (!delegate_ || !delegate_->CanRenderFrame()) { 129 if (!delegate_ || !delegate_->CanRenderFrame()) {
130 return; 130 return;
131 } 131 }
132 132
133 if (canvas_) { 133 if (canvas_) {
134 glClear(GL_COLOR_BUFFER_BIT); 134 glClear(GL_COLOR_BUFFER_BIT);
135
136 // Layers will be drawn from bottom to top.
135 desktop_.Draw(); 137 desktop_.Draw();
136 cursor_.Draw(); 138
139 // |cursor_feedback_| should be drawn before |cursor_| so that the cursor
140 // won't be covered by the feedback animation.
137 if (cursor_feedback_.Draw()) { 141 if (cursor_feedback_.Draw()) {
138 RequestRender(); 142 RequestRender();
139 } 143 }
144
145 cursor_.Draw();
140 } 146 }
141 147
142 delegate_->OnFrameRendered(); 148 delegate_->OnFrameRendered();
143 149
144 while (!pending_done_callbacks_.empty()) { 150 while (!pending_done_callbacks_.empty()) {
145 pending_done_callbacks_.front().Run(); 151 pending_done_callbacks_.front().Run();
146 pending_done_callbacks_.pop(); 152 pending_done_callbacks_.pop();
147 } 153 }
148 } 154 }
149 155
150 } // namespace remoting 156 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/client/gl_cursor_feedback_texture.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698