| 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,
|
|
|