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

Unified Diff: remoting/host/capturer_fake_ascii.cc

Issue 3013015: Initial pass at integrating Differ into the chromoting host code.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/capturer_fake_ascii.h ('k') | remoting/host/capturer_gdi.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/capturer_fake_ascii.cc
===================================================================
--- remoting/host/capturer_fake_ascii.cc (revision 55264)
+++ remoting/host/capturer_fake_ascii.cc (working copy)
@@ -18,19 +18,6 @@
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::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;
« no previous file with comments | « remoting/host/capturer_fake_ascii.h ('k') | remoting/host/capturer_gdi.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698