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/renderer_host/media/desktop_capture_device_aura.h" | 5 #include "content/browser/renderer_host/media/desktop_capture_device_aura.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/timer/timer.h" | 8 #include "base/timer/timer.h" |
9 #include "cc/output/copy_output_request.h" | 9 #include "cc/output/copy_output_request.h" |
10 #include "cc/output/copy_output_result.h" | 10 #include "cc/output/copy_output_result.h" |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 yuv_readback_pipeline_.reset( | 253 yuv_readback_pipeline_.reset( |
254 gl_helper->CreateReadbackPipelineYUV(GLHelper::SCALER_QUALITY_FAST, | 254 gl_helper->CreateReadbackPipelineYUV(GLHelper::SCALER_QUALITY_FAST, |
255 result_rect.size(), | 255 result_rect.size(), |
256 result_rect, | 256 result_rect, |
257 video_frame->coded_size(), | 257 video_frame->coded_size(), |
258 region_in_frame, | 258 region_in_frame, |
259 true, | 259 true, |
260 true)); | 260 true)); |
261 } | 261 } |
262 yuv_readback_pipeline_->ReadbackYUV( | 262 yuv_readback_pipeline_->ReadbackYUV( |
263 texture_mailbox.name(), texture_mailbox.sync_point(), video_frame.get(), | 263 texture_mailbox.mailbox(), |
264 base::Bind(&CopyOutputFinishedForVideo, start_time, capture_frame_cb, | 264 texture_mailbox.sync_point(), |
| 265 video_frame.get(), |
| 266 base::Bind(&CopyOutputFinishedForVideo, |
| 267 start_time, |
| 268 capture_frame_cb, |
265 base::Passed(&release_callback))); | 269 base::Passed(&release_callback))); |
266 } | 270 } |
267 | 271 |
268 void DesktopVideoCaptureMachine::OnWindowBoundsChanged( | 272 void DesktopVideoCaptureMachine::OnWindowBoundsChanged( |
269 aura::Window* window, | 273 aura::Window* window, |
270 const gfx::Rect& old_bounds, | 274 const gfx::Rect& old_bounds, |
271 const gfx::Rect& new_bounds) { | 275 const gfx::Rect& new_bounds) { |
272 DCHECK(desktop_window_ && window == desktop_window_); | 276 DCHECK(desktop_window_ && window == desktop_window_); |
273 | 277 |
274 // Post task to update capture size on UI thread. | 278 // Post task to update capture size on UI thread. |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 scoped_ptr<Client> client) { | 322 scoped_ptr<Client> client) { |
319 DVLOG(1) << "Allocating " << params.requested_format.frame_size.ToString(); | 323 DVLOG(1) << "Allocating " << params.requested_format.frame_size.ToString(); |
320 impl_->AllocateAndStart(params, client.Pass()); | 324 impl_->AllocateAndStart(params, client.Pass()); |
321 } | 325 } |
322 | 326 |
323 void DesktopCaptureDeviceAura::StopAndDeAllocate() { | 327 void DesktopCaptureDeviceAura::StopAndDeAllocate() { |
324 impl_->StopAndDeAllocate(); | 328 impl_->StopAndDeAllocate(); |
325 } | 329 } |
326 | 330 |
327 } // namespace content | 331 } // namespace content |
OLD | NEW |