| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_CAPTURER_DIFFER_H_ |
| 6 #define REMOTING_HOST_DIFFER_H_ | 6 #define REMOTING_CAPTURER_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 "third_party/skia/include/core/SkRegion.h" | 12 #include "third_party/skia/include/core/SkRegion.h" |
| 13 | 13 |
| 14 namespace remoting { | 14 namespace remoting { |
| 15 | 15 |
| 16 typedef uint8 DiffInfo; | 16 typedef uint8 DiffInfo; |
| 17 | 17 |
| 18 // TODO: Simplify differ now that we are working with SkRegions. | 18 // TODO: Simplify differ now that we are working with SkRegions. |
| 19 // diff_info_ should no longer be needed, as we can put our data directly into | 19 // diff_info_ should no longer be needed, as we can put our data directly into |
| 20 // the region that we are calculating. | 20 // the region that we are calculating. |
| 21 // http://crbug.com/92379 | 21 // http://crbug.com/92379 |
| 22 // TODO(sergeyu): Rename this class to something more sensible, e.g. |
| 23 // VideoFrameDifferencer. |
| 22 class Differ { | 24 class Differ { |
| 23 public: | 25 public: |
| 24 // Create a differ that operates on bitmaps with the specified width, height | 26 // Create a differ that operates on bitmaps with the specified width, height |
| 25 // and bytes_per_pixel. | 27 // and bytes_per_pixel. |
| 26 Differ(int width, int height, int bytes_per_pixel, int stride); | 28 Differ(int width, int height, int bytes_per_pixel, int stride); |
| 27 ~Differ(); | 29 ~Differ(); |
| 28 | 30 |
| 29 int width() { return width_; } | 31 int width() { return width_; } |
| 30 int height() { return height_; } | 32 int height() { return height_; } |
| 31 int bytes_per_pixel() { return bytes_per_pixel_; } | 33 int bytes_per_pixel() { return bytes_per_pixel_; } |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 // Dimensions and total size of diff info array. | 74 // Dimensions and total size of diff info array. |
| 73 int diff_info_width_; | 75 int diff_info_width_; |
| 74 int diff_info_height_; | 76 int diff_info_height_; |
| 75 int diff_info_size_; | 77 int diff_info_size_; |
| 76 | 78 |
| 77 DISALLOW_COPY_AND_ASSIGN(Differ); | 79 DISALLOW_COPY_AND_ASSIGN(Differ); |
| 78 }; | 80 }; |
| 79 | 81 |
| 80 } // namespace remoting | 82 } // namespace remoting |
| 81 | 83 |
| 82 #endif // REMOTING_HOST_DIFFER_H_ | 84 #endif // REMOTING_CAPTURER_DIFFER_H_ |
| OLD | NEW |