OLD | NEW |
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 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
796 #else | 796 #else |
797 | 797 |
798 void AudioContext::markForDeletion(AudioNode* node) | 798 void AudioContext::markForDeletion(AudioNode* node) |
799 { | 799 { |
800 ASSERT(isGraphOwner()); | 800 ASSERT(isGraphOwner()); |
801 | 801 |
802 if (!isInitialized()) | 802 if (!isInitialized()) |
803 m_nodesToDelete.append(node); | 803 m_nodesToDelete.append(node); |
804 else | 804 else |
805 m_nodesMarkedForDeletion.append(node); | 805 m_nodesMarkedForDeletion.append(node); |
806 | |
807 // This is probably the best time for us to remove the node from automatic p
ull list, | |
808 // since all connections are gone and we hold the graph lock. Then when hand
lePostRenderTasks() | |
809 // gets a chance to schedule the deletion work, updateAutomaticPullNodes() a
lso gets a chance to | |
810 // modify m_renderingAutomaticPullNodes. | |
811 removeAutomaticPullNode(node); | |
812 } | 806 } |
813 | 807 |
814 void AudioContext::scheduleNodeDeletion() | 808 void AudioContext::scheduleNodeDeletion() |
815 { | 809 { |
816 bool isGood = isInitialized() && isGraphOwner(); | 810 bool isGood = isInitialized() && isGraphOwner(); |
817 ASSERT(isGood); | 811 ASSERT(isGood); |
818 if (!isGood) | 812 if (!isGood) |
819 return; | 813 return; |
820 | 814 |
821 // Make sure to call deleteMarkedNodes() on main thread. | 815 // Make sure to call deleteMarkedNodes() on main thread. |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1013 visitor->trace(m_referencedNodes); | 1007 visitor->trace(m_referencedNodes); |
1014 visitor->trace(m_liveNodes); | 1008 visitor->trace(m_liveNodes); |
1015 visitor->trace(m_liveAudioSummingJunctions); | 1009 visitor->trace(m_liveAudioSummingJunctions); |
1016 #endif | 1010 #endif |
1017 EventTargetWithInlineData::trace(visitor); | 1011 EventTargetWithInlineData::trace(visitor); |
1018 } | 1012 } |
1019 | 1013 |
1020 } // namespace blink | 1014 } // namespace blink |
1021 | 1015 |
1022 #endif // ENABLE(WEB_AUDIO) | 1016 #endif // ENABLE(WEB_AUDIO) |
OLD | NEW |