Index: remoting/capturer/video_frame_capturer_linux.cc |
diff --git a/remoting/capturer/video_frame_capturer_linux.cc b/remoting/capturer/video_frame_capturer_linux.cc |
index 8ca9e211464b5886085700abdbff7db7d02d4271..b662c38b6ae9489e45a1f490c1ca720445f5614f 100644 |
--- a/remoting/capturer/video_frame_capturer_linux.cc |
+++ b/remoting/capturer/video_frame_capturer_linux.cc |
@@ -87,7 +87,7 @@ class VideoFrameCapturerLinux : public VideoFrameCapturer { |
// In the non-DAMAGE case, this captures the whole screen, then calculates |
// some invalid rectangles that include any differences between this and the |
// previous capture. |
- CaptureData* CaptureScreen(); |
+ scoped_refptr<CaptureData> CaptureScreen(); |
// Called when the screen configuration is changed. |root_window_size| |
// specifies size the most recent size of the root window. |
@@ -395,14 +395,14 @@ void VideoFrameCapturerLinux::CaptureCursor() { |
delegate_->OnCursorShapeChanged(cursor.Pass()); |
} |
-CaptureData* VideoFrameCapturerLinux::CaptureScreen() { |
+scoped_refptr<CaptureData> VideoFrameCapturerLinux::CaptureScreen() { |
VideoFrame* current = queue_.current_frame(); |
DataPlanes planes; |
planes.data[0] = current->pixels(); |
planes.strides[0] = current->bytes_per_row(); |
- CaptureData* capture_data = new CaptureData(planes, current->dimensions(), |
- media::VideoFrame::RGB32); |
+ scoped_refptr<CaptureData> capture_data( |
+ new CaptureData(planes, current->dimensions(), media::VideoFrame::RGB32)); |
// Pass the screen size to the helper, so it can clip the invalid region if it |
// expands that region to a grid. |