summaryrefslogtreecommitdiffstats
path: root/remoting/host/capturer_linux.cc
diff options
context:
space:
mode:
authorhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-22 18:16:53 +0000
committerhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-22 18:16:53 +0000
commitd3a4b09d49a617e667e79c387fbe3570c7fac950 (patch)
treeb67e7d9e794de45f347f745020b8af370a523f6c /remoting/host/capturer_linux.cc
parent20a648064480d72460d3b6b0b211ea781cdd6c55 (diff)
downloadchromium_src-d3a4b09d49a617e667e79c387fbe3570c7fac950.zip
chromium_src-d3a4b09d49a617e667e79c387fbe3570c7fac950.tar.gz
chromium_src-d3a4b09d49a617e667e79c387fbe3570c7fac950.tar.bz2
Change chromoting images to upright by default
Remove all the ugly code to have reverse rows. All images are upright now. BUG=71872 TEST=Everything in chromoting still works and upright. Review URL: http://codereview.chromium.org/6546057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75609 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/capturer_linux.cc')
-rw-r--r--remoting/host/capturer_linux.cc19
1 files changed, 5 insertions, 14 deletions
diff --git a/remoting/host/capturer_linux.cc b/remoting/host/capturer_linux.cc
index 5295b0f..f8e3fc6 100644
--- a/remoting/host/capturer_linux.cc
+++ b/remoting/host/capturer_linux.cc
@@ -286,17 +286,8 @@ void CapturerLinuxPimpl::CaptureRects(
// TODO(ajwong): We should only repair the rects that were copied!
XDamageSubtract(display_, damage_handle_, None, None);
- // Flip the rectangles based on y axis.
- InvalidRects inverted_rects;
- for (InvalidRects::const_iterator it = rects.begin();
- it != rects.end();
- ++it) {
- inverted_rects.insert(gfx::Rect(it->x(), capturer_->height() - it->bottom(),
- it->width(), it->height()));
- }
-
- capture_data->mutable_dirty_rects() = inverted_rects;
- last_invalid_rects_ = inverted_rects;
+ capture_data->mutable_dirty_rects() = rects;
+ last_invalid_rects_ = rects;
last_buffer_ = buffer;
// TODO(ajwong): These completion signals back to the upper class are very
@@ -326,14 +317,14 @@ void CapturerLinuxPimpl::FastBlit(XImage* image, int dest_x, int dest_y,
const int dst_stride = planes.strides[0];
const int src_stride = image->bytes_per_line;
- // Produce an upside down image.
- uint8* dst_pos = dst_buffer + dst_stride * (capturer_->height() - dest_y - 1);
+ uint8* dst_pos = dst_buffer + dst_stride * dest_y;
dst_pos += dest_x * kBytesPerPixel;
+
for (int y = 0; y < image->height; ++y) {
memcpy(dst_pos, src_pos, image->width * kBytesPerPixel);
src_pos += src_stride;
- dst_pos -= dst_stride;
+ dst_pos += dst_stride;
}
}