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

Unified Diff: remoting/capturer/video_frame_capturer_linux.cc

Issue 11638006: Return scoped_refptr<CaptureData> from VideoFrameCapturerLinux::CaptureScreen() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698