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

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

Issue 205173002: Move webaudio to oilpan (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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) 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 30 matching lines...) Expand all
41 #include <stdio.h> 41 #include <stdio.h>
42 #endif 42 #endif
43 43
44 namespace WebCore { 44 namespace WebCore {
45 45
46 AudioNode::AudioNode(AudioContext* context, float sampleRate) 46 AudioNode::AudioNode(AudioContext* context, float sampleRate)
47 : m_isInitialized(false) 47 : m_isInitialized(false)
48 , m_nodeType(NodeTypeUnknown) 48 , m_nodeType(NodeTypeUnknown)
49 , m_context(context) 49 , m_context(context)
50 , m_sampleRate(sampleRate) 50 , m_sampleRate(sampleRate)
51 , m_keepAlive(adoptPtr(new Persistent<AudioNode>(this)))
51 , m_lastProcessingTime(-1) 52 , m_lastProcessingTime(-1)
52 , m_lastNonSilentTime(-1) 53 , m_lastNonSilentTime(-1)
53 , m_normalRefCount(1) // start out with normal refCount == 1 (like WTF::RefC ounted class) 54 , m_normalRefCount(1) // start out with normal refCount == 1 (like WTF::RefC ounted class)
54 , m_connectionRefCount(0) 55 , m_connectionRefCount(0)
55 , m_isMarkedForDeletion(false) 56 , m_isMarkedForDeletion(false)
56 , m_isDisabled(false) 57 , m_isDisabled(false)
57 , m_channelCount(2) 58 , m_channelCount(2)
58 , m_channelCountMode(Max) 59 , m_channelCountMode(Max)
59 , m_channelInterpretation(AudioBus::Speakers) 60 , m_channelInterpretation(AudioBus::Speakers)
60 { 61 {
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 fprintf(stderr, "===========================\n"); 580 fprintf(stderr, "===========================\n");
580 581
581 for (unsigned i = 0; i < NodeTypeEnd; ++i) 582 for (unsigned i = 0; i < NodeTypeEnd; ++i)
582 fprintf(stderr, "%d: %d\n", i, s_nodeCount[i]); 583 fprintf(stderr, "%d: %d\n", i, s_nodeCount[i]);
583 584
584 fprintf(stderr, "===========================\n\n\n"); 585 fprintf(stderr, "===========================\n\n\n");
585 } 586 }
586 587
587 #endif // DEBUG_AUDIONODE_REFERENCES 588 #endif // DEBUG_AUDIONODE_REFERENCES
588 589
590 void AudioNode::trace(Visitor* visitor)
591 {
592 visitor->trace(m_context);
593 }
594
595 void AudioNode::clearKeepAlive()
596 {
597 ASSERT(m_keepAlive);
598 m_keepAlive = nullptr;
599 }
600
589 } // namespace WebCore 601 } // namespace WebCore
590 602
591 #endif // ENABLE(WEB_AUDIO) 603 #endif // ENABLE(WEB_AUDIO)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698