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

Side by Side Diff: content/browser/media/capture/desktop_capture_device_aura.cc

Issue 806413004: Plumb allow_overlay flag for video path into cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: missed v4l2 Created 5 years, 10 months 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 unified diff | Download patch
OLDNEW
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/desktop_capture_device_aura.h" 5 #include "content/browser/media/capture/desktop_capture_device_aura.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/timer/timer.h" 9 #include "base/timer/timer.h"
10 #include "cc/output/copy_output_request.h" 10 #include "cc/output/copy_output_request.h"
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 scoped_ptr<cc::SingleReleaseCallback> release_callback; 354 scoped_ptr<cc::SingleReleaseCallback> release_callback;
355 result->TakeTexture(&texture_mailbox, &release_callback); 355 result->TakeTexture(&texture_mailbox, &release_callback);
356 DCHECK(texture_mailbox.IsTexture()); 356 DCHECK(texture_mailbox.IsTexture());
357 if (!texture_mailbox.IsTexture()) 357 if (!texture_mailbox.IsTexture())
358 return false; 358 return false;
359 video_frame = media::VideoFrame::WrapNativeTexture( 359 video_frame = media::VideoFrame::WrapNativeTexture(
360 make_scoped_ptr(new gpu::MailboxHolder(texture_mailbox.mailbox(), 360 make_scoped_ptr(new gpu::MailboxHolder(texture_mailbox.mailbox(),
361 texture_mailbox.target(), 361 texture_mailbox.target(),
362 texture_mailbox.sync_point())), 362 texture_mailbox.sync_point())),
363 base::Bind(&RunSingleReleaseCallback, base::Passed(&release_callback)), 363 base::Bind(&RunSingleReleaseCallback, base::Passed(&release_callback)),
364 result->size(), 364 result->size(), gfx::Rect(result->size()), result->size(),
365 gfx::Rect(result->size()), 365 base::TimeDelta(), media::VideoFrame::ReadPixelsCB(), false);
366 result->size(),
367 base::TimeDelta(),
368 media::VideoFrame::ReadPixelsCB());
369 capture_frame_cb.Run(video_frame, start_time, true); 366 capture_frame_cb.Run(video_frame, start_time, true);
370 return true; 367 return true;
371 } 368 }
372 369
373 // Compute the dest size we want after the letterboxing resize. Make the 370 // Compute the dest size we want after the letterboxing resize. Make the
374 // coordinates and sizes even because we letterbox in YUV space 371 // coordinates and sizes even because we letterbox in YUV space
375 // (see CopyRGBToVideoFrame). They need to be even for the UV samples to 372 // (see CopyRGBToVideoFrame). They need to be even for the UV samples to
376 // line up correctly. 373 // line up correctly.
377 // The video frame's coded_size() and the result's size() are both physical 374 // The video frame's coded_size() and the result's size() are both physical
378 // pixels. 375 // pixels.
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 scoped_ptr<Client> client) { 531 scoped_ptr<Client> client) {
535 DVLOG(1) << "Allocating " << params.requested_format.frame_size.ToString(); 532 DVLOG(1) << "Allocating " << params.requested_format.frame_size.ToString();
536 core_->AllocateAndStart(params, client.Pass()); 533 core_->AllocateAndStart(params, client.Pass());
537 } 534 }
538 535
539 void DesktopCaptureDeviceAura::StopAndDeAllocate() { 536 void DesktopCaptureDeviceAura::StopAndDeAllocate() {
540 core_->StopAndDeAllocate(); 537 core_->StopAndDeAllocate();
541 } 538 }
542 539
543 } // namespace content 540 } // namespace content
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_unittest_context.cc ('k') | content/browser/renderer_host/media/video_capture_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698