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

Unified Diff: media/capture/content/thread_safe_capture_oracle.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: 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
Index: media/capture/content/thread_safe_capture_oracle.cc
diff --git a/media/capture/content/thread_safe_capture_oracle.cc b/media/capture/content/thread_safe_capture_oracle.cc
index bda73de6d5e115a6725a89ee82b159d53d2db486..cfe7f54ee163f8b9b6b95b5ac65598cb98836a84 100644
--- a/media/capture/content/thread_safe_capture_oracle.cc
+++ b/media/capture/content/thread_safe_capture_oracle.cc
@@ -70,10 +70,7 @@ bool ThreadSafeCaptureOracle::ObserveEventAndDecideCapture(
scoped_ptr<media::VideoCaptureDevice::Client::Buffer> output_buffer(
client_->ReserveOutputBuffer(coded_size,
- (params_.requested_format.pixel_storage !=
- media::PIXEL_STORAGE_TEXTURE)
- ? media::PIXEL_FORMAT_I420
- : media::PIXEL_FORMAT_ARGB,
+ params_.requested_format.pixel_format,
params_.requested_format.pixel_storage));
// Get the current buffer pool utilization and attenuate it: The utilization
// reported to the oracle is in terms of a maximum sustainable amount (not the
@@ -113,15 +110,12 @@ bool ThreadSafeCaptureOracle::ObserveEventAndDecideCapture(
const int frame_number = oracle_.RecordCapture(attenuated_utilization);
TRACE_EVENT_ASYNC_BEGIN2("gpu.capture", "Capture", output_buffer.get(),
"frame_number", frame_number, "trigger", event_name);
- // Texture frames wrap a texture mailbox, which we don't have at the moment.
- // We do not construct those frames.
- if (params_.requested_format.pixel_storage != media::PIXEL_STORAGE_TEXTURE) {
- *storage = VideoFrame::WrapExternalData(
- media::PIXEL_FORMAT_I420, coded_size, gfx::Rect(visible_size),
- visible_size, static_cast<uint8*>(output_buffer->data()),
- output_buffer->mapped_size(), base::TimeDelta());
- DCHECK(*storage);
- }
+ *storage = VideoFrame::WrapExternalData(
+ params_.requested_format.pixel_format, coded_size,
+ gfx::Rect(visible_size), visible_size,
+ static_cast<uint8*>(output_buffer->data()), output_buffer->mapped_size(),
+ base::TimeDelta());
+ DCHECK(*storage);
*callback =
base::Bind(&ThreadSafeCaptureOracle::DidCaptureFrame, this, frame_number,
base::Passed(&output_buffer), capture_begin_time,
« media/base/video_frame.cc ('K') | « media/capture/content/screen_capture_device_core.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698