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

Unified Diff: third_party/WebKit/Source/modules/webaudio/OscillatorNode.h

Issue 2767623002: Slightly reduce memory usage in OscillatorNode (Closed)
Patch Set: Rebase Created 3 years, 8 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/modules/webaudio/OscillatorNode.h
diff --git a/third_party/WebKit/Source/modules/webaudio/OscillatorNode.h b/third_party/WebKit/Source/modules/webaudio/OscillatorNode.h
index 459c8ed0575695761cb349fa3730af52654a5987..ba7ee255b9a7a5a12c195c5ecda0af9a30376b00 100644
--- a/third_party/WebKit/Source/modules/webaudio/OscillatorNode.h
+++ b/third_party/WebKit/Source/modules/webaudio/OscillatorNode.h
@@ -51,6 +51,8 @@ class OscillatorHandler final : public AudioScheduledSourceHandler {
static PassRefPtr<OscillatorHandler> Create(AudioNode&,
float sample_rate,
+ const String& oscillator_type,
+ PeriodicWave* wave_table,
AudioParamHandler& frequency,
AudioParamHandler& detune);
~OscillatorHandler() override;
@@ -66,6 +68,8 @@ class OscillatorHandler final : public AudioScheduledSourceHandler {
private:
OscillatorHandler(AudioNode&,
float sample_rate,
+ const String& oscillator_type,
+ PeriodicWave* wave_table,
AudioParamHandler& frequency,
AudioParamHandler& detune);
bool SetType(unsigned); // Returns true on success.
@@ -105,7 +109,10 @@ class OscillatorNode final : public AudioScheduledSourceNode {
DEFINE_WRAPPERTYPEINFO();
public:
- static OscillatorNode* Create(BaseAudioContext&, ExceptionState&);
+ static OscillatorNode* Create(BaseAudioContext&,
+ const String& oscillator_type,
+ PeriodicWave* wave_table,
+ ExceptionState&);
static OscillatorNode* Create(BaseAudioContext*,
const OscillatorOptions&,
ExceptionState&);
@@ -118,7 +125,9 @@ class OscillatorNode final : public AudioScheduledSourceNode {
void setPeriodicWave(PeriodicWave*);
private:
- OscillatorNode(BaseAudioContext&);
+ OscillatorNode(BaseAudioContext&,
+ const String& oscillator_type,
+ PeriodicWave* wave_table);
OscillatorHandler& GetOscillatorHandler() const;
Member<AudioParam> frequency_;

Powered by Google App Engine
This is Rietveld 408576698