Index: webrtc/modules/desktop_capture/screen_capturer_mac.mm |
diff --git a/webrtc/modules/desktop_capture/screen_capturer_mac.mm b/webrtc/modules/desktop_capture/screen_capturer_mac.mm |
index 316aa3dbe6a04da78bad6a39ea21f7baa22638d8..3de253707cb9b2b557ee9fad45e7636697c92951 100644 |
--- a/webrtc/modules/desktop_capture/screen_capturer_mac.mm |
+++ b/webrtc/modules/desktop_capture/screen_capturer_mac.mm |
@@ -287,10 +287,6 @@ class ScreenCapturerMac : public ScreenCapturer { |
void UnregisterRefreshAndMoveHandlers(); |
void ScreenRefresh(CGRectCount count, const CGRect *rect_array); |
- void ScreenUpdateMove(CGFloat delta_x, |
- CGFloat delta_y, |
- size_t count, |
- const CGRect* rect_array); |
void ScreenRefreshCallback(CGRectCount count, const CGRect* rect_array); |
void ReleaseBuffers(); |
@@ -945,25 +941,8 @@ bool ScreenCapturerMac::RegisterRefreshAndMoveHandlers() { |
size_t count = 0; |
#pragma clang diagnostic push |
#pragma clang diagnostic ignored "-Wunguarded-availability" |
-// TODO(erikchen): Use kCGDisplayStreamUpdateDirtyRects. |
const CGRect* rects = CGDisplayStreamUpdateGetRects( |
- updateRef, kCGDisplayStreamUpdateMovedRects, &count); |
-#pragma clang diagnostic pop |
- if (count != 0) { |
- CGFloat dx = 0; |
- CGFloat dy = 0; |
-#pragma clang diagnostic push |
-#pragma clang diagnostic ignored "-Wunguarded-availability" |
- CGDisplayStreamUpdateGetMovedRectsDelta(updateRef, &dx, &dy); |
-#pragma clang diagnostic pop |
- ScreenUpdateMove(dx, dy, count, rects); |
- } |
- |
- count = 0; |
-#pragma clang diagnostic push |
-#pragma clang diagnostic ignored "-Wunguarded-availability" |
- rects = CGDisplayStreamUpdateGetRects( |
- updateRef, kCGDisplayStreamUpdateRefreshedRects, &count); |
+ updateRef, kCGDisplayStreamUpdateDirtyRects, &count); |
#pragma clang diagnostic pop |
if (count != 0) { |
// According to CGDisplayStream.h, it's safe to call |
@@ -1011,20 +990,6 @@ void ScreenCapturerMac::ScreenRefresh(CGRectCount count, |
helper_.InvalidateRegion(region); |
} |
-void ScreenCapturerMac::ScreenUpdateMove(CGFloat delta_x, |
- CGFloat delta_y, |
- size_t count, |
- const CGRect* rect_array) { |
- // Translate |rect_array| to identify the move's destination. |
- CGRect refresh_rects[count]; |
- for (CGRectCount i = 0; i < count; ++i) { |
- refresh_rects[i] = CGRectOffset(rect_array[i], delta_x, delta_y); |
- } |
- |
- // Currently we just treat move events the same as refreshes. |
- ScreenRefresh(count, refresh_rects); |
-} |
- |
void ScreenCapturerMac::ScreenRefreshCallback(CGRectCount count, |
const CGRect* rect_array) { |
if (screen_pixel_bounds_.is_empty()) |