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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp

Issue 2767623002: Slightly reduce memory usage in OscillatorNode (Closed)
Patch Set: Rebase Created 3 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webaudio/OscillatorNode.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 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 ExceptionState& exception_state) { 512 ExceptionState& exception_state) {
513 DCHECK(IsMainThread()); 513 DCHECK(IsMainThread());
514 514
515 return ChannelMergerNode::Create(*this, number_of_inputs, exception_state); 515 return ChannelMergerNode::Create(*this, number_of_inputs, exception_state);
516 } 516 }
517 517
518 OscillatorNode* BaseAudioContext::createOscillator( 518 OscillatorNode* BaseAudioContext::createOscillator(
519 ExceptionState& exception_state) { 519 ExceptionState& exception_state) {
520 DCHECK(IsMainThread()); 520 DCHECK(IsMainThread());
521 521
522 return OscillatorNode::Create(*this, exception_state); 522 return OscillatorNode::Create(*this, "sine", nullptr, exception_state);
523 } 523 }
524 524
525 PeriodicWave* BaseAudioContext::createPeriodicWave( 525 PeriodicWave* BaseAudioContext::createPeriodicWave(
526 const Vector<float>& real, 526 const Vector<float>& real,
527 const Vector<float>& imag, 527 const Vector<float>& imag,
528 ExceptionState& exception_state) { 528 ExceptionState& exception_state) {
529 DCHECK(IsMainThread()); 529 DCHECK(IsMainThread());
530 530
531 return PeriodicWave::Create(*this, real, imag, false, exception_state); 531 return PeriodicWave::Create(*this, real, imag, false, exception_state);
532 } 532 }
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
919 } 919 }
920 920
921 SecurityOrigin* BaseAudioContext::GetSecurityOrigin() const { 921 SecurityOrigin* BaseAudioContext::GetSecurityOrigin() const {
922 if (GetExecutionContext()) 922 if (GetExecutionContext())
923 return GetExecutionContext()->GetSecurityOrigin(); 923 return GetExecutionContext()->GetSecurityOrigin();
924 924
925 return nullptr; 925 return nullptr;
926 } 926 }
927 927
928 } // namespace blink 928 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webaudio/OscillatorNode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698