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

Unified Diff: remoting/host/capturer_fake.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.h ('k') | remoting/host/capturer_fake_ascii.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/capturer_fake.cc
===================================================================
--- remoting/host/capturer_fake.cc (revision 55264)
+++ remoting/host/capturer_fake.cc (working copy)
@@ -20,9 +20,26 @@
CapturerFake::~CapturerFake() {
}
-void CapturerFake::CaptureRects(const RectVector& rects,
+void CapturerFake::ScreenConfigurationChanged() {
+ width_ = kWidth;
+ height_ = kHeight;
+ pixel_format_ = PixelFormatRgb32;
+ bytes_per_row_ = width_ * kBytesPerPixel;
+
+ // Create memory for the buffers.
+ int buffer_size = height_ * bytes_per_row_;
+ for (int i = 0; i < kNumBuffers; i++) {
+ buffers_[i].reset(new uint8[buffer_size]);
+ }
+}
+
+void CapturerFake::CalculateInvalidRects() {
+ GenerateImage();
+ InvalidateFullScreen();
+}
+
+void CapturerFake::CaptureRects(const InvalidRects& rects,
CaptureCompletedCallback* callback) {
- GenerateImage();
DataPlanes planes;
planes.data[0] = buffers_[current_buffer_].get();
planes.strides[0] = bytes_per_row_;
@@ -35,19 +52,6 @@
FinishCapture(capture_data, callback);
}
-void CapturerFake::ScreenConfigurationChanged() {
- width_ = kWidth;
- height_ = kHeight;
- pixel_format_ = PixelFormatRgb32;
- bytes_per_row_ = width_ * kBytesPerPixel;
-
- // Create memory for the buffers.
- int buffer_size = height_ * bytes_per_row_;
- for (int i = 0; i < kNumBuffers; i++) {
- buffers_[i].reset(new uint8[buffer_size]);
- }
-}
-
void CapturerFake::GenerateImage() {
uint8* row = buffers_[current_buffer_].get();
for (int y = 0; y < height_; ++y) {
« no previous file with comments | « remoting/host/capturer_fake.h ('k') | remoting/host/capturer_fake_ascii.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698