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

Side by Side Diff: content/common/gpu/media/h264_dpb.cc

Issue 10797017: base: Make ScopedVector::clear() destroy elements. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update location_bar_view_mac.mm Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « content/browser/speech/chunked_byte_buffer.cc ('k') | net/dns/dns_transaction.cc » ('j') | 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 <algorithm> 5 #include <algorithm>
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "content/common/gpu/media/h264_dpb.h" 9 #include "content/common/gpu/media/h264_dpb.h"
10 10
11 namespace content { 11 namespace content {
12 12
13 H264DPB::H264DPB() {} 13 H264DPB::H264DPB() {}
14 H264DPB::~H264DPB() {} 14 H264DPB::~H264DPB() {}
15 15
16 void H264DPB::Clear() { 16 void H264DPB::Clear() {
17 pics_.reset(); 17 pics_.clear();
18 } 18 }
19 19
20 void H264DPB::RemoveByPOC(int poc) { 20 void H264DPB::RemoveByPOC(int poc) {
21 for (Pictures::iterator it = pics_.begin(); it != pics_.end(); ++it) { 21 for (Pictures::iterator it = pics_.begin(); it != pics_.end(); ++it) {
22 if ((*it)->pic_order_cnt == poc) { 22 if ((*it)->pic_order_cnt == poc) {
23 pics_.erase(it); 23 pics_.erase(it);
24 return; 24 return;
25 } 25 }
26 } 26 }
27 NOTREACHED() << "Missing POC: " << poc; 27 NOTREACHED() << "Missing POC: " << poc;
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 108
109 void H264DPB::GetLongTermRefPicsAppending(H264Picture::PtrVector& out) { 109 void H264DPB::GetLongTermRefPicsAppending(H264Picture::PtrVector& out) {
110 for (size_t i = 0; i < pics_.size(); ++i) { 110 for (size_t i = 0; i < pics_.size(); ++i) {
111 H264Picture* pic = pics_[i]; 111 H264Picture* pic = pics_[i];
112 if (pic->ref && pic->long_term) 112 if (pic->ref && pic->long_term)
113 out.push_back(pic); 113 out.push_back(pic);
114 } 114 }
115 } 115 }
116 116
117 } // namespace content 117 } // namespace content
118
OLDNEW
« no previous file with comments | « content/browser/speech/chunked_byte_buffer.cc ('k') | net/dns/dns_transaction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698