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

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

Issue 2655073009: Rename cancelValuesAndHoldAtTime to cancelAndHoldAtTime. (Closed)
Patch Set: Rebase expected results Created 3 years, 10 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 | « third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.h ('k') | no next file » | 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 611
612 // Remove all events starting at startTime. 612 // Remove all events starting at startTime.
613 for (unsigned i = 0; i < m_events.size(); ++i) { 613 for (unsigned i = 0; i < m_events.size(); ++i) {
614 if (m_events[i]->time() >= startTime) { 614 if (m_events[i]->time() >= startTime) {
615 m_events.remove(i, m_events.size() - i); 615 m_events.remove(i, m_events.size() - i);
616 break; 616 break;
617 } 617 }
618 } 618 }
619 } 619 }
620 620
621 void AudioParamTimeline::cancelValuesAndHoldAtTime( 621 void AudioParamTimeline::cancelAndHoldAtTime(double cancelTime,
622 double cancelTime, 622 ExceptionState& exceptionState) {
623 ExceptionState& exceptionState) {
624 DCHECK(isMainThread()); 623 DCHECK(isMainThread());
625 624
626 if (!isNonNegativeAudioParamTime(cancelTime, exceptionState)) 625 if (!isNonNegativeAudioParamTime(cancelTime, exceptionState))
627 return; 626 return;
628 627
629 MutexLocker locker(m_eventsLock); 628 MutexLocker locker(m_eventsLock);
630 629
631 unsigned i; 630 unsigned i;
632 // Find the first event at or just past cancelTime. 631 // Find the first event at or just past cancelTime.
633 for (i = 0; i < m_events.size(); ++i) { 632 for (i = 0; i < m_events.size(); ++i) {
(...skipping 936 matching lines...) Expand 10 before | Expand all | Expand 10 after
1570 // propagate the last value to the end of the values buffer. 1569 // propagate the last value to the end of the values buffer.
1571 for (; writeIndex < numberOfValues; ++writeIndex) 1570 for (; writeIndex < numberOfValues; ++writeIndex)
1572 values[writeIndex] = value; 1571 values[writeIndex] = value;
1573 1572
1574 // This value is used to set the .value attribute of the AudioParam. it 1573 // This value is used to set the .value attribute of the AudioParam. it
1575 // should be the last computed value. 1574 // should be the last computed value.
1576 return values[numberOfValues - 1]; 1575 return values[numberOfValues - 1];
1577 } 1576 }
1578 1577
1579 } // namespace blink 1578 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698