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

Unified Diff: webrtc/common_video/i420_buffer_pool.cc

Issue 2341113005: I420BufferPool: Replace SequencedTaskChecker with RaceChecker (Closed)
Patch Set: Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/common_video/include/i420_buffer_pool.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/common_video/i420_buffer_pool.cc
diff --git a/webrtc/common_video/i420_buffer_pool.cc b/webrtc/common_video/i420_buffer_pool.cc
index 7110639e03110fd61abbdb543b2a8150f2bb2a66..76a53c568827c6f323d3e460bf97f35c18c28e27 100644
--- a/webrtc/common_video/i420_buffer_pool.cc
+++ b/webrtc/common_video/i420_buffer_pool.cc
@@ -15,18 +15,15 @@
namespace webrtc {
I420BufferPool::I420BufferPool(bool zero_initialize)
- : zero_initialize_(zero_initialize) {
- sequenced_checker_.Detach();
-}
+ : zero_initialize_(zero_initialize) {}
void I420BufferPool::Release() {
- sequenced_checker_.Detach();
buffers_.clear();
}
rtc::scoped_refptr<I420Buffer> I420BufferPool::CreateBuffer(int width,
int height) {
- RTC_DCHECK(sequenced_checker_.CalledSequentially());
+ RTC_DCHECK_RUNS_SERIALIZED(&race_checker_);
// Release buffers with wrong resolution.
for (auto it = buffers_.begin(); it != buffers_.end();) {
if ((*it)->width() != width || (*it)->height() != height)
« no previous file with comments | « no previous file | webrtc/common_video/include/i420_buffer_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698