зеркало из https://github.com/mozilla/gecko-dev.git
Bug 716140 - Create and Send OnStartFrame when a frame starts. r=seth
--HG-- extra : rebase_source : 7af770a5cc28c2a6d199e632c706330a0d582659
This commit is contained in:
Родитель
70decf9aee
Коммит
9f889623b9
|
@ -227,6 +227,11 @@ Decoder::PostFrameStart()
|
||||||
// reported by the Image.
|
// reported by the Image.
|
||||||
NS_ABORT_IF_FALSE(mFrameCount == mImage.GetNumFrames(),
|
NS_ABORT_IF_FALSE(mFrameCount == mImage.GetNumFrames(),
|
||||||
"Decoder frame count doesn't match image's!");
|
"Decoder frame count doesn't match image's!");
|
||||||
|
|
||||||
|
// Fire notifications
|
||||||
|
if (mObserver) {
|
||||||
|
mObserver->OnStartFrame();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -65,6 +65,13 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual void OnStartContainer() = 0;
|
virtual void OnStartContainer() = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Decode notification.
|
||||||
|
*
|
||||||
|
* Called when we know a frame has begun decoding.
|
||||||
|
*/
|
||||||
|
virtual void OnStartFrame() = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decode notification.
|
* Decode notification.
|
||||||
*
|
*
|
||||||
|
|
|
@ -76,6 +76,18 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual void OnStartFrame()
|
||||||
|
{
|
||||||
|
LOG_SCOPE(GetImgLog(), "imgStatusTrackerObserver::OnStartFrame");
|
||||||
|
NS_ABORT_IF_FALSE(mTracker->GetImage(),
|
||||||
|
"OnStartFrame callback before we've created our image");
|
||||||
|
|
||||||
|
mTracker->RecordStartFrame();
|
||||||
|
|
||||||
|
// This is not observed below the imgStatusTracker level, so we don't need
|
||||||
|
// to SendStartFrame.
|
||||||
|
}
|
||||||
|
|
||||||
virtual void FrameChanged(const nsIntRect* dirtyRect)
|
virtual void FrameChanged(const nsIntRect* dirtyRect)
|
||||||
{
|
{
|
||||||
LOG_SCOPE(GetImgLog(), "imgStatusTrackerObserver::FrameChanged");
|
LOG_SCOPE(GetImgLog(), "imgStatusTrackerObserver::FrameChanged");
|
||||||
|
@ -492,6 +504,13 @@ imgStatusTracker::SendStartContainer(imgRequestProxy* aProxy)
|
||||||
aProxy->OnStartContainer();
|
aProxy->OnStartContainer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
imgStatusTracker::RecordStartFrame()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
// No SendStartFrame since it's not observed below us.
|
||||||
|
|
||||||
void
|
void
|
||||||
imgStatusTracker::RecordStopFrame()
|
imgStatusTracker::RecordStopFrame()
|
||||||
{
|
{
|
||||||
|
|
|
@ -135,6 +135,8 @@ 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 RecordStartFrame();
|
||||||
|
// No SendStartFrame since it's not observed below us.
|
||||||
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();
|
||||||
|
|
Загрузка…
Ссылка в новой задаче