OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_fake.h" | 5 #include "remoting/host/capturer_fake.h" |
6 | 6 |
7 namespace remoting { | 7 namespace remoting { |
8 | 8 |
9 // CapturerFake generates a white picture of size kWidth x kHeight with a | 9 // CapturerFake generates a white picture of size kWidth x kHeight with a |
10 // rectangle of size kBoxWidth x kBoxHeight. The rectangle moves kSpeed pixels | 10 // rectangle of size kBoxWidth x kBoxHeight. The rectangle moves kSpeed pixels |
(...skipping 24 matching lines...) Expand all Loading... |
35 | 35 |
36 CapturerFake::~CapturerFake() { | 36 CapturerFake::~CapturerFake() { |
37 } | 37 } |
38 | 38 |
39 void CapturerFake::Start() { | 39 void CapturerFake::Start() { |
40 } | 40 } |
41 | 41 |
42 void CapturerFake::Stop() { | 42 void CapturerFake::Stop() { |
43 } | 43 } |
44 | 44 |
| 45 void CapturerFake::SetCursorShapeChangedCallback( |
| 46 const CursorShapeChangedCallback& callback) { |
| 47 } |
| 48 |
45 void CapturerFake::ScreenConfigurationChanged() { | 49 void CapturerFake::ScreenConfigurationChanged() { |
46 size_ = SkISize::Make(kWidth, kHeight); | 50 size_ = SkISize::Make(kWidth, kHeight); |
47 bytes_per_row_ = size_.width() * kBytesPerPixel; | 51 bytes_per_row_ = size_.width() * kBytesPerPixel; |
48 pixel_format_ = media::VideoFrame::RGB32; | 52 pixel_format_ = media::VideoFrame::RGB32; |
49 | 53 |
50 // Create memory for the buffers. | 54 // Create memory for the buffers. |
51 int buffer_size = size_.height() * bytes_per_row_; | 55 int buffer_size = size_.height() * bytes_per_row_; |
52 for (int i = 0; i < kNumBuffers; i++) { | 56 for (int i = 0; i < kNumBuffers; i++) { |
53 buffers_[i].reset(new uint8[buffer_size]); | 57 buffers_[i].reset(new uint8[buffer_size]); |
54 } | 58 } |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 row[x * kBytesPerPixel] = r; | 132 row[x * kBytesPerPixel] = r; |
129 row[x * kBytesPerPixel+1] = g; | 133 row[x * kBytesPerPixel+1] = g; |
130 row[x * kBytesPerPixel+2] = b; | 134 row[x * kBytesPerPixel+2] = b; |
131 row[x * kBytesPerPixel+3] = 0xff; | 135 row[x * kBytesPerPixel+3] = 0xff; |
132 } | 136 } |
133 row += bytes_per_row_; | 137 row += bytes_per_row_; |
134 } | 138 } |
135 } | 139 } |
136 | 140 |
137 } // namespace remoting | 141 } // namespace remoting |
OLD | NEW |