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

Unified Diff: remoting/host/differ.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/differ.h ('k') | remoting/host/differ_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/differ.cc
===================================================================
--- remoting/host/differ.cc (revision 55264)
+++ remoting/host/differ.cc (working copy)
@@ -8,12 +8,12 @@
namespace remoting {
-Differ::Differ(int width, int height, int bpp) {
+Differ::Differ(int width, int height, int bpp, int stride) {
// Dimensions of screen.
width_ = width;
height_ = height;
bytes_per_pixel_ = bpp;
- bytes_per_row_ = width_ * bytes_per_pixel_;
+ bytes_per_row_ = stride;
// Calc number of blocks (full and partial) required to cover entire image.
// One additional row/column is added as a boundary on the right & bottom.
@@ -24,7 +24,7 @@
}
void Differ::CalcDirtyRects(const void* prev_buffer, const void* curr_buffer,
- DirtyRects* rects) {
+ InvalidRects* rects) {
if (!rects) {
return;
}
@@ -147,7 +147,7 @@
return 0;
}
-void Differ::MergeBlocks(DirtyRects* rects) {
+void Differ::MergeBlocks(InvalidRects* rects) {
DCHECK(rects);
rects->clear();
@@ -211,7 +211,7 @@
if (top + height > height_) {
height = height_ - top;
}
- rects->push_back(gfx::Rect(left, top, width, height));
+ rects->insert(gfx::Rect(left, top, width, height));
}
// Increment to next block in this row.
« no previous file with comments | « remoting/host/differ.h ('k') | remoting/host/differ_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698