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

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

Issue 2012773005: Simplify notification of a dirty listener. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webaudio/AudioListener.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/webaudio/AudioListener.h
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioListener.h b/third_party/WebKit/Source/modules/webaudio/AudioListener.h
index d41a614effea6d942aad989d83c2c411083d9495..457090e49fba4ab81d4d7727f33b6761916b0d7c 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioListener.h
+++ b/third_party/WebKit/Source/modules/webaudio/AudioListener.h
@@ -73,6 +73,8 @@ public:
// PannerNodes if necessary.
void updateState();
+ bool isListenerDirty() const { return m_isListenerDirty; }
+
const FloatPoint3D position() const
{
return FloatPoint3D(
@@ -175,6 +177,11 @@ private:
// Last time that the automations were updated.
double m_lastUpdateTime;
+ // Set every rendering quantum if the listener has moved in any way
+ // (position, forward, or up). This should only be read or written to from
+ // the audio thread.
+ bool m_isListenerDirty;
+
void updateValuesIfNeeded(size_t framesToProcess);
AudioFloatArray m_positionXValues;
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webaudio/AudioListener.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698