Changeset 265173 in webkit
- Timestamp:
- Jul 31, 2020 11:09:15 PM (4 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r265172 r265173 1 2020-07-31 Jer Noble <jer.noble@apple.com> 2 3 [Mac] AudioSessionRoutingArbitrator causes a launch time regression checking for CoreAudio muted state 4 https://bugs.webkit.org/show_bug.cgi?id=214993 5 6 Reviewed by Eric Carlson. 7 8 The initial query of isMuted() is only there to tell whether, when we get a notification that the mute state 9 changed, whether our internal state is dirty and we need to fire a notification. Instead, replace the bool member 10 with an Optional<bool>, so we know we need to fire a changed notification whenever the first mute state change 11 comes in. 12 13 * platform/audio/mac/AudioSessionMac.mm: 14 (WebCore::AudioSession::AudioSession): 15 (WebCore::AudioSession::handleMutedStateChange): 16 (WebCore::AudioSessionPrivate::AudioSessionPrivate): Deleted. 17 1 18 2020-07-31 Jer Noble <jer.noble@apple.com> 2 19 -
trunk/Source/WebCore/platform/audio/mac/AudioSessionMac.mm
r263328 r265173 58 58 WTF_MAKE_FAST_ALLOCATED; 59 59 public: 60 explicit AudioSessionPrivate(bool mutedState) 61 : lastMutedState(mutedState) { } 62 bool lastMutedState; 60 explicit AudioSessionPrivate() = default; 61 Optional<bool> lastMutedState; 63 62 AudioSession::CategoryType category { AudioSession::None }; 64 63 #if ENABLE(ROUTING_ARBITRATION) … … 70 69 71 70 AudioSession::AudioSession() 72 : m_private(makeUnique<AudioSessionPrivate>( isMuted()))71 : m_private(makeUnique<AudioSessionPrivate>()) 73 72 { 74 73 } … … 276 275 277 276 bool isCurrentlyMuted = isMuted(); 278 if (m_private->lastMutedState == isCurrentlyMuted)277 if (m_private->lastMutedState && *m_private->lastMutedState == isCurrentlyMuted) 279 278 return; 280 279
Note: See TracChangeset
for help on using the changeset viewer.