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

Side by Side Diff: media/gpu/dxva_video_decode_accelerator_win.cc

Issue 2935023003: Store information about stale output picture buffers on stack. (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/gpu/dxva_video_decode_accelerator_win.h" 5 #include "media/gpu/dxva_video_decode_accelerator_win.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #if !defined(OS_WIN) 9 #if !defined(OS_WIN)
10 #error This file should only be built on Windows. 10 #error This file should only be built on Windows.
(...skipping 2059 matching lines...) Expand 10 before | Expand all | Expand 10 after
2070 uint64_t last_process_output_time = g_last_process_output_time; 2070 uint64_t last_process_output_time = g_last_process_output_time;
2071 HRESULT last_device_removed_reason = g_last_device_removed_reason; 2071 HRESULT last_device_removed_reason = g_last_device_removed_reason;
2072 LARGE_INTEGER perf_frequency; 2072 LARGE_INTEGER perf_frequency;
2073 ::QueryPerformanceFrequency(&perf_frequency); 2073 ::QueryPerformanceFrequency(&perf_frequency);
2074 uint32_t output_array_size = output_array_size_; 2074 uint32_t output_array_size = output_array_size_;
2075 size_t sample_count; 2075 size_t sample_count;
2076 { 2076 {
2077 base::AutoLock lock(decoder_lock_); 2077 base::AutoLock lock(decoder_lock_);
2078 sample_count = pending_output_samples_.size(); 2078 sample_count = pending_output_samples_.size();
2079 } 2079 }
2080 size_t stale_output_picture_buffers_size =
2081 stale_output_picture_buffers_.size();
2082 PictureBufferMechanism mechanism = GetPictureBufferMechanism();
2080 2083
2081 base::debug::Alias(&last_exception_code); 2084 base::debug::Alias(&last_exception_code);
2082 base::debug::Alias(&last_unhandled_error); 2085 base::debug::Alias(&last_unhandled_error);
2083 base::debug::Alias(&last_exception_time); 2086 base::debug::Alias(&last_exception_time);
2084 base::debug::Alias(&last_process_output_time); 2087 base::debug::Alias(&last_process_output_time);
2085 base::debug::Alias(&last_device_removed_reason); 2088 base::debug::Alias(&last_device_removed_reason);
2086 base::debug::Alias(&perf_frequency.QuadPart); 2089 base::debug::Alias(&perf_frequency.QuadPart);
2087 base::debug::Alias(&output_array_size); 2090 base::debug::Alias(&output_array_size);
2088 base::debug::Alias(&sample_count); 2091 base::debug::Alias(&sample_count);
2092 base::debug::Alias(&stale_output_picture_buffers_size);
2093 base::debug::Alias(&mechanism);
2089 decoder_thread_.Stop(); 2094 decoder_thread_.Stop();
2090 } 2095 }
2091 2096
2092 void DXVAVideoDecodeAccelerator::NotifyInputBufferRead(int input_buffer_id) { 2097 void DXVAVideoDecodeAccelerator::NotifyInputBufferRead(int input_buffer_id) {
2093 DCHECK(main_thread_task_runner_->BelongsToCurrentThread()); 2098 DCHECK(main_thread_task_runner_->BelongsToCurrentThread());
2094 if (client_) 2099 if (client_)
2095 client_->NotifyEndOfBitstreamBuffer(input_buffer_id); 2100 client_->NotifyEndOfBitstreamBuffer(input_buffer_id);
2096 } 2101 }
2097 2102
2098 void DXVAVideoDecodeAccelerator::NotifyFlushDone() { 2103 void DXVAVideoDecodeAccelerator::NotifyFlushDone() {
(...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after
3073 return false; 3078 return false;
3074 } 3079 }
3075 NOTREACHED(); 3080 NOTREACHED();
3076 return false; 3081 return false;
3077 } 3082 }
3078 ID3D11Device* DXVAVideoDecodeAccelerator::D3D11Device() const { 3083 ID3D11Device* DXVAVideoDecodeAccelerator::D3D11Device() const {
3079 return ShouldUseANGLEDevice() ? angle_device_.Get() : d3d11_device_.Get(); 3084 return ShouldUseANGLEDevice() ? angle_device_.Get() : d3d11_device_.Get();
3080 } 3085 }
3081 3086
3082 } // namespace media 3087 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698