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

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

Issue 2011783002: Rename OwnPtr::clear() to reset() in platform/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 115
116 // Start up background thread 116 // Start up background thread
117 // FIXME: would be better to up the thread priority here. It doesn't need t o be real-time, but higher than the default... 117 // FIXME: would be better to up the thread priority here. It doesn't need t o be real-time, but higher than the default...
118 if (useBackgroundThreads && m_backgroundStages.size() > 0) 118 if (useBackgroundThreads && m_backgroundStages.size() > 0)
119 m_backgroundThread = adoptPtr(Platform::current()->createThread("Reverb convolution background thread")); 119 m_backgroundThread = adoptPtr(Platform::current()->createThread("Reverb convolution background thread"));
120 } 120 }
121 121
122 ReverbConvolver::~ReverbConvolver() 122 ReverbConvolver::~ReverbConvolver()
123 { 123 {
124 // Wait for background thread to stop 124 // Wait for background thread to stop
125 m_backgroundThread.clear(); 125 m_backgroundThread.reset();
126 } 126 }
127 127
128 void ReverbConvolver::processInBackground() 128 void ReverbConvolver::processInBackground()
129 { 129 {
130 // Process all of the stages until their read indices reach the input buffer 's write index 130 // Process all of the stages until their read indices reach the input buffer 's write index
131 int writeIndex = m_inputBuffer.writeIndex(); 131 int writeIndex = m_inputBuffer.writeIndex();
132 132
133 // Even though it doesn't seem like every stage needs to maintain its own ve rsion of readIndex 133 // Even though it doesn't seem like every stage needs to maintain its own ve rsion of readIndex
134 // we do this in case we want to run in more than one background thread. 134 // we do this in case we want to run in more than one background thread.
135 int readIndex; 135 int readIndex;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 m_accumulationBuffer.reset(); 184 m_accumulationBuffer.reset();
185 m_inputBuffer.reset(); 185 m_inputBuffer.reset();
186 } 186 }
187 187
188 size_t ReverbConvolver::latencyFrames() const 188 size_t ReverbConvolver::latencyFrames() const
189 { 189 {
190 return 0; 190 return 0;
191 } 191 }
192 192
193 } // namespace blink 193 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698