| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 if (canvas_width_ != frame->size().width() || | 74 if (canvas_width_ != frame->size().width() || |
| 75 canvas_height_ != frame->size().height()) { | 75 canvas_height_ != frame->size().height()) { |
| 76 if (delegate_) { | 76 if (delegate_) { |
| 77 delegate_->OnSizeChanged(frame->size().width(), frame->size().height()); | 77 delegate_->OnSizeChanged(frame->size().width(), frame->size().height()); |
| 78 } | 78 } |
| 79 canvas_width_ = frame->size().width(); | 79 canvas_width_ = frame->size().width(); |
| 80 canvas_height_ = frame->size().height(); | 80 canvas_height_ = frame->size().height(); |
| 81 cursor_.SetCanvasSize(canvas_width_, canvas_height_); | 81 cursor_.SetCanvasSize(canvas_width_, canvas_height_); |
| 82 } | 82 } |
| 83 | 83 |
| 84 desktop_.SetVideoFrame(std::move(frame)); | 84 desktop_.SetVideoFrame(*frame); |
| 85 pending_done_callbacks_.push(done); | 85 pending_done_callbacks_.push(done); |
| 86 RequestRender(); | 86 RequestRender(); |
| 87 } | 87 } |
| 88 | 88 |
| 89 void GlRenderer::OnCursorShapeChanged(const protocol::CursorShapeInfo& shape) { | 89 void GlRenderer::OnCursorShapeChanged(const protocol::CursorShapeInfo& shape) { |
| 90 DCHECK(thread_checker_.CalledOnValidThread()); | 90 DCHECK(thread_checker_.CalledOnValidThread()); |
| 91 cursor_.SetCursorShape(shape); | 91 cursor_.SetCursorShape(shape); |
| 92 RequestRender(); | 92 RequestRender(); |
| 93 } | 93 } |
| 94 | 94 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 | 148 |
| 149 delegate_->OnFrameRendered(); | 149 delegate_->OnFrameRendered(); |
| 150 | 150 |
| 151 while (!pending_done_callbacks_.empty()) { | 151 while (!pending_done_callbacks_.empty()) { |
| 152 pending_done_callbacks_.front().Run(); | 152 pending_done_callbacks_.front().Run(); |
| 153 pending_done_callbacks_.pop(); | 153 pending_done_callbacks_.pop(); |
| 154 } | 154 } |
| 155 } | 155 } |
| 156 | 156 |
| 157 } // namespace remoting | 157 } // namespace remoting |
| OLD | NEW |