Bug 704175 part 1. Rename onBeforePaint to sample for animation frame callbacks. r=roc

This commit is contained in:
Boris Zbarsky
2011-11-28 07:48:27 -05:00
parent abd2317859
commit dff3d1c829
4 changed files with 6 additions and 7 deletions

View File

@@ -46,8 +46,7 @@
interface nsIAnimationFrameListener : nsISupports interface nsIAnimationFrameListener : nsISupports
{ {
/** /**
* The timestamp is the same as it would be for the a corresponding * The timestamp is the time to be used for the animation sample.
* MozBeforePaint event.
*/ */
void onBeforePaint(in DOMTimeStamp timeStamp); void sample(in DOMTimeStamp timeStamp);
}; };

View File

@@ -392,7 +392,7 @@ nsRefreshDriver::Notify(nsITimer *aTimer)
} }
for (PRUint32 i = 0; i < animationListeners.Length(); ++i) { for (PRUint32 i = 0; i < animationListeners.Length(); ++i) {
animationListeners[i]->OnBeforePaint(eventTime); animationListeners[i]->Sample(eventTime);
} }
// This is the Flush_Style case. // This is the Flush_Style case.

View File

@@ -132,7 +132,7 @@ const AnimatedZoom = {
return this.beginTime != null; return this.beginTime != null;
}, },
onBeforePaint: function(aTimeStamp) { sample: function(aTimeStamp) {
try { try {
let tdiff = aTimeStamp - this.beginTime; let tdiff = aTimeStamp - this.beginTime;
let counter = tdiff / this.animationDuration; let counter = tdiff / this.animationDuration;

View File

@@ -175,7 +175,7 @@ MouseModule.prototype = {
} }
}, },
onBeforePaint: function onBeforePaint(aTimeStamp) { sample: function sample(aTimeStamp) {
this._waitingForPaint = false; this._waitingForPaint = false;
}, },
@@ -889,7 +889,7 @@ KineticController.prototype = {
} }
let callback = { let callback = {
onBeforePaint: function kineticHandleEvent(timeStamp) { sample: function kineticHandleEvent(timeStamp) {
// Someone called end() on us between timer intervals // Someone called end() on us between timer intervals
// or we are paused. // or we are paused.
if (!self.isActive() || self._paused) if (!self.isActive() || self._paused)