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

Unified Diff: remoting/host/capturer_mac.cc

Issue 7982037: Fix Chromoting Mac to work with multiple monitors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/capturer_mac.cc
diff --git a/remoting/host/capturer_mac.cc b/remoting/host/capturer_mac.cc
index ae928475c3663855def99fad02df0729c554e273..8b91c459261210922e3ebc0e96e1850d4e09e242 100644
--- a/remoting/host/capturer_mac.cc
+++ b/remoting/host/capturer_mac.cc
@@ -377,13 +377,14 @@ void CapturerMac::GlBlitFast(const VideoFrameBuffer& buffer,
const int y_offset = (buffer_height - 1) * buffer.bytes_per_row();
for(SkRegion::Iterator i(last_invalid_region_); !i.done(); i.next()) {
SkIRect copy_rect = i.rect();
- copy_rect.intersect(clip_rect);
- CopyRect(last_buffer_ + y_offset,
- -buffer.bytes_per_row(),
- buffer.ptr() + y_offset,
- -buffer.bytes_per_row(),
- 4, // Bytes for pixel for RGBA.
- copy_rect);
+ if (copy_rect.intersect(clip_rect)) {
+ CopyRect(last_buffer_ + y_offset,
+ -buffer.bytes_per_row(),
+ buffer.ptr() + y_offset,
+ -buffer.bytes_per_row(),
+ 4, // Bytes for pixel for RGBA.
+ copy_rect);
+ }
}
}
last_buffer_ = buffer.ptr();
@@ -404,13 +405,14 @@ void CapturerMac::GlBlitFast(const VideoFrameBuffer& buffer,
const int y_offset = (buffer_height - 1) * buffer.bytes_per_row();
for(SkRegion::Iterator i(region); !i.done(); i.next()) {
SkIRect copy_rect = i.rect();
- copy_rect.intersect(clip_rect);
- CopyRect(ptr + y_offset,
- -buffer.bytes_per_row(),
- buffer.ptr() + y_offset,
- -buffer.bytes_per_row(),
- 4, // Bytes for pixel for RGBA.
- copy_rect);
+ if (copy_rect.intersect(clip_rect)) {
+ CopyRect(ptr + y_offset,
+ -buffer.bytes_per_row(),
+ buffer.ptr() + y_offset,
+ -buffer.bytes_per_row(),
+ 4, // Bytes for pixel for RGBA.
+ copy_rect);
+ }
}
}
if (!glUnmapBufferARB(GL_PIXEL_PACK_BUFFER_ARB)) {
@@ -460,13 +462,14 @@ void CapturerMac::CgBlit(const VideoFrameBuffer& buffer,
// http://crbug.com/92354
for(SkRegion::Iterator i(region); !i.done(); i.next()) {
SkIRect copy_rect = i.rect();
- copy_rect.intersect(clip_rect);
- CopyRect(display_base_address,
- src_bytes_per_row,
- buffer.ptr(),
- buffer.bytes_per_row(),
- src_bytes_per_pixel,
- copy_rect);
+ if (copy_rect.intersect(clip_rect)) {
+ CopyRect(display_base_address,
+ src_bytes_per_row,
+ buffer.ptr(),
+ buffer.bytes_per_row(),
+ src_bytes_per_pixel,
+ copy_rect);
+ }
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698