Bug 716140 - imgDecoderObserver::OnDataAvailable is simply a duplicate of imgDecoderObserver::FrameUpdated, so remove it. r=seth

--HG--
extra : rebase_source : 90d828b429a6dd629b76912a4a58c802d2318d34
This commit is contained in:
Joe Drew 2013-01-18 16:47:17 -05:00
Родитель adf62cd6b9
Коммит 70decf9aee
4 изменённых файлов: 2 добавлений и 39 удалений

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

@ -158,7 +158,6 @@ Decoder::FlushInvalidations()
// Tell the image that it's been updated // Tell the image that it's been updated
mImage.FrameUpdated(mFrameCount - 1, mInvalidRect); mImage.FrameUpdated(mFrameCount - 1, mInvalidRect);
// Fire OnDataAvailable
if (mObserver) { if (mObserver) {
#ifdef XP_MACOSX #ifdef XP_MACOSX
// Bug 703231 // Bug 703231
@ -174,7 +173,7 @@ Decoder::FlushInvalidations()
mInvalidRect.Inflate(1); mInvalidRect.Inflate(1);
mInvalidRect = mInvalidRect.Intersect(mImageBound); mInvalidRect = mInvalidRect.Intersect(mImageBound);
#endif #endif
mObserver->OnDataAvailable(&mInvalidRect); mObserver->FrameChanged(&mInvalidRect);
} }
// Clear the invalidation rectangle // Clear the invalidation rectangle

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

@ -70,8 +70,6 @@ public:
* *
* called when there is more to paint. * called when there is more to paint.
*/ */
virtual void OnDataAvailable(const nsIntRect * aRect) = 0;
virtual void FrameChanged(const nsIntRect * aDirtyRect) = 0; virtual void FrameChanged(const nsIntRect * aDirtyRect) = 0;
/** /**

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

@ -76,20 +76,6 @@ public:
} }
} }
virtual void OnDataAvailable(const nsIntRect* rect)
{
LOG_SCOPE(GetImgLog(), "imgStatusTrackerObserver::OnDataAvailable");
NS_ABORT_IF_FALSE(mTracker->GetImage(),
"OnDataAvailable callback before we've created our image");
mTracker->RecordDataAvailable();
nsTObserverArray<imgRequestProxy*>::ForwardIterator iter(mTracker->mConsumers);
while (iter.HasMore()) {
mTracker->SendDataAvailable(iter.GetNext(), rect);
}
}
virtual void FrameChanged(const nsIntRect* dirtyRect) virtual void FrameChanged(const nsIntRect* dirtyRect)
{ {
LOG_SCOPE(GetImgLog(), "imgStatusTrackerObserver::FrameChanged"); LOG_SCOPE(GetImgLog(), "imgStatusTrackerObserver::FrameChanged");
@ -374,7 +360,7 @@ imgStatusTracker::SyncNotify(imgRequestProxy* proxy)
proxy->BlockOnload(); proxy->BlockOnload();
if (mImage) { if (mImage) {
// OnDataAvailable // OnFrameUpdate
// XXX - Should only send partial rects here, but that needs to // XXX - Should only send partial rects here, but that needs to
// wait until we fix up the observer interface // wait until we fix up the observer interface
nsIntRect r(mImage->FrameRect(imgIContainer::FRAME_CURRENT)); nsIntRect r(mImage->FrameRect(imgIContainer::FRAME_CURRENT));
@ -506,24 +492,6 @@ imgStatusTracker::SendStartContainer(imgRequestProxy* aProxy)
aProxy->OnStartContainer(); aProxy->OnStartContainer();
} }
void
imgStatusTracker::RecordDataAvailable()
{
NS_ABORT_IF_FALSE(mImage,
"RecordDataAvailable called before we have an Image");
// no bookkeeping necessary here - this is implied by imgIContainer's
// number of frames and frame rect
}
void
imgStatusTracker::SendDataAvailable(imgRequestProxy* aProxy,
const nsIntRect* aRect)
{
if (!aProxy->NotificationsDeferred())
aProxy->OnFrameUpdate(aRect);
}
void void
imgStatusTracker::RecordStopFrame() imgStatusTracker::RecordStopFrame()
{ {

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

@ -135,8 +135,6 @@ public:
void SendStartDecode(imgRequestProxy* aProxy); void SendStartDecode(imgRequestProxy* aProxy);
void RecordStartContainer(imgIContainer* aContainer); void RecordStartContainer(imgIContainer* aContainer);
void SendStartContainer(imgRequestProxy* aProxy); void SendStartContainer(imgRequestProxy* aProxy);
void RecordDataAvailable();
void SendDataAvailable(imgRequestProxy* aProxy, const nsIntRect* aRect);
void RecordFrameChanged(const nsIntRect* aDirtyRect); void RecordFrameChanged(const nsIntRect* aDirtyRect);
void SendFrameChanged(imgRequestProxy* aProxy, const nsIntRect* aDirtyRect); void SendFrameChanged(imgRequestProxy* aProxy, const nsIntRect* aDirtyRect);
void RecordStopFrame(); void RecordStopFrame();