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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/ConvolverNode.cpp

Issue 1979953002: Remove OwnPtr::release() calls in modules/ (part 3). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 bufferBus->setChannelMemory(i, buffer->getChannelData(i)->data(), buffer Length); 125 bufferBus->setChannelMemory(i, buffer->getChannelData(i)->data(), buffer Length);
126 126
127 bufferBus->setSampleRate(buffer->sampleRate()); 127 bufferBus->setSampleRate(buffer->sampleRate());
128 128
129 // Create the reverb with the given impulse response. 129 // Create the reverb with the given impulse response.
130 OwnPtr<Reverb> reverb = adoptPtr(new Reverb(bufferBus.get(), ProcessingSizeI nFrames, MaxFFTSize, 2, context() && context()->hasRealtimeConstraint(), m_norma lize)); 130 OwnPtr<Reverb> reverb = adoptPtr(new Reverb(bufferBus.get(), ProcessingSizeI nFrames, MaxFFTSize, 2, context() && context()->hasRealtimeConstraint(), m_norma lize));
131 131
132 { 132 {
133 // Synchronize with process(). 133 // Synchronize with process().
134 MutexLocker locker(m_processLock); 134 MutexLocker locker(m_processLock);
135 m_reverb = reverb.release(); 135 m_reverb = std::move(reverb);
136 m_buffer = buffer; 136 m_buffer = buffer;
137 } 137 }
138 } 138 }
139 139
140 AudioBuffer* ConvolverHandler::buffer() 140 AudioBuffer* ConvolverHandler::buffer()
141 { 141 {
142 ASSERT(isMainThread()); 142 ASSERT(isMainThread());
143 return m_buffer.get(); 143 return m_buffer.get();
144 } 144 }
145 145
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 return convolverHandler().normalize(); 196 return convolverHandler().normalize();
197 } 197 }
198 198
199 void ConvolverNode::setNormalize(bool normalize) 199 void ConvolverNode::setNormalize(bool normalize)
200 { 200 {
201 convolverHandler().setNormalize(normalize); 201 convolverHandler().setNormalize(normalize);
202 } 202 }
203 203
204 } // namespace blink 204 } // namespace blink
205 205
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698