| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "content/browser/media/capture/aura_window_capture_machine.h" | 5 #include "content/browser/media/capture/aura_window_capture_machine.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 result_rect.size(), | 273 result_rect.size(), |
| 274 result_rect, | 274 result_rect, |
| 275 region_in_frame.size(), | 275 region_in_frame.size(), |
| 276 true, | 276 true, |
| 277 true)); | 277 true)); |
| 278 } | 278 } |
| 279 | 279 |
| 280 cursor_renderer_->SnapshotCursorState(region_in_frame); | 280 cursor_renderer_->SnapshotCursorState(region_in_frame); |
| 281 yuv_readback_pipeline_->ReadbackYUV( | 281 yuv_readback_pipeline_->ReadbackYUV( |
| 282 texture_mailbox.mailbox(), texture_mailbox.sync_token(), | 282 texture_mailbox.mailbox(), texture_mailbox.sync_token(), |
| 283 video_frame.get(), region_in_frame.origin(), | 283 video_frame->visible_rect(), |
| 284 video_frame->stride(media::VideoFrame::kYPlane), |
| 285 video_frame->data(media::VideoFrame::kYPlane), |
| 286 video_frame->stride(media::VideoFrame::kUPlane), |
| 287 video_frame->data(media::VideoFrame::kUPlane), |
| 288 video_frame->stride(media::VideoFrame::kVPlane), |
| 289 video_frame->data(media::VideoFrame::kVPlane), region_in_frame.origin(), |
| 284 base::Bind(&CopyOutputFinishedForVideo, weak_factory_.GetWeakPtr(), | 290 base::Bind(&CopyOutputFinishedForVideo, weak_factory_.GetWeakPtr(), |
| 285 start_time, capture_frame_cb, video_frame, | 291 start_time, capture_frame_cb, video_frame, |
| 286 base::Passed(&release_callback))); | 292 base::Passed(&release_callback))); |
| 293 media::LetterboxYUV(video_frame.get(), region_in_frame); |
| 287 return true; | 294 return true; |
| 288 } | 295 } |
| 289 | 296 |
| 290 using CaptureFrameCallback = | 297 using CaptureFrameCallback = |
| 291 media::ThreadSafeCaptureOracle::CaptureFrameCallback; | 298 media::ThreadSafeCaptureOracle::CaptureFrameCallback; |
| 292 | 299 |
| 293 void AuraWindowCaptureMachine::CopyOutputFinishedForVideo( | 300 void AuraWindowCaptureMachine::CopyOutputFinishedForVideo( |
| 294 base::WeakPtr<AuraWindowCaptureMachine> machine, | 301 base::WeakPtr<AuraWindowCaptureMachine> machine, |
| 295 base::TimeTicks start_time, | 302 base::TimeTicks start_time, |
| 296 const CaptureFrameCallback& capture_frame_cb, | 303 const CaptureFrameCallback& capture_frame_cb, |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 // TODO(miu): The CopyOutputRequest should be made earlier, at WillCommit(). | 363 // TODO(miu): The CopyOutputRequest should be made earlier, at WillCommit(). |
| 357 // http://crbug.com/492839 | 364 // http://crbug.com/492839 |
| 358 BrowserThread::PostTask( | 365 BrowserThread::PostTask( |
| 359 BrowserThread::UI, | 366 BrowserThread::UI, |
| 360 FROM_HERE, | 367 FROM_HERE, |
| 361 base::Bind(&AuraWindowCaptureMachine::Capture, weak_factory_.GetWeakPtr(), | 368 base::Bind(&AuraWindowCaptureMachine::Capture, weak_factory_.GetWeakPtr(), |
| 362 true)); | 369 true)); |
| 363 } | 370 } |
| 364 | 371 |
| 365 } // namespace content | 372 } // namespace content |
| OLD | NEW |