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

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

Issue 6501005: Resubmit - Use SSE2 block differ for chromoting (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 10 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 | « media/base/yuv_convert.cc ('k') | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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"
(...skipping 18 matching lines...) Expand all
29 29
30 // Given the previous and current screen buffer, calculate the set of 30 // Given the previous and current screen buffer, calculate the set of
31 // rectangles that enclose all the changed pixels in the new screen. 31 // rectangles that enclose all the changed pixels in the new screen.
32 void CalcDirtyRects(const void* prev_buffer, const void* curr_buffer, 32 void CalcDirtyRects(const void* prev_buffer, const void* curr_buffer,
33 InvalidRects* rects); 33 InvalidRects* rects);
34 34
35 // Identify all of the blocks that contain changed pixels. 35 // Identify all of the blocks that contain changed pixels.
36 void MarkDirtyBlocks(const void* prev_buffer, const void* curr_buffer); 36 void MarkDirtyBlocks(const void* prev_buffer, const void* curr_buffer);
37 37
38 // Diff a small block of image and return non-zero if there is a diff. 38 // Diff a small block of image and return non-zero if there is a diff.
39 // Currently, this just returns 0 or 1, but this may change in the future
40 // to return the number of pixels changed.
41 DiffInfo DiffBlock(const uint8* prev_buffer, const uint8* curr_buffer,
42 int stride);
43
44 // Diff a small block of image and return non-zero if there is a diff.
45 // This checks only the part of the block specified by the width and 39 // This checks only the part of the block specified by the width and
46 // height parameters. 40 // height parameters.
47 // This is much slower than DiffBlock() since it cannot assume that the 41 // This is much slower than DiffBlock() since it cannot assume that the
48 // full block is being checked. 42 // full block is being checked.
49 // If we force the capturer to always return images whose width/height are 43 // If we force the capturer to always return images whose width/height are
50 // multiples of kBlockSize, then this will never be called. 44 // multiples of kBlockSize, then this will never be called.
51 DiffInfo DiffPartialBlock(const uint8* prev_buffer, const uint8* curr_buffer, 45 DiffInfo DiffPartialBlock(const uint8* prev_buffer, const uint8* curr_buffer,
52 int stride, int width, int height); 46 int stride, int width, int height);
53 47
54 // After the dirty blocks have been identified, this routine merges adjacent 48 // After the dirty blocks have been identified, this routine merges adjacent
(...skipping 24 matching lines...) Expand all
79 int diff_info_width_; 73 int diff_info_width_;
80 int diff_info_height_; 74 int diff_info_height_;
81 int diff_info_size_; 75 int diff_info_size_;
82 76
83 DISALLOW_COPY_AND_ASSIGN(Differ); 77 DISALLOW_COPY_AND_ASSIGN(Differ);
84 }; 78 };
85 79
86 } // namespace remoting 80 } // namespace remoting
87 81
88 #endif // REMOTING_HOST_DIFFER_H_ 82 #endif // REMOTING_HOST_DIFFER_H_
OLDNEW
« no previous file with comments | « media/base/yuv_convert.cc ('k') | remoting/host/differ.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698