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

Unified Diff: third_party/WebKit/Source/platform/audio/AudioBus.cpp

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/audio/AudioBus.cpp
diff --git a/third_party/WebKit/Source/platform/audio/AudioBus.cpp b/third_party/WebKit/Source/platform/audio/AudioBus.cpp
index 2c8d4f42bddcaf86b2a1d78f8d9048f363e7cce1..91483ad6bd9ae7b2b8ca0502df483fdf0be62d5f 100644
--- a/third_party/WebKit/Source/platform/audio/AudioBus.cpp
+++ b/third_party/WebKit/Source/platform/audio/AudioBus.cpp
@@ -33,10 +33,11 @@
#include "platform/audio/VectorMath.h"
#include "public/platform/Platform.h"
#include "public/platform/WebAudioBus.h"
-#include "wtf/OwnPtr.h"
+#include "wtf/PtrUtil.h"
+#include <algorithm>
#include <assert.h>
#include <math.h>
-#include <algorithm>
+#include <memory>
namespace blink {
@@ -62,7 +63,7 @@ AudioBus::AudioBus(unsigned numberOfChannels, size_t length, bool allocate)
m_channels.reserveInitialCapacity(numberOfChannels);
for (unsigned i = 0; i < numberOfChannels; ++i) {
- PassOwnPtr<AudioChannel> channel = allocate ? adoptPtr(new AudioChannel(length)) : adoptPtr(new AudioChannel(0, length));
+ std::unique_ptr<AudioChannel> channel = allocate ? wrapUnique(new AudioChannel(length)) : wrapUnique(new AudioChannel(0, length));
m_channels.append(std::move(channel));
}
@@ -489,7 +490,7 @@ void AudioBus::copyWithGainFrom(const AudioBus &sourceBus, float* lastMixGain, f
if (framesToDezipper) {
if (!m_dezipperGainValues.get() || m_dezipperGainValues->size() < framesToDezipper)
- m_dezipperGainValues = adoptPtr(new AudioFloatArray(framesToDezipper));
+ m_dezipperGainValues = wrapUnique(new AudioFloatArray(framesToDezipper));
float* gainValues = m_dezipperGainValues->data();
for (unsigned i = 0; i < framesToDezipper; ++i) {
« no previous file with comments | « third_party/WebKit/Source/platform/audio/AudioBus.h ('k') | third_party/WebKit/Source/platform/audio/AudioChannel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698