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

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

Issue 1981823002: Remove OwnPtr::release() calls in platform/ (part 1). (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 * 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 // This "staggers" the time when each FFT happens so they don't all happ en at the same time 86 // This "staggers" the time when each FFT happens so they don't all happ en at the same time
87 int renderPhase = convolverRenderPhase + i * renderSliceSize; 87 int renderPhase = convolverRenderPhase + i * renderSliceSize;
88 88
89 bool useDirectConvolver = !stageOffset; 89 bool useDirectConvolver = !stageOffset;
90 90
91 OwnPtr<ReverbConvolverStage> stage = adoptPtr(new ReverbConvolverStage(r esponse, totalResponseLength, reverbTotalLatency, stageOffset, stageSize, fftSiz e, renderPhase, renderSliceSize, &m_accumulationBuffer, useDirectConvolver)); 91 OwnPtr<ReverbConvolverStage> stage = adoptPtr(new ReverbConvolverStage(r esponse, totalResponseLength, reverbTotalLatency, stageOffset, stageSize, fftSiz e, renderPhase, renderSliceSize, &m_accumulationBuffer, useDirectConvolver));
92 92
93 bool isBackgroundStage = false; 93 bool isBackgroundStage = false;
94 94
95 if (useBackgroundThreads && stageOffset > RealtimeFrameLimit) { 95 if (useBackgroundThreads && stageOffset > RealtimeFrameLimit) {
96 m_backgroundStages.append(stage.release()); 96 m_backgroundStages.append(std::move(stage));
97 isBackgroundStage = true; 97 isBackgroundStage = true;
98 } else 98 } else {
99 m_stages.append(stage.release()); 99 m_stages.append(std::move(stage));
100 }
100 101
101 stageOffset += stageSize; 102 stageOffset += stageSize;
102 ++i; 103 ++i;
103 104
104 if (!useDirectConvolver) { 105 if (!useDirectConvolver) {
105 // Figure out next FFT size 106 // Figure out next FFT size
106 fftSize *= 2; 107 fftSize *= 2;
107 } 108 }
108 109
109 if (useBackgroundThreads && !isBackgroundStage && fftSize > m_maxRealtim eFFTSize) 110 if (useBackgroundThreads && !isBackgroundStage && fftSize > m_maxRealtim eFFTSize)
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 m_accumulationBuffer.reset(); 184 m_accumulationBuffer.reset();
184 m_inputBuffer.reset(); 185 m_inputBuffer.reset();
185 } 186 }
186 187
187 size_t ReverbConvolver::latencyFrames() const 188 size_t ReverbConvolver::latencyFrames() const
188 { 189 {
189 return 0; 190 return 0;
190 } 191 }
191 192
192 } // namespace blink 193 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698