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

Side by Side Diff: remoting/host/differ.h

Issue 7511014: Define Chromoting's differ block size in one (and only one) place. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update copyright 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | remoting/host/differ.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef REMOTING_HOST_DIFFER_H_ 5 #ifndef REMOTING_HOST_DIFFER_H_
6 #define REMOTING_HOST_DIFFER_H_ 6 #define REMOTING_HOST_DIFFER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "remoting/base/types.h" 12 #include "remoting/base/types.h"
13 #include "ui/gfx/rect.h" 13 #include "ui/gfx/rect.h"
14 14
15 namespace remoting { 15 namespace remoting {
16 16
17 typedef uint8 DiffInfo; 17 typedef uint8 DiffInfo;
18 18
19 // Size (in pixels) of each square block used for diffing.
20 // This must be a multiple of sizeof(uint64).
21 static const int kBlockSize = 32;
22
23 class Differ { 19 class Differ {
24 public: 20 public:
25 // Create a differ that operates on bitmaps with the specified width, height 21 // Create a differ that operates on bitmaps with the specified width, height
26 // and bytes_per_pixel. 22 // and bytes_per_pixel.
27 Differ(int width, int height, int bytes_per_pixel, int stride); 23 Differ(int width, int height, int bytes_per_pixel, int stride);
28 ~Differ(); 24 ~Differ();
29 25
30 int width() { return width_; } 26 int width() { return width_; }
31 int height() { return height_; } 27 int height() { return height_; }
32 int bytes_per_pixel() { return bytes_per_pixel_; } 28 int bytes_per_pixel() { return bytes_per_pixel_; }
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 int diff_info_width_; 72 int diff_info_width_;
77 int diff_info_height_; 73 int diff_info_height_;
78 int diff_info_size_; 74 int diff_info_size_;
79 75
80 DISALLOW_COPY_AND_ASSIGN(Differ); 76 DISALLOW_COPY_AND_ASSIGN(Differ);
81 }; 77 };
82 78
83 } // namespace remoting 79 } // namespace remoting
84 80
85 #endif // REMOTING_HOST_DIFFER_H_ 81 #endif // REMOTING_HOST_DIFFER_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/host/differ.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698