Bug 926048. Part 2. Remove useless GetRawFrame call. r=edwin

|nextFrameIndex| is either |currentFrameIndex + 1| or 0, as can be seen from reading the code above this.

Also fix the whitespace on DoBlend call.
This commit is contained in:
Timothy Nikkel 2016-03-01 22:34:39 -06:00
Родитель 57a929ef04
Коммит 4bad8c1f9e
1 изменённых файлов: 3 добавлений и 6 удалений

Просмотреть файл

@ -137,13 +137,10 @@ FrameAnimator::AdvanceFrame(TimeStamp aTime)
if (nextFrameIndex == 0) {
ret.dirtyRect = mFirstFrameRefreshArea;
} else {
// Change frame
if (nextFrameIndex != currentFrameIndex + 1) {
nextFrame = GetRawFrame(nextFrameIndex);
}
MOZ_ASSERT(nextFrameIndex == currentFrameIndex + 1);
if (!DoBlend(&ret.dirtyRect, currentFrameIndex,
nextFrameIndex)) {
// Change frame
if (!DoBlend(&ret.dirtyRect, currentFrameIndex, nextFrameIndex)) {
// something went wrong, move on to next
NS_WARNING("FrameAnimator::AdvanceFrame(): Compositing of frame failed");
nextFrame->SetCompositingFailed(true);