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

Side by Side Diff: media/capture/content/screen_capture_device_core.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 unified diff | Download patch
« no previous file with comments | « media/base/video_frame.cc ('k') | media/capture/content/thread_safe_capture_oracle.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "media/capture/content/screen_capture_device_core.h" 5 #include "media/capture/content/screen_capture_device_core.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 24 matching lines...) Expand all
35 void ScreenCaptureDeviceCore::AllocateAndStart( 35 void ScreenCaptureDeviceCore::AllocateAndStart(
36 const VideoCaptureParams& params, 36 const VideoCaptureParams& params,
37 scoped_ptr<VideoCaptureDevice::Client> client) { 37 scoped_ptr<VideoCaptureDevice::Client> client) {
38 DCHECK(thread_checker_.CalledOnValidThread()); 38 DCHECK(thread_checker_.CalledOnValidThread());
39 39
40 if (state_ != kIdle) { 40 if (state_ != kIdle) {
41 DVLOG(1) << "Allocate() invoked when not in state Idle."; 41 DVLOG(1) << "Allocate() invoked when not in state Idle.";
42 return; 42 return;
43 } 43 }
44 44
45 if (!(params.requested_format.pixel_format == PIXEL_FORMAT_I420 && 45 if (params.requested_format.pixel_format != PIXEL_FORMAT_I420 ||
46 params.requested_format.pixel_storage == PIXEL_STORAGE_CPU) && 46 params.requested_format.pixel_storage != PIXEL_STORAGE_CPU) {
47 !(params.requested_format.pixel_format == PIXEL_FORMAT_ARGB &&
48 params.requested_format.pixel_storage == PIXEL_STORAGE_TEXTURE)) {
49 client->OnError( 47 client->OnError(
50 FROM_HERE, 48 FROM_HERE,
51 base::StringPrintf( 49 base::StringPrintf(
52 "unsupported format: %s", 50 "unsupported format: %s",
53 VideoCaptureFormat::ToString(params.requested_format).c_str())); 51 VideoCaptureFormat::ToString(params.requested_format).c_str()));
54 return; 52 return;
55 } 53 }
56 54
57 oracle_proxy_ = new ThreadSafeCaptureOracle( 55 oracle_proxy_ = new ThreadSafeCaptureOracle(
58 client.Pass(), params, capture_machine_->IsAutoThrottlingEnabled()); 56 client.Pass(), params, capture_machine_->IsAutoThrottlingEnabled());
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 return; 120 return;
123 121
124 if (oracle_proxy_.get()) 122 if (oracle_proxy_.get())
125 oracle_proxy_->ReportError(from_here, reason); 123 oracle_proxy_->ReportError(from_here, reason);
126 124
127 StopAndDeAllocate(); 125 StopAndDeAllocate();
128 TransitionStateTo(kError); 126 TransitionStateTo(kError);
129 } 127 }
130 128
131 } // namespace media 129 } // namespace media
OLDNEW
« no previous file with comments | « media/base/video_frame.cc ('k') | media/capture/content/thread_safe_capture_oracle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698