Index: remoting/host/capturer_helper.h |
diff --git a/remoting/host/capturer_helper.h b/remoting/host/capturer_helper.h |
index b7650c0fbf1e4696e061d1ebd5f02948eb2f44ba..7220a82a0256035f4a0757952b8f21f1afa25b83 100644 |
--- a/remoting/host/capturer_helper.h |
+++ b/remoting/host/capturer_helper.h |
@@ -6,24 +6,24 @@ |
#define REMOTING_HOST_CAPTURER_HELPER_H_ |
#include "base/synchronization/lock.h" |
-#include "remoting/base/types.h" |
+#include "third_party/skia/include/core/SkRegion.h" |
+#include "ui/gfx/size.h" |
namespace remoting { |
// CapturerHelper is intended to be used by an implementation of the Capturer |
-// interface. It maintains a thread-safe list of invalid rectangles, and the |
-// size of the most recently captured screen, on behalf of the Capturer that |
-// owns it. |
+// interface. It maintains a thread-safe invalid region, and the size of the |
+// most recently captured screen, on behalf of the Capturer that owns it. |
class CapturerHelper { |
public: |
CapturerHelper(); |
~CapturerHelper(); |
- // Clear out the list of invalid rects. |
- void ClearInvalidRects(); |
+ // Clear out the invalid region. |
+ void ClearInvalidRegion(); |
- // Invalidate the specified screen rects. |
- void InvalidateRects(const InvalidRects& inval_rects); |
+ // Invalidate the specified region. |
+ void InvalidateRegion(const SkRegion& inval_region); |
// Invalidate the entire screen, of a given size. |
void InvalidateScreen(const gfx::Size& size); |
@@ -35,29 +35,29 @@ class CapturerHelper { |
// Whether the invalid region is a full screen of a given size. |
bool IsCaptureFullScreen(const gfx::Size& size); |
- // Swap the given set of rects with the stored invalid rects. |
+ // Swap the given region with the stored invalid region. |
// This should be used like this: |
// |
- // InvalidRects inval_rects; |
- // common.SwapInvalidRects(inval_rects); |
+ // SkRegion inval_region; |
+ // common.SwapInvalidRegion(inval_region); |
Wez
2011/08/08 20:49:34
Does this example actually add anything? How else
dmac
2011/08/10 20:30:36
Done.
|
// |
- // This passes the invalid rects to the caller, and removes them from this |
- // object. The caller should then pass the raster data in those rects to the |
+ // This passes the invalid region to the caller, and removes them from this |
+ // object. The caller should then pass the raster data in the region to the |
// client. |
- void SwapInvalidRects(InvalidRects& inval_rects); |
+ void SwapInvalidRegion(SkRegion& inval_region); |
Wez
2011/08/08 20:49:34
Pass by pointer, not reference.
dmac
2011/08/10 20:30:36
Done.
|
// Access the size of the most recently captured screen. |
const gfx::Size& size_most_recent() const; |
void set_size_most_recent(const gfx::Size& size); |
private: |
- // Rects that have been manually invalidated (through InvalidateRect). |
- // These will be returned as dirty_rects in the capture data during the next |
+ // A region that has been manually invalidated (through InvalidateRegion). |
+ // These will be returned as dirty_region in the capture data during the next |
// capture. |
- InvalidRects inval_rects_; |
+ SkRegion inval_region_; |
Wez
2011/08/08 20:49:34
Style: Rename |dirty_region| or |invalid_region|.
dmac
2011/08/10 20:30:36
Done.
|
- // A lock protecting |inval_rects_| across threads. |
- base::Lock inval_rects_lock_; |
+ // A lock protecting |inval_region_| across threads. |
+ base::Lock inval_region_lock_; |
Wez
2011/08/08 20:49:34
Rename to match region above.
dmac
2011/08/10 20:30:36
Done.
|
// The size of the most recently captured screen. |
gfx::Size size_most_recent_; |