mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Bug 1190117 - Track mLastProducerID and mLastFrameID explicitly in ImageLayerProperties. r=roc
This commit is contained in:
parent
78e39b283c
commit
71c3de0d20
@ -404,9 +404,14 @@ struct ImageLayerProperties : public LayerPropertiesBase
|
||||
, mFilter(aImage->GetFilter())
|
||||
, mScaleToSize(aImage->GetScaleToSize())
|
||||
, mScaleMode(aImage->GetScaleMode())
|
||||
, mLastProducerID(-1)
|
||||
, mLastFrameID(-1)
|
||||
, mIsMask(aIsMask)
|
||||
{
|
||||
mFrameID = mImageHost ? mImageHost->GetFrameID() : -1;
|
||||
if (mImageHost) {
|
||||
mLastProducerID = mImageHost->GetLastProducerID();
|
||||
mLastFrameID = mImageHost->GetLastFrameID();
|
||||
}
|
||||
}
|
||||
|
||||
virtual nsIntRegion ComputeChangeInternal(NotifySubDocInvalidationFunc aCallback,
|
||||
@ -428,7 +433,8 @@ struct ImageLayerProperties : public LayerPropertiesBase
|
||||
mScaleToSize != imageLayer->GetScaleToSize() ||
|
||||
mScaleMode != imageLayer->GetScaleMode() ||
|
||||
host != mImageHost ||
|
||||
(host && host->GetFrameID() != mFrameID)) {
|
||||
(host && host->GetProducerID() != mLastProducerID) ||
|
||||
(host && host->GetFrameID() != mLastFrameID)) {
|
||||
aGeometryChanged = true;
|
||||
|
||||
if (mIsMask) {
|
||||
@ -454,8 +460,9 @@ struct ImageLayerProperties : public LayerPropertiesBase
|
||||
nsRefPtr<ImageHost> mImageHost;
|
||||
GraphicsFilter mFilter;
|
||||
gfx::IntSize mScaleToSize;
|
||||
int32_t mFrameID;
|
||||
ScaleMode mScaleMode;
|
||||
int32_t mLastProducerID;
|
||||
int32_t mLastFrameID;
|
||||
bool mIsMask;
|
||||
};
|
||||
|
||||
|
@ -91,6 +91,15 @@ public:
|
||||
return img ? img->mFrameID : -1;
|
||||
}
|
||||
|
||||
int32_t GetProducerID()
|
||||
{
|
||||
const TimedImage* img = ChooseImage();
|
||||
return img ? img->mProducerID : -1;
|
||||
}
|
||||
|
||||
int32_t GetLastFrameID() const { return mLastFrameID; }
|
||||
int32_t GetLastProducerID() const { return mLastProducerID; }
|
||||
|
||||
enum Bias {
|
||||
// Don't apply bias to frame times
|
||||
BIAS_NONE,
|
||||
|
Loading…
Reference in New Issue
Block a user