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

Unified Diff: content/browser/media/capture/aura_window_capture_machine.cc

Issue 1439533004: Remove dead code paths around PIXEL_STORAGE_TEXTURE in capture pipeline. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mcasas's second round comments REBASE Created 5 years, 1 month 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 | content/browser/media/capture/desktop_capture_device_aura_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/media/capture/aura_window_capture_machine.cc
diff --git a/content/browser/media/capture/aura_window_capture_machine.cc b/content/browser/media/capture/aura_window_capture_machine.cc
index d6578c92a901f2431256fea8b20dd1fae58c280d..6cb3e7740b0517f14d16eeb7b682c89cc0590e63 100644
--- a/content/browser/media/capture/aura_window_capture_machine.cc
+++ b/content/browser/media/capture/aura_window_capture_machine.cc
@@ -36,15 +36,6 @@
namespace content {
-namespace {
-
-void RunSingleReleaseCallback(scoped_ptr<cc::SingleReleaseCallback> cb,
- const gpu::SyncToken& sync_token) {
- cb->Run(sync_token, false);
-}
-
-} // namespace
-
AuraWindowCaptureMachine::AuraWindowCaptureMachine()
: desktop_window_(NULL),
timer_(true, true),
@@ -246,31 +237,7 @@ bool AuraWindowCaptureMachine::ProcessCopyOutputResponse(
if (result->IsEmpty() || result->size().IsEmpty() || !desktop_window_)
return false;
-
- if (capture_params_.requested_format.pixel_storage ==
- media::PIXEL_STORAGE_TEXTURE) {
- DCHECK_EQ(media::PIXEL_FORMAT_ARGB,
- capture_params_.requested_format.pixel_format);
- DCHECK(!video_frame.get());
- cc::TextureMailbox texture_mailbox;
- scoped_ptr<cc::SingleReleaseCallback> release_callback;
- result->TakeTexture(&texture_mailbox, &release_callback);
- DCHECK(texture_mailbox.IsTexture());
- if (!texture_mailbox.IsTexture())
- return false;
- video_frame = media::VideoFrame::WrapNativeTexture(
- media::PIXEL_FORMAT_ARGB,
- gpu::MailboxHolder(texture_mailbox.mailbox(),
- texture_mailbox.sync_token(),
- texture_mailbox.target()),
- base::Bind(&RunSingleReleaseCallback, base::Passed(&release_callback)),
- result->size(), gfx::Rect(result->size()), result->size(),
- base::TimeDelta());
- capture_frame_cb.Run(video_frame, start_time, true);
- return true;
- } else {
- DCHECK(video_frame.get());
- }
+ DCHECK(video_frame.get());
// Compute the dest size we want after the letterboxing resize. Make the
// coordinates and sizes even because we letterbox in YUV space
« no previous file with comments | « no previous file | content/browser/media/capture/desktop_capture_device_aura_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698