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

Side by Side Diff: remoting/host/capturer.cc

Issue 2690003: Copy the (early prototype of) remoting in Chrome into the public tree.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « remoting/host/capturer.h ('k') | remoting/host/capturer_fake.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "remoting/host/capturer.h"
6
7 namespace remoting {
8
9 Capturer::Capturer()
10 : width_(0),
11 height_(0),
12 pixel_format_(chromotocol_pb::PixelFormatInvalid),
13 bytes_per_pixel_(0),
14 bytes_per_row_(0),
15 current_buffer_(0) {
16 }
17
18 Capturer::~Capturer() {
19 }
20
21 void Capturer::GetDirtyRects(DirtyRects* rects) const {
22 *rects = dirty_rects_;
23 }
24
25 int Capturer::GetWidth() const {
26 return width_;
27 }
28
29 int Capturer::GetHeight() const {
30 return height_;
31 }
32
33 chromotocol_pb::PixelFormat Capturer::GetPixelFormat() const {
34 return pixel_format_;
35 }
36
37 void Capturer::InvalidateRect(gfx::Rect dirty_rect) {
38 inval_rects_.push_back(dirty_rect);
39 }
40
41 void Capturer::FinishCapture(Task* done_task) {
42 done_task->Run();
43 delete done_task;
44
45 // Select the next buffer to be the current buffer.
46 current_buffer_ = ++current_buffer_ % kNumBuffers;
47 }
48
49 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/capturer.h ('k') | remoting/host/capturer_fake.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698