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

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

Issue 1911133002: Remove connection from AudioParamHandler to AudioContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/AudioParam.h
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioParam.h b/third_party/WebKit/Source/modules/webaudio/AudioParam.h
index 496fd96706e220714fe210002599f282add54468..bd320153e69dfe804ce6ca835a4f341ff5af27ae 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioParam.h
+++ b/third_party/WebKit/Source/modules/webaudio/AudioParam.h
@@ -61,7 +61,7 @@ public:
}
// This should be used only in audio rendering thread.
- AbstractAudioContext* context() const;
+ AudioDestinationHandler* context() const;
tkent 2016/04/25 23:10:09 Maybe we'd like to rename the function.
Raymond Toy 2016/04/26 16:37:41 Renamed to audioDestination().
// AudioSummingJunction
void didUpdate() override { }
@@ -107,7 +107,8 @@ private:
, m_intrinsicValue(defaultValue)
, m_defaultValue(defaultValue)
, m_smoothedValue(defaultValue)
- , m_context(&context) { }
+ , m_destination(context.destination()->audioDestinationHandler())
+ { }
// sampleAccurate corresponds to a-rate (audio rate) vs. k-rate in the Web Audio specification.
void calculateFinalValues(float* values, unsigned numberOfValues, bool sampleAccurate);
@@ -124,9 +125,8 @@ private:
AudioParamTimeline m_timeline;
- // We can't make this Persistent because of a reference cycle. It's safe to
- // access this field only when we're rendering audio.
- UntracedMember<AbstractAudioContext> m_context;
+ // The destination node used to get necessary information like the smaple rate and context time.
+ AudioDestinationHandler& m_destination;
tkent 2016/04/25 23:10:09 Is it safe to hold a raw reference of AudioDestina
Raymond Toy 2016/04/26 16:37:41 Done.
};
// AudioParam class represents web-exposed AudioParam interface.

Powered by Google App Engine
This is Rietveld 408576698