Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 "content/common/gpu/media/dxva_video_decode_accelerator_win.h" | 5 #include "content/common/gpu/media/dxva_video_decode_accelerator_win.h" |
| 6 | 6 |
| 7 #if !defined(OS_WIN) | 7 #if !defined(OS_WIN) |
| 8 #error This file should only be built on Windows. | 8 #error This file should only be built on Windows. |
| 9 #endif // !defined(OS_WIN) | 9 #endif // !defined(OS_WIN) |
| 10 | 10 |
| (...skipping 2814 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2825 RETURN_ON_HR_FAILURE(E_FAIL, "Failed to detect H.264 stream config", | 2825 RETURN_ON_HR_FAILURE(E_FAIL, "Failed to detect H.264 stream config", |
| 2826 E_FAIL); | 2826 E_FAIL); |
| 2827 } | 2827 } |
| 2828 *config_changed = config_change_detector_->config_changed(); | 2828 *config_changed = config_change_detector_->config_changed(); |
| 2829 return S_OK; | 2829 return S_OK; |
| 2830 } | 2830 } |
| 2831 | 2831 |
| 2832 void DXVAVideoDecodeAccelerator::ConfigChanged( | 2832 void DXVAVideoDecodeAccelerator::ConfigChanged( |
| 2833 const Config& config) { | 2833 const Config& config) { |
| 2834 DCHECK(main_thread_task_runner_->BelongsToCurrentThread()); | 2834 DCHECK(main_thread_task_runner_->BelongsToCurrentThread()); |
| 2835 RETURN_AND_NOTIFY_ON_FAILURE(make_context_current_.Run(), | |
|
sandersd (OOO until July 31)
2016/04/04 23:35:46
Should it be Invalidate() and/or Initialize() that
ananta
2016/04/05 00:00:36
In the general case Invalidate and Initialize get
| |
| 2836 "Failed to make context current", PLATFORM_FAILURE, ); | |
| 2837 | |
| 2835 SetState(kConfigChange); | 2838 SetState(kConfigChange); |
| 2836 DismissStaleBuffers(true); | 2839 DismissStaleBuffers(true); |
|
jbauman
2016/04/05 00:02:18
DismissStaleBuffers is called from other places (e
ananta
2016/04/05 00:22:10
Done.
| |
| 2837 Invalidate(); | 2840 Invalidate(); |
| 2838 Initialize(config_, client_); | 2841 Initialize(config_, client_); |
| 2839 decoder_thread_task_runner_->PostTask( | 2842 decoder_thread_task_runner_->PostTask( |
| 2840 FROM_HERE, | 2843 FROM_HERE, |
| 2841 base::Bind(&DXVAVideoDecodeAccelerator::DecodePendingInputBuffers, | 2844 base::Bind(&DXVAVideoDecodeAccelerator::DecodePendingInputBuffers, |
| 2842 base::Unretained(this))); | 2845 base::Unretained(this))); |
| 2843 } | 2846 } |
| 2844 | 2847 |
| 2845 } // namespace content | 2848 } // namespace content |
| OLD | NEW |