OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/screen_capturer_fake.h" | 5 #include "remoting/host/screen_capturer_fake.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/time.h" | 8 #include "base/time/time.h" |
9 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" | 9 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" |
10 | 10 |
11 namespace remoting { | 11 namespace remoting { |
12 | 12 |
13 // ScreenCapturerFake generates a white picture of size kWidth x kHeight | 13 // ScreenCapturerFake generates a white picture of size kWidth x kHeight |
14 // with a rectangle of size kBoxWidth x kBoxHeight. The rectangle moves kSpeed | 14 // with a rectangle of size kBoxWidth x kBoxHeight. The rectangle moves kSpeed |
15 // pixels per frame along both axes, and bounces off the sides of the screen. | 15 // pixels per frame along both axes, and bounces off the sides of the screen. |
16 static const int kWidth = ScreenCapturerFake::kWidth; | 16 static const int kWidth = ScreenCapturerFake::kWidth; |
17 static const int kHeight = ScreenCapturerFake::kHeight; | 17 static const int kHeight = ScreenCapturerFake::kHeight; |
18 static const int kBoxWidth = 140; | 18 static const int kBoxWidth = 140; |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 } | 119 } |
120 } | 120 } |
121 | 121 |
122 void ScreenCapturerFake::ScreenConfigurationChanged() { | 122 void ScreenCapturerFake::ScreenConfigurationChanged() { |
123 size_.set(kWidth, kHeight); | 123 size_.set(kWidth, kHeight); |
124 queue_.Reset(); | 124 queue_.Reset(); |
125 bytes_per_row_ = size_.width() * webrtc::DesktopFrame::kBytesPerPixel; | 125 bytes_per_row_ = size_.width() * webrtc::DesktopFrame::kBytesPerPixel; |
126 } | 126 } |
127 | 127 |
128 } // namespace remoting | 128 } // namespace remoting |
OLD | NEW |