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 "media/filters/gpu_video_decoder.h" | 5 #include "media/filters/gpu_video_decoder.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
205 ++it) { | 205 ++it) { |
206 factories_->DeleteTexture(it->second.texture_id()); | 206 factories_->DeleteTexture(it->second.texture_id()); |
207 } | 207 } |
208 | 208 |
209 buffers->clear(); | 209 buffers->clear(); |
210 } | 210 } |
211 | 211 |
212 void GpuVideoDecoder::DestroyVDA() { | 212 void GpuVideoDecoder::DestroyVDA() { |
213 DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent(); | 213 DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent(); |
214 | 214 |
215 if (vda_) | 215 vda_.reset(NULL); |
Ami GONE FROM CHROMIUM
2014/05/27 20:06:02
s/NULL// ?
dmichael (off chromium)
2014/05/28 22:31:25
Oh, right, thanks. Done here and elsewhere.
| |
216 vda_.release()->Destroy(); | |
217 | 216 |
218 // Not destroying PictureBuffers in |picture_buffers_at_display_| yet, since | 217 // Not destroying PictureBuffers in |picture_buffers_at_display_| yet, since |
219 // their textures may still be in use by the user of this GpuVideoDecoder. | 218 // their textures may still be in use by the user of this GpuVideoDecoder. |
220 for (PictureBufferTextureMap::iterator it = | 219 for (PictureBufferTextureMap::iterator it = |
221 picture_buffers_at_display_.begin(); | 220 picture_buffers_at_display_.begin(); |
222 it != picture_buffers_at_display_.end(); | 221 it != picture_buffers_at_display_.end(); |
223 ++it) { | 222 ++it) { |
224 assigned_picture_buffers_.erase(it->first); | 223 assigned_picture_buffers_.erase(it->first); |
225 } | 224 } |
226 DestroyPictureBuffers(&assigned_picture_buffers_); | 225 DestroyPictureBuffers(&assigned_picture_buffers_); |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
647 return; | 646 return; |
648 } | 647 } |
649 } | 648 } |
650 | 649 |
651 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() | 650 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() |
652 const { | 651 const { |
653 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); | 652 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); |
654 } | 653 } |
655 | 654 |
656 } // namespace media | 655 } // namespace media |
OLD | NEW |