| OLD | NEW |
| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 { | 43 { |
| 44 ASSERT(deferredTaskHandler().isGraphOwner()); | 44 ASSERT(deferredTaskHandler().isGraphOwner()); |
| 45 if (!m_renderingStateNeedUpdating) { | 45 if (!m_renderingStateNeedUpdating) { |
| 46 deferredTaskHandler().markSummingJunctionDirty(this); | 46 deferredTaskHandler().markSummingJunctionDirty(this); |
| 47 m_renderingStateNeedUpdating = true; | 47 m_renderingStateNeedUpdating = true; |
| 48 } | 48 } |
| 49 } | 49 } |
| 50 | 50 |
| 51 void AudioSummingJunction::updateRenderingState() | 51 void AudioSummingJunction::updateRenderingState() |
| 52 { | 52 { |
| 53 ASSERT(deferredTaskHandler().isAudioThread()); | 53 DCHECK(deferredTaskHandler().isAudioThread()); |
| 54 ASSERT(deferredTaskHandler().isGraphOwner()); | 54 ASSERT(deferredTaskHandler().isGraphOwner()); |
| 55 if (m_renderingStateNeedUpdating) { | 55 if (m_renderingStateNeedUpdating) { |
| 56 // Copy from m_outputs to m_renderingOutputs. | 56 // Copy from m_outputs to m_renderingOutputs. |
| 57 m_renderingOutputs.resize(m_outputs.size()); | 57 m_renderingOutputs.resize(m_outputs.size()); |
| 58 unsigned j = 0; | 58 unsigned j = 0; |
| 59 for (AudioNodeOutput* output : m_outputs) { | 59 for (AudioNodeOutput* output : m_outputs) { |
| 60 m_renderingOutputs[j++] = output; | 60 m_renderingOutputs[j++] = output; |
| 61 output->updateRenderingState(); | 61 output->updateRenderingState(); |
| 62 } | 62 } |
| 63 | 63 |
| 64 didUpdate(); | 64 didUpdate(); |
| 65 | 65 |
| 66 m_renderingStateNeedUpdating = false; | 66 m_renderingStateNeedUpdating = false; |
| 67 } | 67 } |
| 68 } | 68 } |
| 69 | 69 |
| 70 } // namespace blink | 70 } // namespace blink |
| 71 | 71 |
| OLD | NEW |