summaryrefslogtreecommitdiffstats
path: root/remoting/host/capturer_fake_ascii.cc
diff options
context:
space:
mode:
Diffstat (limited to 'remoting/host/capturer_fake_ascii.cc')
-rw-r--r--remoting/host/capturer_fake_ascii.cc33
1 files changed, 20 insertions, 13 deletions
diff --git a/remoting/host/capturer_fake_ascii.cc b/remoting/host/capturer_fake_ascii.cc
index ccdbfcf..1bb9d44 100644
--- a/remoting/host/capturer_fake_ascii.cc
+++ b/remoting/host/capturer_fake_ascii.cc
@@ -18,19 +18,6 @@ CapturerFakeAscii::CapturerFakeAscii() {
CapturerFakeAscii::~CapturerFakeAscii() {
}
-void CapturerFakeAscii::CaptureRects(const RectVector& rects,
- CaptureCompletedCallback* callback) {
- GenerateImage();
- DataPlanes planes;
- planes.data[0] = buffers_[current_buffer_].get();
- planes.strides[0] = bytes_per_row_;
- scoped_refptr<CaptureData> capture_data(new CaptureData(planes,
- width_,
- height_,
- pixel_format_));
- FinishCapture(capture_data, callback);
-}
-
void CapturerFakeAscii::ScreenConfigurationChanged() {
width_ = kWidth;
height_ = kHeight;
@@ -44,6 +31,26 @@ void CapturerFakeAscii::ScreenConfigurationChanged() {
}
}
+void CapturerFakeAscii::CalculateInvalidRects() {
+ // Capture and invalidate the entire screen.
+ // Performing the capture here is modelled on the Windows
+ // GDI capturer.
+ GenerateImage();
+ InvalidateFullScreen();
+}
+
+void CapturerFakeAscii::CaptureRects(const InvalidRects& rects,
+ CaptureCompletedCallback* callback) {
+ DataPlanes planes;
+ planes.data[0] = buffers_[current_buffer_].get();
+ planes.strides[0] = bytes_per_row_;
+ scoped_refptr<CaptureData> capture_data(new CaptureData(planes,
+ width_,
+ height_,
+ pixel_format_));
+ FinishCapture(capture_data, callback);
+}
+
void CapturerFakeAscii::GenerateImage() {
for (int y = 0; y < height_; ++y) {
uint8* row = buffers_[current_buffer_].get() + bytes_per_row_ * y;