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

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

Issue 458923003: Remove AudioNode::isMarkedForDeletion from oilpan builds (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
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 // This copies m_outputs to m_renderingOutputs. Please see comments for thes e lists below. 51 // This copies m_outputs to m_renderingOutputs. Please see comments for thes e lists below.
52 // This must be called when we own the context's graph lock in the audio thr ead at the very start or end of the render quantum. 52 // This must be called when we own the context's graph lock in the audio thr ead at the very start or end of the render quantum.
53 void updateRenderingState(); 53 void updateRenderingState();
54 54
55 // Rendering code accesses its version of the current connections here. 55 // Rendering code accesses its version of the current connections here.
56 unsigned numberOfRenderingConnections() const { return m_renderingOutputs.si ze(); } 56 unsigned numberOfRenderingConnections() const { return m_renderingOutputs.si ze(); }
57 AudioNodeOutput* renderingOutput(unsigned i) { return m_renderingOutputs[i]; } 57 AudioNodeOutput* renderingOutput(unsigned i) { return m_renderingOutputs[i]; }
58 bool isConnected() const { return numberOfRenderingConnections() > 0; } 58 bool isConnected() const { return numberOfRenderingConnections() > 0; }
59 59
60 #if !ENABLE(OILPAN)
60 virtual bool canUpdateState() = 0; 61 virtual bool canUpdateState() = 0;
62 #endif
61 virtual void didUpdate() = 0; 63 virtual void didUpdate() = 0;
62 64
63 protected: 65 protected:
64 explicit AudioSummingJunction(AudioContext*); 66 explicit AudioSummingJunction(AudioContext*);
65 67
66 RefPtrWillBeMember<AudioContext> m_context; 68 RefPtrWillBeMember<AudioContext> m_context;
67 69
68 // m_outputs contains the AudioNodeOutputs representing current connections which are not disabled. 70 // m_outputs contains the AudioNodeOutputs representing current connections which are not disabled.
69 // The rendering code should never use this directly, but instead uses m_ren deringOutputs. 71 // The rendering code should never use this directly, but instead uses m_ren deringOutputs.
70 // Oilpan: Since items are added to the hash set by the audio thread (not re gistered to Oilpan), 72 // Oilpan: Since items are added to the hash set by the audio thread (not re gistered to Oilpan),
71 // we cannot use a HeapHashSet. 73 // we cannot use a HeapHashSet.
72 HashSet<AudioNodeOutput*> m_outputs; 74 HashSet<AudioNodeOutput*> m_outputs;
73 75
74 // m_renderingOutputs is a copy of m_outputs which will never be modified du ring the graph rendering on the audio thread. 76 // m_renderingOutputs is a copy of m_outputs which will never be modified du ring the graph rendering on the audio thread.
75 // This is the list which is used by the rendering code. 77 // This is the list which is used by the rendering code.
76 // Whenever m_outputs is modified, the context is told so it can later updat e m_renderingOutputs from m_outputs at a safe time. 78 // Whenever m_outputs is modified, the context is told so it can later updat e m_renderingOutputs from m_outputs at a safe time.
77 // Most of the time, m_renderingOutputs is identical to m_outputs. 79 // Most of the time, m_renderingOutputs is identical to m_outputs.
78 // Oilpan: Since items are added to the vector by the audio thread (not regi stered to Oilpan), 80 // Oilpan: Since items are added to the vector by the audio thread (not regi stered to Oilpan),
79 // we cannot use a HeapVector. 81 // we cannot use a HeapVector.
80 Vector<AudioNodeOutput*> m_renderingOutputs; 82 Vector<AudioNodeOutput*> m_renderingOutputs;
81 83
82 // m_renderingStateNeedUpdating keeps track if m_outputs is modified. 84 // m_renderingStateNeedUpdating keeps track if m_outputs is modified.
83 bool m_renderingStateNeedUpdating; 85 bool m_renderingStateNeedUpdating;
84 }; 86 };
85 87
86 } // namespace blink 88 } // namespace blink
87 89
88 #endif // AudioSummingJunction_h 90 #endif // AudioSummingJunction_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698