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

Side by Side Diff: Source/modules/webaudio/AudioSummingJunction.cpp

Issue 460303003: Merge m_didCallDispose and m_isMarkedForDeletion flags into one flag (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « Source/modules/webaudio/AudioSummingJunction.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012, Google Inc. All rights reserved. 2 * Copyright (C) 2012, 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 } 53 }
54 54
55 void AudioSummingJunction::trace(Visitor* visitor) 55 void AudioSummingJunction::trace(Visitor* visitor)
56 { 56 {
57 visitor->trace(m_context); 57 visitor->trace(m_context);
58 } 58 }
59 59
60 void AudioSummingJunction::changedOutputs() 60 void AudioSummingJunction::changedOutputs()
61 { 61 {
62 ASSERT(context()->isGraphOwner()); 62 ASSERT(context()->isGraphOwner());
63 #if ENABLE(OILPAN)
64 if (!m_renderingStateNeedUpdating) {
65 #else
66 if (!m_renderingStateNeedUpdating && canUpdateState()) { 63 if (!m_renderingStateNeedUpdating && canUpdateState()) {
67 #endif
68 context()->markSummingJunctionDirty(this); 64 context()->markSummingJunctionDirty(this);
69 m_renderingStateNeedUpdating = true; 65 m_renderingStateNeedUpdating = true;
70 } 66 }
71 } 67 }
72 68
73 void AudioSummingJunction::updateRenderingState() 69 void AudioSummingJunction::updateRenderingState()
74 { 70 {
75 ASSERT(context()->isAudioThread() && context()->isGraphOwner()); 71 ASSERT(context()->isAudioThread() && context()->isGraphOwner());
76 #if ENABLE(OILPAN)
77 if (m_renderingStateNeedUpdating) {
78 #else
79 if (m_renderingStateNeedUpdating && canUpdateState()) { 72 if (m_renderingStateNeedUpdating && canUpdateState()) {
80 #endif
81 // Copy from m_outputs to m_renderingOutputs. 73 // Copy from m_outputs to m_renderingOutputs.
82 m_renderingOutputs.resize(m_outputs.size()); 74 m_renderingOutputs.resize(m_outputs.size());
83 unsigned j = 0; 75 unsigned j = 0;
84 for (HashSet<AudioNodeOutput*>::iterator i = m_outputs.begin(); i != m_o utputs.end(); ++i, ++j) { 76 for (HashSet<AudioNodeOutput*>::iterator i = m_outputs.begin(); i != m_o utputs.end(); ++i, ++j) {
85 AudioNodeOutput* output = *i; 77 AudioNodeOutput* output = *i;
86 m_renderingOutputs[j] = output; 78 m_renderingOutputs[j] = output;
87 output->updateRenderingState(); 79 output->updateRenderingState();
88 } 80 }
89 81
90 didUpdate(); 82 didUpdate();
91 83
92 m_renderingStateNeedUpdating = false; 84 m_renderingStateNeedUpdating = false;
93 } 85 }
94 } 86 }
95 87
96 } // namespace blink 88 } // namespace blink
97 89
98 #endif // ENABLE(WEB_AUDIO) 90 #endif // ENABLE(WEB_AUDIO)
OLDNEW
« no previous file with comments | « Source/modules/webaudio/AudioSummingJunction.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698