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

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

Issue 13973026: remove memoryinstrumentation Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove the rest part of MemoryInstrumentation Created 7 years, 8 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/AudioNode.h ('k') | Source/wtf/Forward.h » ('j') | 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) 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 15 matching lines...) Expand all
26 26
27 #if ENABLE(WEB_AUDIO) 27 #if ENABLE(WEB_AUDIO)
28 28
29 #include "AudioNode.h" 29 #include "AudioNode.h"
30 30
31 #include "AudioContext.h" 31 #include "AudioContext.h"
32 #include "AudioNodeInput.h" 32 #include "AudioNodeInput.h"
33 #include "AudioNodeOutput.h" 33 #include "AudioNodeOutput.h"
34 #include "AudioParam.h" 34 #include "AudioParam.h"
35 #include "ExceptionCode.h" 35 #include "ExceptionCode.h"
36 #include "WebCoreMemoryInstrumentation.h"
37 #include <wtf/Atomics.h> 36 #include <wtf/Atomics.h>
38 #include <wtf/MainThread.h> 37 #include <wtf/MainThread.h>
39 #include <wtf/MemoryInstrumentationVector.h>
40 38
41 #if DEBUG_AUDIONODE_REFERENCES 39 #if DEBUG_AUDIONODE_REFERENCES
42 #include <stdio.h> 40 #include <stdio.h>
43 #endif 41 #endif
44 42
45 namespace WebCore { 43 namespace WebCore {
46 44
47 AudioNode::AudioNode(AudioContext* context, float sampleRate) 45 AudioNode::AudioNode(AudioContext* context, float sampleRate)
48 : m_isInitialized(false) 46 : m_isInitialized(false)
49 , m_nodeType(NodeTypeUnknown) 47 , m_nodeType(NodeTypeUnknown)
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 483
486 // Mark for deletion at end of each render quantum or when conte xt shuts down. 484 // Mark for deletion at end of each render quantum or when conte xt shuts down.
487 context()->markForDeletion(this); 485 context()->markForDeletion(this);
488 m_isMarkedForDeletion = true; 486 m_isMarkedForDeletion = true;
489 } 487 }
490 } else if (refType == RefTypeConnection) 488 } else if (refType == RefTypeConnection)
491 disableOutputsIfNecessary(); 489 disableOutputsIfNecessary();
492 } 490 }
493 } 491 }
494 492
495 void AudioNode::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
496 {
497 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::Audio);
498 info.addMember(m_context, "context");
499 info.addMember(m_inputs, "inputs");
500 info.addMember(m_outputs, "outputs");
501 }
502
503 #if DEBUG_AUDIONODE_REFERENCES 493 #if DEBUG_AUDIONODE_REFERENCES
504 494
505 bool AudioNode::s_isNodeCountInitialized = false; 495 bool AudioNode::s_isNodeCountInitialized = false;
506 int AudioNode::s_nodeCount[NodeTypeEnd]; 496 int AudioNode::s_nodeCount[NodeTypeEnd];
507 497
508 void AudioNode::printNodeCounts() 498 void AudioNode::printNodeCounts()
509 { 499 {
510 fprintf(stderr, "\n\n"); 500 fprintf(stderr, "\n\n");
511 fprintf(stderr, "===========================\n"); 501 fprintf(stderr, "===========================\n");
512 fprintf(stderr, "AudioNode: reference counts\n"); 502 fprintf(stderr, "AudioNode: reference counts\n");
513 fprintf(stderr, "===========================\n"); 503 fprintf(stderr, "===========================\n");
514 504
515 for (unsigned i = 0; i < NodeTypeEnd; ++i) 505 for (unsigned i = 0; i < NodeTypeEnd; ++i)
516 fprintf(stderr, "%d: %d\n", i, s_nodeCount[i]); 506 fprintf(stderr, "%d: %d\n", i, s_nodeCount[i]);
517 507
518 fprintf(stderr, "===========================\n\n\n"); 508 fprintf(stderr, "===========================\n\n\n");
519 } 509 }
520 510
521 #endif // DEBUG_AUDIONODE_REFERENCES 511 #endif // DEBUG_AUDIONODE_REFERENCES
522 512
523 } // namespace WebCore 513 } // namespace WebCore
524 514
525 #endif // ENABLE(WEB_AUDIO) 515 #endif // ENABLE(WEB_AUDIO)
OLDNEW
« no previous file with comments | « Source/modules/webaudio/AudioNode.h ('k') | Source/wtf/Forward.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698