mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Bug 865993. For layerized images GetImageContainer has the same meaning as Draw()'ing the image, and Draw will not be called on the image, so send the unlocked draw notification there too. r=joedrew
This commit is contained in:
parent
6542a83d06
commit
fe2b9609be
@ -1105,6 +1105,10 @@ RasterImage::GetImageContainer(LayerManager* aManager, ImageContainer **_retval)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (IsUnlocked() && mStatusTracker) {
|
||||
mStatusTracker->OnUnlockedDraw();
|
||||
}
|
||||
|
||||
if (mImageContainer) {
|
||||
*_retval = mImageContainer;
|
||||
NS_ADDREF(*_retval);
|
||||
@ -3136,12 +3140,8 @@ RasterImage::Draw(gfxContext *aContext,
|
||||
DiscardTracker::Reset(&mDiscardTrackerNode);
|
||||
}
|
||||
|
||||
// We would like to just check if we have a zero lock count, but we can't do
|
||||
// that for animated images because in EnsureAnimExists we lock the image and
|
||||
// never unlock so that animated images always have their lock count >= 1. In
|
||||
// that case we use our animation consumers count as a proxy for lock count.
|
||||
if (mLockCount == 0 || (mAnim && mAnimationConsumers == 0)) {
|
||||
if (mStatusTracker)
|
||||
|
||||
if (IsUnlocked() && mStatusTracker) {
|
||||
mStatusTracker->OnUnlockedDraw();
|
||||
}
|
||||
|
||||
|
@ -716,6 +716,12 @@ private:
|
||||
};
|
||||
NS_IMETHOD RequestDecodeCore(RequestDecodeType aDecodeType);
|
||||
|
||||
// We would like to just check if we have a zero lock count, but we can't do
|
||||
// that for animated images because in EnsureAnimExists we lock the image and
|
||||
// never unlock so that animated images always have their lock count >= 1. In
|
||||
// that case we use our animation consumers count as a proxy for lock count.
|
||||
bool IsUnlocked() { return (mLockCount == 0 || (mAnim && mAnimationConsumers == 0)); }
|
||||
|
||||
private: // data
|
||||
nsIntSize mSize;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user