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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/PannerNode.h

Issue 2702243003: Disallow cross-thread Persistent<> read access. (Closed)
Patch Set: rebased upto r451733 Created 3 years, 10 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 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 const FloatPoint3D& listenerPosition); 151 const FloatPoint3D& listenerPosition);
152 152
153 void azimuthElevation(double* outAzimuth, double* outElevation); 153 void azimuthElevation(double* outAzimuth, double* outElevation);
154 float distanceConeGain(); 154 float distanceConeGain();
155 155
156 bool isAzimuthElevationDirty() const { return m_isAzimuthElevationDirty; } 156 bool isAzimuthElevationDirty() const { return m_isAzimuthElevationDirty; }
157 bool isDistanceConeGainDirty() const { return m_isDistanceConeGainDirty; } 157 bool isDistanceConeGainDirty() const { return m_isDistanceConeGainDirty; }
158 void updateDirtyState(); 158 void updateDirtyState();
159 159
160 // This Persistent doesn't make a reference cycle including the owner 160 // This Persistent doesn't make a reference cycle including the owner
161 // PannerNode. 161 // PannerNode. It is accessed by both audio and main thread.
162 Persistent<AudioListener> m_listener; 162 CrossThreadPersistent<AudioListener> m_listener;
163 std::unique_ptr<Panner> m_panner; 163 std::unique_ptr<Panner> m_panner;
164 unsigned m_panningModel; 164 unsigned m_panningModel;
165 unsigned m_distanceModel; 165 unsigned m_distanceModel;
166 166
167 bool m_isAzimuthElevationDirty; 167 bool m_isAzimuthElevationDirty;
168 bool m_isDistanceConeGainDirty; 168 bool m_isDistanceConeGainDirty;
169 169
170 // Gain 170 // Gain
171 DistanceEffect m_distanceEffect; 171 DistanceEffect m_distanceEffect;
172 ConeEffect m_coneEffect; 172 ConeEffect m_coneEffect;
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 Member<AudioParam> m_positionZ; 254 Member<AudioParam> m_positionZ;
255 255
256 Member<AudioParam> m_orientationX; 256 Member<AudioParam> m_orientationX;
257 Member<AudioParam> m_orientationY; 257 Member<AudioParam> m_orientationY;
258 Member<AudioParam> m_orientationZ; 258 Member<AudioParam> m_orientationZ;
259 }; 259 };
260 260
261 } // namespace blink 261 } // namespace blink
262 262
263 #endif // PannerNode_h 263 #endif // PannerNode_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698