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

Unified Diff: remoting/host/x_server_pixel_buffer.cc

Issue 7491070: Switch over to using SkRegions to calculate dirty areas. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: clean up comments Created 9 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
Index: remoting/host/x_server_pixel_buffer.cc
diff --git a/remoting/host/x_server_pixel_buffer.cc b/remoting/host/x_server_pixel_buffer.cc
index 8bfd004e2aa9bebfae9f9b8d579acc811732840c..a830920b3cfc7022bee9204e6ba692817989daa6 100644
--- a/remoting/host/x_server_pixel_buffer.cc
+++ b/remoting/host/x_server_pixel_buffer.cc
@@ -148,21 +148,21 @@ void XServerPixelBuffer::Synchronize() {
}
}
-uint8* XServerPixelBuffer::CaptureRect(const gfx::Rect& rect) {
+uint8* XServerPixelBuffer::CaptureRect(const SkIRect& rect) {
if (shm_segment_info_) {
if (shm_pixmap_) {
XCopyArea(display_, root_window_, shm_pixmap_, shm_gc_,
- rect.x(), rect.y(), rect.width(), rect.height(),
- rect.x(), rect.y());
+ rect.fLeft, rect.fTop, rect.width(), rect.height(),
+ rect.fLeft, rect.fTop);
XSync(display_, False);
}
return reinterpret_cast<uint8*>(x_image_->data) +
- rect.y() * x_image_->bytes_per_line +
- rect.x() * x_image_->bits_per_pixel / 8;
+ rect.fTop * x_image_->bytes_per_line +
+ rect.fLeft * x_image_->bits_per_pixel / 8;
} else {
if (x_image_)
XDestroyImage(x_image_);
- x_image_ = XGetImage(display_, root_window_, rect.x(), rect.y(),
+ x_image_ = XGetImage(display_, root_window_, rect.fLeft, rect.fTop,
rect.width(), rect.height(), AllPlanes, ZPixmap);
return reinterpret_cast<uint8*>(x_image_->data);
}

Powered by Google App Engine
This is Rietveld 408576698