| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/host/capturer.h" | 5 #include "remoting/host/capturer.h" |
| 6 | 6 |
| 7 namespace remoting { | 7 namespace remoting { |
| 8 | 8 |
| 9 Capturer::Capturer() | 9 Capturer::Capturer() |
| 10 : width_(0), | 10 : width_(0), |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 void Capturer::InvalidateRect(gfx::Rect dirty_rect) { | 37 void Capturer::InvalidateRect(gfx::Rect dirty_rect) { |
| 38 inval_rects_.push_back(dirty_rect); | 38 inval_rects_.push_back(dirty_rect); |
| 39 } | 39 } |
| 40 | 40 |
| 41 void Capturer::FinishCapture(Task* done_task) { | 41 void Capturer::FinishCapture(Task* done_task) { |
| 42 done_task->Run(); | 42 done_task->Run(); |
| 43 delete done_task; | 43 delete done_task; |
| 44 | 44 |
| 45 // Select the next buffer to be the current buffer. | 45 // Select the next buffer to be the current buffer. |
| 46 current_buffer_ = ++current_buffer_ % kNumBuffers; | 46 current_buffer_ = (current_buffer_ + 1) % kNumBuffers; |
| 47 } | 47 } |
| 48 | 48 |
| 49 } // namespace remoting | 49 } // namespace remoting |
| OLD | NEW |