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

Unified Diff: remoting/host/differ.h

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/client_connection.h ('k') | remoting/host/differ.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/differ.h
===================================================================
--- remoting/host/differ.h (revision 55264)
+++ remoting/host/differ.h (working copy)
@@ -10,10 +10,10 @@
#include "base/basictypes.h"
#include "base/scoped_ptr.h"
#include "gfx/rect.h"
+#include "remoting/base/types.h"
namespace remoting {
-typedef std::vector<gfx::Rect> DirtyRects;
typedef uint8 DiffInfo;
// Size (in pixels) of each square block used for diffing.
@@ -24,12 +24,12 @@
public:
// Create a differ that operates on bitmaps with the specified width, height
// and bytes_per_pixel.
- Differ(int width, int height, int bytes_per_pixel);
+ Differ(int width, int height, int bytes_per_pixel, int stride);
// Given the previous and current screen buffer, calculate the set of
// rectangles that enclose all the changed pixels in the new screen.
void CalcDirtyRects(const void* prev_buffer, const void* curr_buffer,
- DirtyRects* rects);
+ InvalidRects* rects);
// Identify all of the blocks that contain changed pixels.
void MarkDirtyBlocks(const void* prev_buffer, const void* curr_buffer);
@@ -54,7 +54,7 @@
// blocks into larger rectangular units.
// The goal is to minimize the number of rects that cover the dirty blocks,
// although it is not required to calc the absolute minimum of rects.
- void MergeBlocks(DirtyRects* rects);
+ void MergeBlocks(InvalidRects* rects);
// Allow tests to access our private parts.
friend class DifferTest;
@@ -65,9 +65,10 @@
int height_;
// Number of bytes for each pixel in source and dest bitmap.
+ // (Yes, they must match.)
int bytes_per_pixel_;
- // Number of bytes in each row of the image.
+ // Number of bytes in each row of the image (AKA: stride).
int bytes_per_row_;
// Diff information for each block in the image.
« no previous file with comments | « remoting/host/client_connection.h ('k') | remoting/host/differ.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698