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

Side by Side Diff: third_party/WebKit/Source/platform/audio/ReverbConvolver.cpp

Issue 1925583003: Replace AllowCrossThreadAccess() + non-GCed pointers with crossThreadUnretained() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Kuroneko_4
Patch Set: Rebase. Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 165
166 // Accumulate contributions from each stage 166 // Accumulate contributions from each stage
167 for (size_t i = 0; i < m_stages.size(); ++i) 167 for (size_t i = 0; i < m_stages.size(); ++i)
168 m_stages[i]->process(source, framesToProcess); 168 m_stages[i]->process(source, framesToProcess);
169 169
170 // Finally read from accumulation buffer 170 // Finally read from accumulation buffer
171 m_accumulationBuffer.readAndClear(destination, framesToProcess); 171 m_accumulationBuffer.readAndClear(destination, framesToProcess);
172 172
173 // Now that we've buffered more input, post another task to the background t hread. 173 // Now that we've buffered more input, post another task to the background t hread.
174 if (m_backgroundThread) 174 if (m_backgroundThread)
175 m_backgroundThread->getWebTaskRunner()->postTask(BLINK_FROM_HERE, thread SafeBind(&ReverbConvolver::processInBackground, AllowCrossThreadAccess(this))); 175 m_backgroundThread->getWebTaskRunner()->postTask(BLINK_FROM_HERE, thread SafeBind(&ReverbConvolver::processInBackground, crossThreadUnretained(this)));
176 } 176 }
177 177
178 void ReverbConvolver::reset() 178 void ReverbConvolver::reset()
179 { 179 {
180 for (size_t i = 0; i < m_stages.size(); ++i) 180 for (size_t i = 0; i < m_stages.size(); ++i)
181 m_stages[i]->reset(); 181 m_stages[i]->reset();
182 182
183 for (size_t i = 0; i < m_backgroundStages.size(); ++i) 183 for (size_t i = 0; i < m_backgroundStages.size(); ++i)
184 m_backgroundStages[i]->reset(); 184 m_backgroundStages[i]->reset();
185 185
186 m_accumulationBuffer.reset(); 186 m_accumulationBuffer.reset();
187 m_inputBuffer.reset(); 187 m_inputBuffer.reset();
188 } 188 }
189 189
190 size_t ReverbConvolver::latencyFrames() const 190 size_t ReverbConvolver::latencyFrames() const
191 { 191 {
192 return 0; 192 return 0;
193 } 193 }
194 194
195 } // namespace blink 195 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698